From 6be5dd40860ccdb891d18b701716e756ba56e917 Mon Sep 17 00:00:00 2001 From: "nsylvain@google.com" Date: Tue, 29 Jul 2008 20:57:35 +0000 Subject: Reverting revision 70, 66 and 65 to fix crashes. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_proxy_service.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'net/http') diff --git a/net/http/http_proxy_service.cc b/net/http/http_proxy_service.cc index d851a6d..e29ae33 100644 --- a/net/http/http_proxy_service.cc +++ b/net/http/http_proxy_service.cc @@ -385,10 +385,6 @@ int HttpProxyService::ReconsiderProxyAfterError(const GURL& url, HttpProxyInfo* result, CompletionCallback* callback, PacRequest** pac_request) { - bool was_direct = result->is_direct(); - if (!was_direct && result->Fallback(&http_proxy_retry_info_)) - return OK; - // Check to see if we have a new config since ResolveProxy was called. We // want to re-run ResolveProxy in two cases: 1) we have a new config, or 2) a // direct connection failed and we never tried the current config. @@ -398,6 +394,8 @@ int HttpProxyService::ReconsiderProxyAfterError(const GURL& url, UpdateConfig(); if (result->config_id_ != config_.id()) { // A new configuration! + // We can forget about the bad proxies now. + http_proxy_retry_info_.clear(); re_resolve = true; } else if (!result->config_was_tried_) { // We never tried the proxy configuration since we thought it was bad, @@ -405,11 +403,20 @@ int HttpProxyService::ReconsiderProxyAfterError(const GURL& url, // configuration again to see if it will work now. config_is_bad_ = false; re_resolve = true; + + // Clear the map of bad proxies. + http_proxy_retry_info_.clear(); } } if (re_resolve) return ResolveProxy(url, result, callback, pac_request); + // We don't have new proxy settings to try, fallback to the next proxy + // in the list. + bool was_direct = result->is_direct(); + if (!was_direct && result->Fallback(&http_proxy_retry_info_)) + return OK; + if (!config_.auto_detect && !config_.proxy_server.empty()) { // If auto detect is on, then we should try a DIRECT connection // as the attempt to reach the proxy failed. -- cgit v1.1