Revert "Re-enable RendererSideContentDecoding for Navigations and SXG" This reverts commit 468d896aa9ff99143bc4da03bfab116c360bebc1. Reason for revert:DownloadContentTest.CompressedResponseWithContentDispositionInsufficientResources failure on multiple bots List of failed builders: Builder: linux-chromeos-chrome https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-chrome First failing build: https://ci.chromium.org/p/chrome/builders/ci/linux-chromeos-chrome/b8718844112705093041 Step "content_browsertests (retry shards) on Ubuntu-22.04 or Ubuntu-20.04" failing on builder "chromium/ci/fuchsia-arm64-cast-receiver-rel" Builder: fuchsia-arm64-cast-receiver-rel https://ci.chromium.org/p/chromium/builders/ci/fuchsia-arm64-cast-receiver-rel First failing build: https://ci.chromium.org/p/chromium/builders/ci/fuchsia-arm64-cast-receiver-rel/b8718845082436844721 Step "content_browsertests (retry shards) on Ubuntu-22.04" failing on builder "chromium/ci/fuchsia-x64-cast-receiver-rel" Builder: fuchsia-x64-cast-receiver-rel https://ci.chromium.org/p/chromium/builders/ci/fuchsia-x64-cast-receiver-rel First failing build: https://ci.chromium.org/p/chromium/builders/ci/fuchsia-x64-cast-receiver-rel/b8718843408303503537 Original change's description: > Re-enable RendererSideContentDecoding for Navigations and SXG > > This CL re-enables the `RendererSideContentDecoding` feature for > navigation requests and for Signed Exchanges (SXG) loadings. > > Previously, this feature was disabled for these requests [1][2] because > responses ultimately consumed by the browser process require decoded > content, but the feature caused the network service to skip decoding. > This impacted: > - Downloads triggered by `Content-Disposition: attachment`. > - Signed Exchanges (SXG), where the outer response's encoded payload > must be decoded before parsing can occur in the browser process. > > This change introduces a unified solution using a new > `ContentDecodingInterceptor` mechanism to correctly handle these cases > while allowing standard navigations to potentially benefit from > client-side (renderer) decoding: > > 1. The `client_side_content_decoding_enabled` flag is set again in > `CreateResourceRequestForNavigation` when the feature flag is > enabled. > 2. The network service (`URLRequestHttpJob`) now consistently skips > decoding if this flag is set, regardless of content type (the > previous SXG exception is removed). It reports the skipped encoding > types via `URLResponseHead::client_side_content_decoding_types`. > 3. A new Mojo IPC, `NetworkService::InterceptUrlLoaderForBodyDecoding`, > and a browser-side helper, > `ContentDecodingInterceptor::InterceptOnNetworkService`, are added. > These allow the browser process to request the network service to > insert a decoding interceptor on demand. > 4. Crucially, both `NavigationRequest` (before checking for downloads) > and `SignedExchangeLoader` (before processing the SXG response) now > check if `client_side_content_decoding_types` is populated. If > decoding was skipped by the network service, they call > `InterceptOnNetworkService`. This ensures a decoding step, performed > within the network service process, is inserted before the body > reaches the download manager or the SXG parsing logic. > > This approach allows standard navigation responses destined for a > renderer to bypass network service decoding (if the feature is enabled), > while guaranteeing that downloads and SXG outer responses are correctly > decoded before being consumed by browser-process logic. > > This CL also add a new `switch (reason)` case in the > ConvertInterruptReasonToMojoNetworkRequestStatus() method to handle the > mojo data pipe creation error case correctly. This case is tested by the > new test CompressedResponseWithContentDispositionInsufficientResources > in DownloadContentTest. > > [1]: https://crrev.com/c/6399553 > [2]: https://crrev.com/c/6399234 > > > Bug: 391950057 > Fixed: 406877444 > Change-Id: I9535db61464dfd0fd3c8e128affa7aa4ac6c3fc2 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6399776 > Reviewed-by: Adam Rice <ricea@chromium.org> > Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org> > Reviewed-by: Kouhei Ueno <kouhei@chromium.org> > Reviewed-by: Rakina Zata Amni <rakina@chromium.org> > Reviewed-by: Min Qin <qinmin@chromium.org> > Commit-Queue: Tsuyoshi Horo <horo@chromium.org> > Cr-Commit-Position: refs/heads/main@{#1440565} Bug: 391950057 No-Presubmit: true No-Tree-Checks: true No-Try: true Change-Id: I87e46de67bcbad0b0e656e3f58bc81c747a13784 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6420243 Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Mikihito Matsuura <mikt@google.com> Commit-Queue: Mikihito Matsuura <mikt@google.com> Cr-Commit-Position: refs/heads/main@{#1440677}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.