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 (bypassed_proxy.is_valid() && !bypassed_proxy.is_direct() && | 228 if (bypassed_proxy.is_valid() && !bypassed_proxy.is_direct() && |
230 data_reduction_proxy_params_->IsDataReductionProxy( | 229 data_reduction_proxy_params_->IsDataReductionProxy( |
231 bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) { | 230 bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) { |
232 if (data_reduction_proxy_info.is_ssl) | 231 if (data_reduction_proxy_info.is_ssl) |
233 return; | 232 return; |
234 if (!data_reduction_proxy_info.is_fallback) { | 233 if (!data_reduction_proxy_info.is_fallback) { |
235 RecordDataReductionProxyBypassInfo( | 234 RecordDataReductionProxyBypassInfo( |
236 true, false, bypassed_proxy, BYPASS_EVENT_TYPE_NETWORK_ERROR); | 235 true, false, bypassed_proxy, BYPASS_EVENT_TYPE_NETWORK_ERROR); |
237 RecordDataReductionProxyBypassOnNetworkError( | 236 RecordDataReductionProxyBypassOnNetworkError( |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 default: | 350 default: |
352 break; | 351 break; |
353 } | 352 } |
354 break; | 353 break; |
355 } | 354 } |
356 } | 355 } |
357 | 356 |
358 } // namespace data_reduction_proxy | 357 } // namespace data_reduction_proxy |
359 | 358 |
360 | 359 |
OLD | NEW |