Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Issue 2968293002: Introduce SystemNetworkContextManager. (Closed)

Created:
3 years, 5 months ago by mmenke
Modified:
3 years, 5 months ago
CC:
chromium-reviews, asanka, cbentzel+watch_chromium.org, eroman, jam, net-reviews_chromium.org, kinuko, bnc+watch_chromium.org, darin-cc_chromium.org, rdsmith+watch_chromium.org, loading-reviews_chromium.org, Randy Smith (Not in Mondays)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce SystemNetworkContextManager. The new class provides access to the SystemURLRequestContext via an in-process NetworkService and the NetworkContext Mojo API. Eventually, we should remove IOThread entirely, and have the SystemNetworkContextManager perform all configuration of the SystemRequestContext, and provide access to it as well. The in-process network service currently just takes a URLRequestContextBuilder from IOThread and uses that to create the URLRequestContext, but this gives us a path to switch over configuration so that it goes through the NetworkService API. It also lets us switch consumers over to using the NetworkContext API without having to create a wrapper that supports both the shiny new Mojo API the legacy one. When network service is enabled, the SystemNetworkContextManager will use an out-of-process URLRequestContext instead of an in-process one, while the IOThread will continue to use an in-process ones. BUG=715695 Review-Url: https://codereview.chromium.org/2968293002 Cr-Commit-Position: refs/heads/master@{#486527} Committed: https://chromium.googlesource.com/chromium/src/+/f73a51226b54539fc543cbb29784ab036b76dc40

Patch Set 1 #

Patch Set 2 : Fix OOP NetworkService case #

Patch Set 3 : Fix DEPS, includes, add comments, small API change #

Patch Set 4 : Small fixes #

Patch Set 5 : Fix windows non-component build (??) #

Total comments: 26

Patch Set 6 : Response to comments #

Total comments: 4

Patch Set 7 : Response to comments #

Patch Set 8 : Merge #

Total comments: 10

