commit | 452dc0294b31d1b1d00b4e96c6fee72a7a05cb88 | [log] [tgz] |
---|---|---|
author | Tsuyoshi Horo <horo@chromium.org> | Tue May 13 07:38:52 2025 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue May 13 07:38:52 2025 |
tree | 186d88e07f07f4eddeda17283829e1a7deb1bd00 | |
parent | 7ba697b9c6525c37059f390f0f4c2349967323c6 [diff] |
Refactor HttpTransactionFactory::CreateTransaction to return unique_ptr Make HttpTransactionFactory::CreateTransaction infallible for operational errors and have it return std::unique_ptr<HttpTransaction> directly, removing the int error code. This change would simplify the design of new HttpCache transactions. Previously, errors like ERR_NETWORK_IO_SUSPENDED (during system suspend) were returned by HttpNetworkLayer::CreateTransaction. Now, such errors are handled within HttpNetworkTransaction::Start(), which checks the HttpNetworkSession's suspend state. Power suspend/resume logic has been centralized in HttpNetworkSession. Key impacts: - CreateTransaction implementations are updated to the new signature. - Callers now use the directly returned unique_ptr, often with CHECK(), as the factory method itself is not expected to fail for these reasons. - Tests are adapted to reflect the new error handling points and factory signature. Change-Id: Ic90753ae0e2651524e02694916721acd9aefbeeb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6498629 Commit-Queue: Tsuyoshi Horo <horo@chromium.org> Reviewed-by: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/main@{#1459268}
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.