Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_usage_stats.cc

Issue 473513002: Keep track of network error in ProxyRetryInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor formatting. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (data_reduction_proxy_params_-> 214 if (data_reduction_proxy_params_->
215 AreDataReductionProxiesBypassed(request, NULL)) { 215 AreDataReductionProxiesBypassed(request, NULL)) {
216 RecordBypassedBytes(last_bypass_type_, 216 RecordBypassedBytes(last_bypass_type_,
217 DataReductionProxyUsageStats::NETWORK_ERROR, 217 DataReductionProxyUsageStats::NETWORK_ERROR,
218 content_length); 218 content_length);
219 } 219 }
220 } 220 }
221 221
222 void DataReductionProxyUsageStats::RecordBypassEventHistograms( 222 void DataReductionProxyUsageStats::RecordBypassEventHistograms(
223 const net::ProxyServer& bypassed_proxy, 223 const net::ProxyServer& bypassed_proxy,
224 int net_error, 224 int net_error) const {
225 bool did_fallback) const {
226 DataReductionProxyTypeInfo data_reduction_proxy_info; 225 DataReductionProxyTypeInfo data_reduction_proxy_info;
227 if (data_reduction_proxy_params_->IsDataReductionProxy( 226 if (data_reduction_proxy_params_->IsDataReductionProxy(
228 bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) { 227 bypassed_proxy.host_port_pair(), &data_reduction_proxy_info)) {
229 if (data_reduction_proxy_info.is_ssl) 228 if (data_reduction_proxy_info.is_ssl)
230 return; 229 return;
231 if (!data_reduction_proxy_info.is_fallback) { 230 if (!data_reduction_proxy_info.is_fallback) {
232 RecordDataReductionProxyBypassInfo( 231 RecordDataReductionProxyBypassInfo(
233 true, false, bypassed_proxy, BYPASS_EVENT_TYPE_NETWORK_ERROR); 232 true, false, bypassed_proxy, BYPASS_EVENT_TYPE_NETWORK_ERROR);
234 RecordDataReductionProxyBypassOnNetworkError( 233 RecordDataReductionProxyBypassOnNetworkError(
235 true, bypassed_proxy, net_error); 234 true, bypassed_proxy, net_error);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 default: 347 default:
349 break; 348 break;
350 } 349 }
351 break; 350 break;
352 } 351 }
353 } 352 }
354 353
355 } // namespace data_reduction_proxy 354 } // namespace data_reduction_proxy
356 355
357 356
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698