summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_info.h
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_info.h
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_info.h')
-rw-r--r--net/proxy/proxy_info.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/proxy/proxy_info.h b/net/proxy/proxy_info.h
index f965e6b..2ff8136 100644
--- a/net/proxy/proxy_info.h
+++ b/net/proxy/proxy_info.h
@@ -9,6 +9,7 @@
#include <string>
#include "net/base/net_export.h"
+#include "net/base/net_log.h"
#include "net/proxy/proxy_config.h"
#include "net/proxy/proxy_list.h"
#include "net/proxy/proxy_retry_info.h"
@@ -86,7 +87,7 @@ class NET_EXPORT ProxyInfo {
// Marks the current proxy as bad. Returns true if there is another proxy
// available to try in proxy list_.
- bool Fallback(ProxyRetryInfoMap* proxy_retry_info);
+ bool Fallback(const BoundNetLog& net_log);
// De-prioritizes the proxies that we have cached as not working, by moving
// them to the end of the proxy list.
@@ -98,10 +99,17 @@ class NET_EXPORT ProxyInfo {
private:
friend class ProxyService;
+ const ProxyRetryInfoMap& proxy_retry_info() const {
+ return proxy_retry_info_;
+ }
+
// The ordered list of proxy servers (including DIRECT attempts) remaining to
// try. If proxy_list_ is empty, then there is nothing left to fall back to.
ProxyList proxy_list_;
+ // List of proxies that have been tried already.
+ ProxyRetryInfoMap proxy_retry_info_;
+
// This value identifies the proxy config used to initialize this object.
ProxyConfig::ID config_id_;
};