summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_list.cc
diff options
context:
space:
mode:
authorasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 16:39:00 +0000
committerasanka@chromium.org <asanka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-29 16:39:00 +0000
commit96e1933fd50fb512c5e678169d0d2c59841a7d1a (patch)
treee93a20434f5478025387ca0f022d3f511a9a7bf2 /net/proxy/proxy_list.cc
parent61b75a55cd3366f236584da844cc5f9fd5a37a99 (diff)
downloadchromium_src-96e1933fd50fb512c5e678169d0d2c59841a7d1a.zip
chromium_src-96e1933fd50fb512c5e678169d0d2c59841a7d1a.tar.gz
chromium_src-96e1933fd50fb512c5e678169d0d2c59841a7d1a.tar.bz2
Only mark a proxy as bad if we have confirmation that another proxy succeeded for the same request.
BUG=87336 TEST=net_unittests --gtest_filter=ProxyServiceTest.ProxyFallback:HttpStreamFactoryTest.JobNotifiesProxy Review URL: http://codereview.chromium.org/7532011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98643 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_list.cc')
-rw-r--r--net/proxy/proxy_list.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
index 011aab9..cdc8cc2 100644
--- a/net/proxy/proxy_list.cc
+++ b/net/proxy/proxy_list.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -115,7 +115,8 @@ std::string ProxyList::ToPacString() const {
return proxy_list.empty() ? std::string() : proxy_list;
}
-bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info) {
+bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
+ const BoundNetLog& net_log) {
// Number of minutes to wait before retrying a bad proxy server.
const TimeDelta kProxyRetryDelay = TimeDelta::FromMinutes(5);
@@ -152,6 +153,9 @@ bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info) {
retry_info.bad_until = TimeTicks().Now() + retry_info.current_delay;
(*proxy_retry_info)[key] = retry_info;
}
+ net_log.AddEvent(
+ NetLog::TYPE_PROXY_LIST_FALLBACK,
+ make_scoped_refptr(new NetLogStringParameter("bad_proxy", key)));
}
// Remove this proxy from our list.