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

Unified Diff: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc

Issue 382313003: Add data reduction functionality to all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch to run tests overnight. 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: components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
diff --git a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
index b5c6119080948ba3618b2c0d02b51fcb521eb860..9aec7b21663250139201fc577ed3ea08120031fe 100644
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
@@ -51,7 +51,9 @@ bool GetDataReductionProxyInfo(const net::HttpResponseHeaders* headers,
DataReductionProxyInfo* proxy_info) {
DCHECK(proxy_info);
proxy_info->bypass_all = false;
- proxy_info->bypass_duration = TimeDelta();
+ // Randomize the timeout over a range from one to five minutes.
+ proxy_info->bypass_duration = TimeDelta::FromMilliseconds(
bengr 2014/07/15 16:38:17 This won't work. Leave this one as is and move thi
Not at Google. Contact bengr 2014/07/16 22:41:34 Done.
+ base::RandInt(1 * 60 * 1000, 5 * 60 * 1000));
// Support header of the form Chrome-Proxy: bypass|block=<duration>, where
// <duration> is the number of seconds to wait before retrying
// the proxy. If the duration is 0, then the default proxy retry delay

Powered by Google App Engine
This is Rietveld 408576698