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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/net/chrome_network_delegate.h" 5 #include "chrome/browser/net/chrome_network_delegate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 if (!on_resolve_proxy_handler_.is_null() && 436 if (!on_resolve_proxy_handler_.is_null() &&
437 !proxy_config_getter_.is_null()) { 437 !proxy_config_getter_.is_null()) {
438 on_resolve_proxy_handler_.Run(url, load_flags, 438 on_resolve_proxy_handler_.Run(url, load_flags,
439 proxy_config_getter_.Run(), 439 proxy_config_getter_.Run(),
440 proxy_service.proxy_retry_info(), 440 proxy_service.proxy_retry_info(),
441 data_reduction_proxy_params_, result); 441 data_reduction_proxy_params_, result);
442 } 442 }
443 } 443 }
444 444
445 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy, 445 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy,
446 int net_error, 446 int net_error) {
447 bool did_fallback) {
448 if (data_reduction_proxy_usage_stats_) { 447 if (data_reduction_proxy_usage_stats_) {
449 data_reduction_proxy_usage_stats_->RecordBypassEventHistograms( 448 data_reduction_proxy_usage_stats_->RecordBypassEventHistograms(
450 bad_proxy, net_error, did_fallback); 449 bad_proxy, net_error);
451 } 450 }
452 } 451 }
453 452
454 int ChromeNetworkDelegate::OnBeforeSendHeaders( 453 int ChromeNetworkDelegate::OnBeforeSendHeaders(
455 net::URLRequest* request, 454 net::URLRequest* request,
456 const net::CompletionCallback& callback, 455 const net::CompletionCallback& callback,
457 net::HttpRequestHeaders* headers) { 456 net::HttpRequestHeaders* headers) {
458 bool force_safe_search = force_google_safe_search_ && 457 bool force_safe_search = force_google_safe_search_ &&
459 force_google_safe_search_->GetValue(); 458 force_google_safe_search_->GetValue();
460 if (force_safe_search) 459 if (force_safe_search)
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 data_reduction_proxy::DataReductionProxyRequestType request_type) { 817 data_reduction_proxy::DataReductionProxyRequestType request_type) {
819 DCHECK_GE(received_content_length, 0); 818 DCHECK_GE(received_content_length, 0);
820 DCHECK_GE(original_content_length, 0); 819 DCHECK_GE(original_content_length, 0);
821 StoreAccumulatedContentLength(received_content_length, 820 StoreAccumulatedContentLength(received_content_length,
822 original_content_length, 821 original_content_length,
823 request_type, 822 request_type,
824 reinterpret_cast<Profile*>(profile_)); 823 reinterpret_cast<Profile*>(profile_));
825 received_content_length_ += received_content_length; 824 received_content_length_ += received_content_length;
826 original_content_length_ += original_content_length; 825 original_content_length_ += original_content_length;
827 } 826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698