commit | 1c6efa6f5cf677b997af14e68abc49d05d8073ca | [log] [tgz] |
---|---|---|
author | Tsuyoshi Horo <horo@chromium.org> | Tue Feb 25 06:30:44 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Feb 25 06:30:44 2025 |
tree | fc8f1d4883246a22354f2d911b4c614b8201cfb4 | |
parent | 68c4e2a0f004ddbcc024b1f60bf60ccac6219c81 [diff] |
Refactor content encoding handling in URLRequestHttpJob This CL refactors content encoding handling in `URLRequestHttpJob` and introduces a new UMA, `Net.ContentEncodingType2`, for improved accuracy. * Refactoring: - Moves `Content-Encoding` header parsing and decoding `SourceStream` creation logic from `URLRequestHttpJob` to `FilterSourceStream`. - Adds `FilterSourceStream::GetContentEncodingTypes` to parse the `Content-Encoding` header. - Adds `FilterSourceStream::CreateDecodingSourceStream` to create a chain of decoding `SourceStream`s. - Updates `URLRequestHttpJob` to use these new methods, simplifying its implementation. - Adds unit tests for `FilterSourceStream::GetContentEncodingTypes`. Motivation: These changes lay the groundwork for the Renderer-Side Content Decoding project. * UMA Changes: Replaces the existing `Net.ContentEncodingType` UMA with `Net.ContentEncodingType2` to address the following limitations: - `Net.ContentEncodingType`: - A missing `Content-Encoding` header was incorrectly recorded as `Unknown`. - An empty `Content-Encoding` header, or one containing only `identity`, resulted in no UMA entry being recorded. - `Net.ContentEncodingType2`: - Correctly records all cases where no decoding `SourceStream` is created (missing, empty, or `identity` header) as `None`. OBSOLETE_HISTOGRAM[Net.ContentEncodingType]=Replaced by Net.ContentEncodingType2 Bug: 391950057 Change-Id: I4c37d4e8f056c57023e1d0f98f8463ef1694aaa1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6290949 Commit-Queue: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Nidhi Jaju <nidhijaju@chromium.org> Cr-Commit-Position: refs/heads/main@{#1424330}
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.