Index: components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc |
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc |
index 01fbc1b234bbe5c9f50835465035ce51e345228e..9df505522e8b8c24f476627139585f7f054eca23 100644 |
--- a/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc |
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc |
@@ -191,17 +191,19 @@ void DataReductionProxyUsageStats::RecordBypassedBytesHistograms( |
DataReductionProxyUsageStats::TRIGGERING_REQUEST, |
content_length); |
triggering_request_ = false; |
- } |
- std::string mime_type; |
- request.GetMimeType(&mime_type); |
- // MIME types are named by <media-type>/<subtype>. We check to see if the |
- // media type is audio or video. |
- if (mime_type.compare(0, 6, "audio/") == 0 || |
- mime_type.compare(0, 6, "video/") == 0) { |
- RecordBypassedBytes(last_bypass_type_, |
- DataReductionProxyUsageStats::AUDIO_VIDEO, |
- content_length); |
+ // We only record when audio or video triggers a bypass. We don't care |
+ // about audio and video bypassed as collateral damage. |
+ std::string mime_type; |
+ request.GetMimeType(&mime_type); |
+ // MIME types are named by <media-type>/<subtype>. We check to see if the |
+ // media type is audio or video. |
+ if (mime_type.compare(0, 6, "audio/") == 0 || |
+ mime_type.compare(0, 6, "video/") == 0) { |
+ RecordBypassedBytes(last_bypass_type_, |
+ DataReductionProxyUsageStats::AUDIO_VIDEO, |
+ content_length); |
+ } |
} |
if (last_bypass_type_ != BYPASS_EVENT_TYPE_MAX) { |