summaryrefslogtreecommitdiffstats
path: root/net/http/http_proxy_service.cc
diff options
context:
space:
mode:
authornsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-29 20:57:35 +0000
committernsylvain@google.com <nsylvain@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-07-29 20:57:35 +0000
commit6be5dd40860ccdb891d18b701716e756ba56e917 (patch)
treea190daf03246d0014fb8d8843bcbefb3b3215c27 /net/http/http_proxy_service.cc
parent27aca5ae73f4d85c84fa8fdbc54e9e4e0d6c82a0 (diff)
downloadchromium_src-6be5dd40860ccdb891d18b701716e756ba56e917.zip
chromium_src-6be5dd40860ccdb891d18b701716e756ba56e917.tar.gz
chromium_src-6be5dd40860ccdb891d18b701716e756ba56e917.tar.bz2
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
Diffstat (limited to 'net/http/http_proxy_service.cc')
-rw-r--r--net/http/http_proxy_service.cc15
1 files changed, 11 insertions, 4 deletions
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.