| commit | 5e3141e7e63f95a10f11bffba8bdfe84404d3ad7 | [log] [tgz] |
|---|---|---|
| author | Tsuyoshi Horo <horo@chromium.org> | Wed Apr 09 04:53:53 2025 |
| committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Apr 09 04:53:53 2025 |
| tree | deecf2f035200e8347c3fb9e241a79f93ad76a0a | |
| parent | 0bf36eafdd145af357cc39065327dbcdc36bc933 [diff] |
network: Simplify Shared Storage redirect handling in URLLoader Previously, `ProcessInboundSharedStorageInterceptorOnReceivedRedirect` used a `std::map` (`on_receive_redirect_responses_`) and an index to temporarily store the `mojom::URLResponseHeadPtr`. This logic was introduced by https://crrev.com/c/4519145. This change replaces this mechanism with `base::SplitOnceCallback`. The `URLResponseHeadPtr` is now moved directly into the `BindOnce` call creating the callback for `ContinueOnReceiveRedirect`. `SplitOnceCallback` ensures this final callback is invoked exactly once, handling both the asynchronous and synchronous paths cleanly. This removes the need for the temporary map and index members (`on_receive_redirect_responses_`, `next_on_receive_redirect_response_index_`), simplifying state management within the URLLoader class. The signature of `ContinueOnReceiveRedirect` is updated accordingly. Bug: 408106280 Change-Id: Ic0c8b296501b50723db016b761c87502eb68671d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6440527 Commit-Queue: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Kenichi Ishibashi <bashi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1444540}
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.