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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc

Issue 602503002: Adds UMA to measure when the data reduction proxy via header is missing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove DCHECKs from tests Created 6 years, 3 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/browser/data_reduction_proxy_protocol.cc
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
index 565621d6af42db561f6a429383c5aabe4f60860a..b638c2cfe5fa5a1f27604bae2c1553d7d33f4ccb 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.cc
@@ -65,6 +65,12 @@ bool MaybeBypassProxyAndPrepareToRetry(
if (data_reduction_proxy_type_info.proxy_servers.first.is_empty())
return false;
+ // At this point, the response is expected to have the data reduction proxy
+ // via header, so detect and report cases where the via header is missing.
+ DataReductionProxyUsageStats::DetectAndRecordMissingViaHeaderResponseCode(
+ !data_reduction_proxy_type_info.proxy_servers.second.is_empty(),
+ original_response_headers);
+
DataReductionProxyTamperDetection::DetectAndReport(
original_response_headers,
data_reduction_proxy_type_info.proxy_servers.first.SchemeIsSecure());

Powered by Google App Engine
This is Rietveld 408576698