summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-29 21:11:47 +0000
committernsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-29 21:11:47 +0000
commit7523f124f2b43f681b94b8d69d1e61daed806287 (patch)
treef180ee94be63b804e773f44347c5a973be46d443
parent6be5dd40860ccdb891d18b701716e756ba56e917 (diff)
downloadchromium_src-7523f124f2b43f681b94b8d69d1e61daed806287.zip
chromium_src-7523f124f2b43f681b94b8d69d1e61daed806287.tar.gz
chromium_src-7523f124f2b43f681b94b8d69d1e61daed806287.tar.bz2
I submitted this code by mistake in my previous revert.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/http/http_proxy_service.cc15
1 files changed, 4 insertions, 11 deletions
diff --git a/net/http/http_proxy_service.cc b/net/http/http_proxy_service.cc
index e29ae33..d851a6d 100644
--- a/net/http/http_proxy_service.cc
+++ b/net/http/http_proxy_service.cc
@@ -385,6 +385,10 @@ 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.
@@ -394,8 +398,6 @@ 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,
@@ -403,20 +405,11 @@ 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.