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. */ |