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

Unified Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 2845643003: Allow ProxyService to share URLRequestContext with everything else. (Closed)
Patch Set: Fix 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 | « no previous file | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | net/proxy/proxy_service.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_script_fetcher_impl.cc
diff --git a/net/proxy/proxy_script_fetcher_impl.cc b/net/proxy/proxy_script_fetcher_impl.cc
index d78c9feb65a5df03252977a2594e24f285fd4cc1..f6395efb2c805c1348c3313d226175d6d09a238b 100644
--- a/net/proxy/proxy_script_fetcher_impl.cc
+++ b/net/proxy/proxy_script_fetcher_impl.cc
@@ -138,8 +138,10 @@ int ProxyScriptFetcherImpl::Fetch(
DCHECK(fetch_start_time_.is_null());
fetch_start_time_ = base::TimeTicks::Now();
+ // Use highest priority, so if socket pools are being used for other types of
+ // requests, PAC requests are aren't blocked on them.
cur_request_ =
- url_request_context_->CreateRequest(url, DEFAULT_PRIORITY, this);
+ url_request_context_->CreateRequest(url, MAXIMUM_PRIORITY, this);
cur_request_->set_method("GET");
// Make sure that the PAC script is downloaded using a direct connection,
@@ -150,9 +152,11 @@ int ProxyScriptFetcherImpl::Fetch(
// If the PAC script is hosted on an HTTPS server we bypass revocation
// checking in order to avoid a circular dependency when attempting to fetch
// the OCSP response or CRL. We could make the revocation check go direct but
- // the proxy might be the only way to the outside world.
+ // the proxy might be the only way to the outside world. IGNORE_LIMITS is
+ // used to avoid blocking proxy resolution on other network requests.
cur_request_->SetLoadFlags(LOAD_BYPASS_PROXY | LOAD_DISABLE_CACHE |
- LOAD_DISABLE_CERT_REVOCATION_CHECKING);
+ LOAD_DISABLE_CERT_REVOCATION_CHECKING |
+ LOAD_IGNORE_LIMITS);
// Save the caller's info for notification on completion.
callback_ = callback;
« no previous file with comments | « no previous file | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | net/proxy/proxy_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698