Chromium Code Reviews| Index: net/proxy/proxy_service.cc |
| diff --git a/net/proxy/proxy_service.cc b/net/proxy/proxy_service.cc |
| index cd6e376be5299c05af52adcad7631eb14a38a358..4c898218aa4250119aaf4c13b41916749ac80804 100644 |
| --- a/net/proxy/proxy_service.cc |
| +++ b/net/proxy/proxy_service.cc |
| @@ -843,6 +843,24 @@ class ProxyService::PacRequest |
| config_id_ = ProxyConfig::kInvalidConfigID; |
| config_source_ = PROXY_CONFIG_SOURCE_UNKNOWN; |
| + // If the PAC script failed fatally, it needs to be reloaded. Currently, |
|
eroman
2015/03/11 18:48:36
This change would best be proposed as a separate c
Anand Mistry (off Chromium)
2015/03/12 05:10:22
I've removed this from this CL. So out-of-process
|
| + // this only applies to out-of-process proxy resolution and only happens |
| + // when the process crashes. |
| + if (result_code == ERR_PAC_SCRIPT_TERMINATED) { |
| + VLOG(1) << "Detected PAC script terminated. Resetting proxy config."; |
| + // Reset the proxy config. |
| + // REVIEWERS: Should the fetched proxy config be reset? |
| + service_->ResetProxyConfig(false); |
| + |
| + // If there are any pending requests, excluding this one, re-start the |
| + // config fetch/apply process. |
| + size_t pending_requests = service_->NumPendingRequests(); |
| + if (pending_requests > 1 || |
| + (pending_requests && !service_->ContainsPendingRequest(this))) { |
| + service_->ApplyProxyConfigIfAvailable(); |
| + } |
| + } |
| + |
| return rv; |
| } |
| @@ -1338,6 +1356,10 @@ void ProxyService::RemovePendingRequest(PacRequest* req) { |
| pending_requests_.erase(it); |
| } |
| +size_t ProxyService::NumPendingRequests() const { |
| + return pending_requests_.size(); |
|
eroman
2015/03/11 18:48:36
Not needed per discussion above.
Anand Mistry (off Chromium)
2015/03/12 05:10:22
Done.
|
| +} |
| + |
| int ProxyService::DidFinishResolvingProxy(const GURL& url, |
| int load_flags, |
| NetworkDelegate* network_delegate, |