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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h

Issue 577343002: 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: 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_usage_stats.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h
index 33fd29e560fa2f533fa044f1c3be60a83537c599..141335baa7577fb6089635ac5e44596750a32cab 100644
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.h
@@ -17,6 +17,7 @@
namespace net {
class ProxyServer;
+class HttpResponseHeaders;
}
namespace data_reduction_proxy {
@@ -33,6 +34,12 @@ class DataReductionProxyUsageStats
const net::ProxyServer& proxy_server,
DataReductionProxyBypassType bypass_type);
+ // For the given response |headers| that are expected to include the data
+ // reduction proxy via header, records response code UMA if the data reduction
+ // proxy via header is not present.
+ static void DetectAndRecordMissingViaHeaderResponseCode(
+ bool is_primary, const net::HttpResponseHeaders* headers);
+
// MessageLoopProxy instance is owned by io_thread. |params| outlives
// this class instance.
DataReductionProxyUsageStats(DataReductionProxyParams* params,
@@ -67,6 +74,11 @@ class DataReductionProxyUsageStats
void RecordBypassEventHistograms(const net::ProxyServer& bypassed_proxy,
int net_error) const;
+ // Records UMA of the number of response bytes of responses that are expected
+ // to have the data reduction proxy via header, but where the data reduction
+ // proxy via header is not present.
+ void RecordMissingViaHeaderBytes(net::URLRequest* request);
+
private:
enum BypassedBytesType {
NOT_BYPASSED = 0, /* Not bypassed. */

Powered by Google App Engine
This is Rietveld 408576698