summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_service.h
diff options
context:
space:
mode:
authoreroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 05:12:47 +0000
committereroman@chromium.org <eroman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 05:12:47 +0000
commit1b8740fcc945425012ecc755987286dd22a098f6 (patch)
tree263ebd87b1ac8b50af8303085043f4bd930bd42f /net/proxy/proxy_service.h
parent924cad8b1c5bccdd34dd02d9391e57e5ed8a0f06 (diff)
downloadchromium_src-1b8740fcc945425012ecc755987286dd22a098f6.zip
chromium_src-1b8740fcc945425012ecc755987286dd22a098f6.tar.gz
chromium_src-1b8740fcc945425012ecc755987286dd22a098f6.tar.bz2
Introduce an artificial 2 second delay after network IP address changes before re-running proxy auto-config.
During this time network requests will be stalled. This is to work around a problem where DNS gives transient failures shortly after IP address changes. BUG=50779 TEST=On a linux laptop switch between wireless networks while using auto-detect. When you switch to a network that contains the host 'wpad' verify that when InitProxyResolver runs it does not get a DNS error resolving 'wpad'. (Use about:net-internals to view this information). Review URL: http://codereview.chromium.org/3151040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/proxy_service.h')
-rw-r--r--net/proxy/proxy_service.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 8f30327..3b61fbb 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -193,6 +193,12 @@ class ProxyService : public base::RefCountedThreadSafe<ProxyService>,
static ProxyConfigService* CreateSystemProxyConfigService(
MessageLoop* io_loop, MessageLoop* file_loop);
+#if UNIT_TEST
+ void set_stall_proxy_auto_config_delay(base::TimeDelta delay) {
+ stall_proxy_auto_config_delay_ = delay;
+ }
+#endif
+
private:
friend class base::RefCountedThreadSafe<ProxyService>;
FRIEND_TEST_ALL_PREFIXES(ProxyServiceTest, UpdateConfigAfterFailedAutodetect);
@@ -302,6 +308,13 @@ class ProxyService : public base::RefCountedThreadSafe<ProxyService>,
// sent to.
NetLog* net_log_;
+ // The earliest time at which we should run any proxy auto-config. (Used to
+ // stall re-configuration following an IP address change).
+ base::TimeTicks stall_proxy_autoconfig_until_;
+
+ // The amount of time to stall requests following IP address changes.
+ base::TimeDelta stall_proxy_auto_config_delay_;
+
DISALLOW_COPY_AND_ASSIGN(ProxyService);
};