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

Unified Diff: net/proxy/proxy_service.cc

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)
Patch Set: Merge Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.cc
diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc
index a81d3f66bc7547e22e813ff62ec94e9c0dd72e7d..133cfc2fc97f8bfec9f558a799baec1bb97ce418 100644
--- a/net/proxy/proxy_service.cc
+++ b/net/proxy/proxy_service.cc
@@ -456,6 +456,12 @@ class ProxyService::InitProxyResolver {
return LOAD_STATE_RESOLVING_PROXY_FOR_URL;
}
+ // This must be called before the HostResolver is torn down.
+ void OnShutdown() {
+ if (decider_)
+ decider_->OnShutdown();
+ }
+
void set_quick_check_enabled(bool enabled) { quick_check_enabled_ = enabled; }
bool quick_check_enabled() const { return quick_check_enabled_; }
@@ -1458,6 +1464,15 @@ void ProxyService::SetProxyScriptFetchers(
ApplyProxyConfigIfAvailable();
}
+void ProxyService::OnShutdown() {
+ if (init_proxy_resolver_)
+ init_proxy_resolver_->OnShutdown();
+ if (proxy_script_fetcher_)
+ proxy_script_fetcher_->OnShutdown();
+ if (dhcp_proxy_script_fetcher_)
+ dhcp_proxy_script_fetcher_->OnShutdown();
eroman 2017/05/02 17:49:20 Does the order of shutdown calls matter?
mmenke 2017/05/02 17:57:36 Not for correctness. Just for test coverage, I pu
+}
+
ProxyScriptFetcher* ProxyService::GetProxyScriptFetcher() const {
DCHECK(CalledOnValidThread());
return proxy_script_fetcher_.get();
« no previous file with comments | « net/proxy/proxy_service.h ('k') | net/proxy/proxy_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698