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

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

Issue 390533003: Bypassed Bytes UMAs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moving #if defined(SPDY_PROXY_AUTH_ORIGIN) 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..15d35301f390f19d44de969bb7208a787ba03da2 100644
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.cc
@@ -114,6 +114,9 @@ GetDataReductionProxyBypassType(
// A chrome-proxy response header is only present in a 502. For proper
// reporting, this check must come before the 5xx checks below.
const TimeDelta& duration = data_reduction_proxy_info->bypass_duration;
+ // bypass=0 means bypass for a random duration between 1 to 5 minutes
+ if (duration == TimeDelta())
+ return ProxyService::MEDIUM_BYPASS;
if (duration <= TimeDelta::FromSeconds(kShortBypassMaxSeconds))
return ProxyService::SHORT_BYPASS;
if (duration <= TimeDelta::FromSeconds(kMediumBypassMaxSeconds))

Powered by Google App Engine
This is Rietveld 408576698