| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 bypass_type, BYPASS_EVENT_TYPE_MAX); | 67 bypass_type, BYPASS_EVENT_TYPE_MAX); |
| 68 } else { | 68 } else { |
| 69 UMA_HISTOGRAM_ENUMERATION("DataReductionProxy.BypassTypeFallback", | 69 UMA_HISTOGRAM_ENUMERATION("DataReductionProxy.BypassTypeFallback", |
| 70 bypass_type, BYPASS_EVENT_TYPE_MAX); | 70 bypass_type, BYPASS_EVENT_TYPE_MAX); |
| 71 } | 71 } |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 | 74 |
| 75 DataReductionProxyUsageStats::DataReductionProxyUsageStats( | 75 DataReductionProxyUsageStats::DataReductionProxyUsageStats( |
| 76 DataReductionProxyParams* params, | 76 DataReductionProxyParams* params, |
| 77 MessageLoopProxy* ui_thread_proxy) | 77 const scoped_refptr<MessageLoopProxy>& ui_thread_proxy) |
| 78 : data_reduction_proxy_params_(params), | 78 : data_reduction_proxy_params_(params), |
| 79 last_bypass_type_(BYPASS_EVENT_TYPE_MAX), | 79 last_bypass_type_(BYPASS_EVENT_TYPE_MAX), |
| 80 triggering_request_(true), | 80 triggering_request_(true), |
| 81 ui_thread_proxy_(ui_thread_proxy), | 81 ui_thread_proxy_(ui_thread_proxy), |
| 82 eligible_num_requests_through_proxy_(0), | 82 eligible_num_requests_through_proxy_(0), |
| 83 actual_num_requests_through_proxy_(0), | 83 actual_num_requests_through_proxy_(0), |
| 84 unavailable_(false) { | 84 unavailable_(false) { |
| 85 NetworkChangeNotifier::AddNetworkChangeObserver(this); | 85 NetworkChangeNotifier::AddNetworkChangeObserver(this); |
| 86 }; | 86 }; |
| 87 | 87 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 default: | 369 default: |
| 370 break; | 370 break; |
| 371 } | 371 } |
| 372 break; | 372 break; |
| 373 } | 373 } |
| 374 } | 374 } |
| 375 | 375 |
| 376 } // namespace data_reduction_proxy | 376 } // namespace data_reduction_proxy |
| 377 | 377 |
| 378 | 378 |
| OLD | NEW |