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

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: Merge to head. 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698