Patch Set 9 : Response to comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+552 lines, -615 lines) Patch
M chrome/browser/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/DEPS View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/io_thread.h View 1 2 3 4 5 6 7 8 4 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/io_thread.cc View 1 2 3 4 5 6 7 8 7 chunks +42 lines, -31 lines 0 comments Download
A chrome/browser/net/system_network_context_manager.h View 1 2 3 4 5 6 7 8 1 chunk +72 lines, -0 lines 0 comments Download
A chrome/browser/net/system_network_context_manager.cc View 1 2 3 4 5 6 7 8 1 chunk +63 lines, -0 lines 0 comments Download
A chrome/browser/net/system_network_context_manager_browsertest.cc View 1 2 3 4 5 6 7 8 1 chunk +91 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/BUILD.gn View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/blob_storage/blob_url_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/DEPS View 1 2 5 chunks +2 lines, -10 lines 0 comments Download
M content/browser/loader/mojo_async_resource_handler_unittest.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
D content/browser/loader/test_url_loader_client.h View 1 chunk +0 lines, -134 lines 0 comments Download
D content/browser/loader/test_url_loader_client.cc View 1 chunk +0 lines, -196 lines 0 comments Download
M content/browser/loader/url_loader_factory_impl_unittest.cc View 1 2 2 chunks +1 line, -1 line 0 comments Download
M content/browser/storage_partition_impl.cc View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -11 lines 0 comments Download
M content/network/BUILD.gn View 1 2 3 4 2 chunks +3 lines, -2 lines 0 comments Download
M content/network/DEPS View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/network/network_context.h View 3 chunks +12 lines, -4 lines 0 comments Download
M content/network/network_context.cc View 3 chunks +14 lines, -2 lines 0 comments Download
D content/network/network_service.h View 1 chunk +0 lines, -70 lines 0 comments Download
D content/network/network_service.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -105 lines 0 comments Download
A + content/network/network_service_impl.h View 1 2 3 4 5 3 chunks +22 lines, -12 lines 0 comments Download
A + content/network/network_service_impl.cc View 1 2 3 4 5 6 7 5 chunks +39 lines, -16 lines 0 comments Download
M content/network/network_service_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/network/url_loader_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/public/browser/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
A content/public/browser/network_service_instance.h View 1 2 3 4 5 1 chunk +23 lines, -0 lines 0 comments Download
A content/public/browser/network_service_instance.cc View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
A content/public/network/BUILD.gn View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A content/public/network/DEPS View 1 chunk +5 lines, -0 lines 0 comments Download
A content/public/network/network_service.h View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
A + content/public/test/test_url_loader_client.h View 1 2 3 4 5 3 chunks +4 lines, -6 lines 0 comments Download
A + content/public/test/test_url_loader_client.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -2 lines 0 comments Download
M content/utility/utility_service_factory.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 74 (54 generated)
mmenke
[jam]: PTAL [asanka]: Assume you don't know any of this code too well, but I'd ...
3 years, 5 months ago (2017-07-07 20:51:54 UTC) #28
mmenke
https://codereview.chromium.org/2968293002/diff/110001/content/public/browser/network_service_instance.h File content/public/browser/network_service_instance.h (right): https://codereview.chromium.org/2968293002/diff/110001/content/public/browser/network_service_instance.h#newcode19 content/public/browser/network_service_instance.h:19: CONTENT_EXPORT mojom::NetworkService* GetNetworkService(); On 2017/07/07 20:51:53, mmenke wrote: > ...
3 years, 5 months ago (2017-07-07 20:56:55 UTC) #30
jam
nice, mostly one comment re future plans with OOP/in-process network service https://codereview.chromium.org/2968293002/diff/110001/chrome/browser/DEPS File chrome/browser/DEPS (right): ...
3 years, 5 months ago (2017-07-08 01:30:08 UTC) #33
mmenke
Quick response to the "OOP NetworkService" comments - in this patch, IOThread instantiates a NetworkService ...
3 years, 5 months ago (2017-07-08 01:53:56 UTC) #34
Randy Smith (Not in Mondays)
https://codereview.chromium.org/2968293002/diff/110001/content/public/network/network_service.h File content/public/network/network_service.h (right): https://codereview.chromium.org/2968293002/diff/110001/content/public/network/network_service.h#newcode21 content/public/network/network_service.h:21: // Allows an in-process NetworkService to be set up. ...
3 years, 5 months ago (2017-07-08 22:58:50 UTC) #36
kinuko
(Trying to learn the code around this) https://codereview.chromium.org/2968293002/diff/110001/chrome/browser/net/system_network_context_manager.cc File chrome/browser/net/system_network_context_manager.cc (right): https://codereview.chromium.org/2968293002/diff/110001/chrome/browser/net/system_network_context_manager.cc#newcode58 chrome/browser/net/system_network_context_manager.cc:58: // Initialize() ...
3 years, 5 months ago (2017-07-10 08:10:33 UTC) #38
mmenke
Thanks for the feedback! https://codereview.chromium.org/2968293002/diff/110001/chrome/browser/DEPS File chrome/browser/DEPS (right): https://codereview.chromium.org/2968293002/diff/110001/chrome/browser/DEPS#newcode91 chrome/browser/DEPS:91: # Allow in-proces network service. ...
3 years, 5 months ago (2017-07-10 15:52:23 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2968293002/150001
3 years, 5 months ago (2017-07-10 15:52:43 UTC) #43
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. CQ run can only be started once the ...
3 years, 5 months ago (2017-07-10 15:52:46 UTC) #45
mmenke
On 2017/07/10 15:52:46, commit-bot: I haz the power wrote: > No L-G-T-M from a valid ...
3 years, 5 months ago (2017-07-10 15:53:29 UTC) #48
jam
lgtm
3 years, 5 months ago (2017-07-10 19:17:25 UTC) #51
kinuko
Some nits, and supplemental lgtm. Looks sensible to me. https://codereview.chromium.org/2968293002/diff/150001/chrome/browser/io_thread.h File chrome/browser/io_thread.h (right): https://codereview.chromium.org/2968293002/diff/150001/chrome/browser/io_thread.h#newcode134 chrome/browser/io_thread.h:134: ...
3 years, 5 months ago (2017-07-11 08:26:41 UTC) #52
mmenke
Thanks! https://codereview.chromium.org/2968293002/diff/150001/chrome/browser/io_thread.h File chrome/browser/io_thread.h (right): https://codereview.chromium.org/2968293002/diff/150001/chrome/browser/io_thread.h#newcode134 chrome/browser/io_thread.h:134: // the actual network service is disabled. On ...
3 years, 5 months ago (2017-07-11 18:36:26 UTC) #53
mmenke
asanka: Friendly ping.
3 years, 5 months ago (2017-07-12 20:16:01 UTC) #62
asanka
LGTM % nits. It took me a while to come up to speed on mojo ...
3 years, 5 months ago (2017-07-13 01:52:29 UTC) #63
mmenke
Going to land this as-is, but I think I'll switch this from a singleton to ...
3 years, 5 months ago (2017-07-13 16:15:18 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2968293002/210001
3 years, 5 months ago (2017-07-13 16:15:58 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/220118)
3 years, 5 months ago (2017-07-13 18:38:31 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2968293002/210001
3 years, 5 months ago (2017-07-13 18:40:29 UTC) #71
commit-bot: I haz the power
3 years, 5 months ago (2017-07-13 23:28:02 UTC) #74
Message was sent while issue was closed.
Committed patchset #9 (id:210001) as
https://chromium.googlesource.com/chromium/src/+/f73a51226b54539fc543cbb29784...

Powered by Google App Engine
This is Rietveld 408576698