| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_sta
ts.h" | 5 #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_sta
ts.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/message_loop/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 if (data_reduction_proxy_params_-> | 216 if (data_reduction_proxy_params_-> |
| 217 AreDataReductionProxiesBypassed(request, NULL)) { | 217 AreDataReductionProxiesBypassed(request, NULL)) { |
| 218 RecordBypassedBytes(last_bypass_type_, | 218 RecordBypassedBytes(last_bypass_type_, |
| 219 DataReductionProxyUsageStats::NETWORK_ERROR, | 219 DataReductionProxyUsageStats::NETWORK_ERROR, |
| 220 content_length); | 220 content_length); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 | 223 |
| 224 void DataReductionProxyUsageStats::RecordBypassEventHistograms( | 224 void DataReductionProxyUsageStats::RecordBypassEventHistograms( |
| 225 const net::ProxyServer& bypassed_proxy, | 225 const net::ProxyServer& bypassed_proxy, |
| 226 int net_error, | 226 int net_error) const { |
| 227 bool did_fallback) const { | |
| 228 DataReductionProxyTypeInfo data_reduction_proxy_info; | 227 DataReductionProxyTypeInfo data_reduction_proxy_info; |
| 229 if (data_reduction_proxy_params_->IsDataReductionProxy( | 228 if (data_reduction_proxy_params_->IsDataReductionProxy( |
| 230 bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) { | 229 bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) { |
| 231 if (data_reduction_proxy_info.is_ssl) | 230 if (data_reduction_proxy_info.is_ssl) |
| 232 return; | 231 return; |
| 233 if (!data_reduction_proxy_info.is_fallback) { | 232 if (!data_reduction_proxy_info.is_fallback) { |
| 234 RecordDataReductionProxyBypassInfo( | 233 RecordDataReductionProxyBypassInfo( |
| 235 true, false, bypassed_proxy, BYPASS_EVENT_TYPE_NETWORK_ERROR); | 234 true, false, bypassed_proxy, BYPASS_EVENT_TYPE_NETWORK_ERROR); |
| 236 RecordDataReductionProxyBypassOnNetworkError( | 235 RecordDataReductionProxyBypassOnNetworkError( |
| 237 true, bypassed_proxy, net_error); | 236 true, bypassed_proxy, net_error); |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 default: | 349 default: |
| 351 break; | 350 break; |
| 352 } | 351 } |
| 353 break; | 352 break; |
| 354 } | 353 } |
| 355 } | 354 } |
| 356 | 355 |
| 357 } // namespace data_reduction_proxy | 356 } // namespace data_reduction_proxy |
| 358 | 357 |
| 359 | 358 |
| OLD | NEW |