Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: net/proxy/proxy_list.cc

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed code review comments by asvitkine@. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/proxy/proxy_list.cc
diff --git a/net/proxy/proxy_list.cc b/net/proxy/proxy_list.cc
index 4bbb6bc6a96f2d021c66b76f333b640a405ef5d0..4e689d81cecea75935f024cbfbff79ee753ae52b 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,7 @@ bool ProxyList::Fallback(ProxyRetryInfoMap* proxy_retry_info,
NOTREACHED();
return false;
}
- UpdateRetryInfoOnFallback(proxy_retry_info, base::TimeDelta(), true,
+ UpdateRetryInfoOnFallback(proxy_retry_info, TimeDelta::FromMinutes(5), true,
bengr 2014/07/21 22:45:16 Add a comment that say by default proxies are not
Not at Google. Contact bengr 2014/07/22 00:12:09 Done.
ProxyServer(), net_log);
// Remove this proxy from our list.
@@ -204,18 +203,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());
if (proxies_.empty()) {
NOTREACHED();
return;

Powered by Google App Engine
This is Rietveld 408576698