Index: net/proxy/proxy_list.cc |
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc |
index 4bbb6bc6a96f2d021c66b76f333b640a405ef5d0..2becc8dff64693445ab68a7107fd576825821443 100644 |
--- a/net/proxy/proxy_list.cc |
+++ b/net/proxy/proxy_list.cc |
@@ -6,7 +6,6 @@ |
#include "base/callback.h" |
#include "base/logging.h" |
-#include "base/rand_util.h" |
#include "base/strings/string_tokenizer.h" |
#include "base/time/time.h" |
#include "base/values.h" |
@@ -167,7 +166,8 @@ bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info, |
NOTREACHED(); |
return false; |
} |
- UpdateRetryInfoOnFallback(proxy_retry_info, base::TimeDelta(), true, |
+ // By default, proxies are not retried for 5 minutes. |
+ UpdateRetryInfoOnFallback(proxy_retry_info, TimeDelta::FromMinutes(5), true, |
ProxyServer(), net_log); |
Ryan Sleevi
2014/07/22 08:22:25
This needs to be separated and dealt with first, i
Not at Google. Contact bengr
2014/07/22 23:03:53
I am isolating this to a separate cl. Will send it
|
// Remove this proxy from our list. |
@@ -204,18 +204,7 @@ void ProxyList::UpdateRetryInfoOnFallback( |
bool reconsider, |
const ProxyServer& another_proxy_to_bypass, |
const BoundNetLog& net_log) const { |
- // Time to wait before retrying a bad proxy server. |
- if (retry_delay == base::TimeDelta()) { |
-#if defined(SPDY_PROXY_AUTH_ORIGIN) |
- // Randomize the timeout over a range from one to five minutes. |
- retry_delay = |
- TimeDelta::FromMilliseconds( |
- base::RandInt(1 * 60 * 1000, 5 * 60 * 1000)); |
-#else |
- retry_delay = TimeDelta::FromMinutes(5); |
-#endif |
- } |
- |
+ DCHECK(retry_delay != base::TimeDelta()); |
Ryan Sleevi
2014/07/22 01:56:31
No documentation/comment that I can tell why you'r
Not at Google. Contact bengr
2014/07/22 23:03:53
We randomize the duration for data reduction proxy
|
if (proxies_.empty()) { |
NOTREACHED(); |
return; |