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

Unified Diff: chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)
Patch Set: Fix fetcher shutdown with no active request, add test, add comment 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 | « chromeos/network/dhcp_proxy_script_fetcher_chromeos.h ('k') | net/proxy/dhcp_proxy_script_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc
diff --git a/chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc b/chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc
index d0df7cffaff5ba03ff908b1a02e73a605d50c5e8..7ff446cef894b35c0e84285c46cac47d0f32a05c 100644
--- a/chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc
+++ b/chromeos/network/dhcp_proxy_script_fetcher_chromeos.cc
@@ -33,11 +33,10 @@ std::string GetPacUrlFromDefaultNetwork() {
DhcpProxyScriptFetcherChromeos::DhcpProxyScriptFetcherChromeos(
net::URLRequestContext* url_request_context)
- : url_request_context_(url_request_context),
- weak_ptr_factory_(this) {
- DCHECK(url_request_context_);
+ : weak_ptr_factory_(this) {
+ DCHECK(url_request_context);
proxy_script_fetcher_.reset(
- new net::ProxyScriptFetcherImpl(url_request_context_));
+ new net::ProxyScriptFetcherImpl(url_request_context));
if (NetworkHandler::IsInitialized())
network_handler_task_runner_ = NetworkHandler::Get()->task_runner();
}
@@ -65,6 +64,10 @@ void DhcpProxyScriptFetcherChromeos::Cancel() {
weak_ptr_factory_.InvalidateWeakPtrs();
}
+void DhcpProxyScriptFetcherChromeos::OnShutdown() {
+ proxy_script_fetcher_->OnShutdown();
+}
+
const GURL& DhcpProxyScriptFetcherChromeos::GetPacURL() const {
return pac_url_;
}
« no previous file with comments | « chromeos/network/dhcp_proxy_script_fetcher_chromeos.h ('k') | net/proxy/dhcp_proxy_script_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698