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

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)

Created:
3 years, 8 months ago by mmenke
Modified:
3 years, 7 months ago
Reviewers:
stevenjb, eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow ProxyService to share URLRequestContext with everything else. This CL makes ProxyScriptFetcherImpl use highest priority and LOAD_IGNORE_LIMITS, and adds an OnShutdown method to ProxyService, which must be called before teardown when the ProxyService makes requests using a URLRequestContext that it is also used with. No consumer currently uses the new functionality. I plan to switch IOThread/ProfileIOData to using it in another CL, and add a call in URLRequestContextStorage's destructor. May also be worth making it mandatory as well, though that will involve more changes. BUG=715697 Review-Url: https://codereview.chromium.org/2845643003 Cr-Commit-Position: refs/heads/master@{#469005} Committed: https://chromium.googlesource.com/chromium/src/+/ed8d7e4383d5dbf7e94291b7960b5a4616b4a45e

Patch Set 1 #

Patch Set 2 : Fix #

Total comments: 6

Patch Set 3 : Purge and reupload, to get rid of bogus binary file designation #

Patch Set 4 : Fix test #

Total comments: 2

Patch Set 5 : Fix Chromeos #

Patch Set 6 : Merge #

Patch Set 7 : Merge #

Total comments: 2

Patch Set 8 : Fix fetcher shutdown with no active request, add test, add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+386 lines, -30 lines) Patch
M chromeos/network/dhcp_proxy_script_fetcher_chromeos.h View 1 2 2 chunks +1 line, -1 line 0 comments Download
M chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher.h View 1 2 2 chunks +6 lines, -0 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win.cc View 1 2 2 chunks +20 lines, -0 lines 0 comments Download
M net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc View 1 2 2 chunks +27 lines, -0 lines 0 comments Download
M net/proxy/mock_proxy_script_fetcher.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M net/proxy/mock_proxy_script_fetcher.cc View 1 2 4 chunks +17 lines, -5 lines 0 comments Download
M net/proxy/proxy_script_decider.h View 1 2 2 chunks +4 lines, -1 line 0 comments Download
M net/proxy/proxy_script_decider.cc View 1 2 6 chunks +29 lines, -11 lines 0 comments Download
M net/proxy/proxy_script_decider_unittest.cc View 1 2 3 8 chunks +21 lines, -1 line 0 comments Download
M net/proxy/proxy_script_fetcher.h View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl.h View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl.cc View 1 2 3 4 5 6 7 5 chunks +20 lines, -4 lines 0 comments Download
M net/proxy/proxy_script_fetcher_impl_unittest.cc View 1 2 3 4 5 6 7 4 chunks +114 lines, -0 lines 0 comments Download
M net/proxy/proxy_service.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M net/proxy/proxy_service.cc View 1 2 3 4 5 6 7 2 chunks +17 lines, -0 lines 0 comments Download
M net/proxy/proxy_service_unittest.cc View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
M net/test/embedded_test_server/default_handlers.cc View 2 chunks +20 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 69 (49 generated)
mmenke
[eroman]: Is this a reasonable approach? Adding a new state mostly just magically works, since ...
3 years, 8 months ago (2017-04-26 20:56:59 UTC) #8
mmenke
https://codereview.chromium.org/2845643003/diff/20001/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): https://codereview.chromium.org/2845643003/diff/20001/net/proxy/proxy_service.cc#newcode1454 net/proxy/proxy_service.cc:1454: std::unique_ptr<DhcpProxyScriptFetcher> dhcp_proxy_script_fetcher) { Another option would be to just ...
3 years, 7 months ago (2017-04-27 18:37:32 UTC) #11
eroman
https://codereview.chromium.org/2845643003/diff/20001/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): https://codereview.chromium.org/2845643003/diff/20001/net/proxy/proxy_service.cc#newcode1466 net/proxy/proxy_service.cc:1466: // Cancel up in progress work, and destroy all ...
3 years, 7 months ago (2017-04-27 19:35:42 UTC) #12
mmenke
https://codereview.chromium.org/2845643003/diff/20001/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): https://codereview.chromium.org/2845643003/diff/20001/net/proxy/proxy_service.cc#newcode1466 net/proxy/proxy_service.cc:1466: // Cancel up in progress work, and destroy all ...
3 years, 7 months ago (2017-04-27 20:02:13 UTC) #13
eroman
Passing the URLRequestContext parameter was just a defense in depth kind of thing in case ...
3 years, 7 months ago (2017-04-27 20:07:40 UTC) #14
mmenke
On 2017/04/27 20:07:40, eroman wrote: > Passing the URLRequestContext parameter was just a defense in ...
3 years, 7 months ago (2017-04-27 20:10:40 UTC) #15
mmenke
What do you think of this approach? I haven't written tests for it, just want ...
3 years, 7 months ago (2017-04-27 22:32:54 UTC) #17
eroman
Thanks! Yes, that approach looks better to me.
3 years, 7 months ago (2017-04-28 18:39:16 UTC) #18
mmenke
On 2017/04/28 18:39:16, eroman wrote: > Thanks! Yes, that approach looks better to me. Thanks ...
3 years, 7 months ago (2017-04-28 18:43:21 UTC) #19
eroman
I don't think consistency is terribly important for hang vs fail. My preference is for ...
3 years, 7 months ago (2017-04-28 19:05:20 UTC) #20
mmenke
On 2017/04/28 19:05:20, eroman wrote: > I don't think consistency is terribly important for hang ...
3 years, 7 months ago (2017-04-28 19:08:29 UTC) #21
mmenke
Ok, think this is finally ready for review. https://codereview.chromium.org/2845643003/diff/160001/net/proxy/proxy_script_decider.cc File net/proxy/proxy_script_decider.cc (right): https://codereview.chromium.org/2845643003/diff/160001/net/proxy/proxy_script_decider.cc#newcode480 net/proxy/proxy_script_decider.cc:480: request_.reset(); ...
3 years, 7 months ago (2017-05-01 16:52:14 UTC) #36
eroman
lgtm https://codereview.chromium.org/2845643003/diff/220001/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): https://codereview.chromium.org/2845643003/diff/220001/net/proxy/proxy_service.cc#newcode1473 net/proxy/proxy_service.cc:1473: dhcp_proxy_script_fetcher_->OnShutdown(); Does the order of shutdown calls matter?
3 years, 7 months ago (2017-05-02 17:49:20 UTC) #47
mmenke
https://codereview.chromium.org/2845643003/diff/220001/net/proxy/proxy_service.cc File net/proxy/proxy_service.cc (right): https://codereview.chromium.org/2845643003/diff/220001/net/proxy/proxy_service.cc#newcode1473 net/proxy/proxy_service.cc:1473: dhcp_proxy_script_fetcher_->OnShutdown(); On 2017/05/02 17:49:20, eroman wrote: > Does the ...
3 years, 7 months ago (2017-05-02 17:57:36 UTC) #48
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/2845643003/260001
3 years, 7 months ago (2017-05-02 20:04:47 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/425608)
3 years, 7 months ago (2017-05-02 20:14:51 UTC) #60
mmenke
[+stevenjb]: Please review chromeos/network/dhcp_proxy_script_fetcher_chromeos.*. There aren't any tests for that change, but I didn't see ...
3 years, 7 months ago (2017-05-02 20:26:18 UTC) #62
stevenjb
lgtm
3 years, 7 months ago (2017-05-02 20:28:28 UTC) #63
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/2845643003/260001
3 years, 7 months ago (2017-05-03 16:42:17 UTC) #66
commit-bot: I haz the power
3 years, 7 months ago (2017-05-03 16:48:56 UTC) #69
Message was sent while issue was closed.
Committed patchset #8 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/ed8d7e4383d5dbf7e94291b7960b...

Powered by Google App Engine
This is Rietveld 408576698