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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 last_bypass_type_ = type; | 158 last_bypass_type_ = type; |
159 triggering_request_ = true; | 159 triggering_request_ = true; |
160 } | 160 } |
161 | 161 |
162 void DataReductionProxyUsageStats::RecordBypassedBytesHistograms( | 162 void DataReductionProxyUsageStats::RecordBypassedBytesHistograms( |
163 net::URLRequest& request, | 163 net::URLRequest& request, |
164 const BooleanPrefMember& data_reduction_proxy_enabled, | 164 const BooleanPrefMember& data_reduction_proxy_enabled, |
165 const net::ProxyConfig& data_reduction_proxy_config) { | 165 const net::ProxyConfig& data_reduction_proxy_config) { |
166 int64 content_length = request.received_response_content_length(); | 166 int64 content_length = request.received_response_content_length(); |
167 | 167 |
168 if (data_reduction_proxy_enabled.GetValue()) { | |
169 LOG(WARNING) << "managed pac: " << (!data_reduction_proxy_config.Equals( | |
170 request.context()->proxy_service()->config()) ? "true" : "false"); | |
171 } | |
172 | |
173 if (data_reduction_proxy_enabled.GetValue() && | 168 if (data_reduction_proxy_enabled.GetValue() && |
174 !data_reduction_proxy_config.Equals( | 169 !data_reduction_proxy_config.Equals( |
175 request.context()->proxy_service()->config())) { | 170 request.context()->proxy_service()->config())) { |
176 RecordBypassedBytes(last_bypass_type_, | 171 RecordBypassedBytes(last_bypass_type_, |
177 DataReductionProxyUsageStats::MANAGED_PROXY_CONFIG, | 172 DataReductionProxyUsageStats::MANAGED_PROXY_CONFIG, |
178 content_length); | 173 content_length); |
179 return; | 174 return; |
180 } | 175 } |
181 | 176 |
182 if (data_reduction_proxy_params_->WasDataReductionProxyUsed(&request, NULL)) { | 177 if (data_reduction_proxy_params_->WasDataReductionProxyUsed(&request, NULL)) { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 default: | 369 default: |
375 break; | 370 break; |
376 } | 371 } |
377 break; | 372 break; |
378 } | 373 } |
379 } | 374 } |
380 | 375 |
381 } // namespace data_reduction_proxy | 376 } // namespace data_reduction_proxy |
382 | 377 |
383 | 378 |
OLD | NEW |