Chromium Code Reviews| 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 d500301b25c7243dbc140fc831bdd17a5d24a6fb..19635b42189a4f750c5137cb5c75c346f9620247 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 |
| @@ -139,17 +139,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_ != ProxyService::BYPASS_EVENT_TYPE_MAX) { |
| @@ -191,7 +193,7 @@ void DataReductionProxyUsageStats::RecordBypassedBytes( |
| case DataReductionProxyUsageStats::AUDIO_VIDEO: |
| if (last_bypass_type_ == ProxyService::SHORT_BYPASS) { |
| UMA_HISTOGRAM_COUNTS( |
| - "DataReductionProxy.BypassedBytes.ShortAudioVideo", |
| + "DataReductionProxy.BypassedBytes.ShortTriggeringRequestAudioVideo", |
|
Alexei Svitkine (slow)
2014/08/12 14:32:37
Did you mean to not rename this?
megjablon
2014/08/12 16:53:59
Ah sorry didn't mean to send that message yet. I t
|
| content_length); |
| } |
| break; |