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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 568893002: Trigger data reduction proxy unreachable message via on proxy fall back. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to head. Created 6 years, 2 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
« no previous file with comments | « no previous file | components/data_reduction_proxy/browser/data_reduction_proxy_params.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 on_resolve_proxy_handler_.Run(url, load_flags, 451 on_resolve_proxy_handler_.Run(url, load_flags,
452 proxy_config_getter_.Run(), 452 proxy_config_getter_.Run(),
453 proxy_service.proxy_retry_info(), 453 proxy_service.proxy_retry_info(),
454 data_reduction_proxy_params_, result); 454 data_reduction_proxy_params_, result);
455 } 455 }
456 } 456 }
457 457
458 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy, 458 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy,
459 int net_error) { 459 int net_error) {
460 if (data_reduction_proxy_usage_stats_) { 460 if (data_reduction_proxy_usage_stats_) {
461 data_reduction_proxy_usage_stats_->RecordBypassEventHistograms( 461 data_reduction_proxy_usage_stats_->OnProxyFallback(
462 bad_proxy, net_error); 462 bad_proxy, net_error);
463 } 463 }
464 } 464 }
465 465
466 int ChromeNetworkDelegate::OnBeforeSendHeaders( 466 int ChromeNetworkDelegate::OnBeforeSendHeaders(
467 net::URLRequest* request, 467 net::URLRequest* request,
468 const net::CompletionCallback& callback, 468 const net::CompletionCallback& callback,
469 net::HttpRequestHeaders* headers) { 469 net::HttpRequestHeaders* headers) {
470 bool force_safe_search = force_google_safe_search_ && 470 bool force_safe_search = force_google_safe_search_ &&
471 force_google_safe_search_->GetValue(); 471 force_google_safe_search_->GetValue();
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 if (data_reduction_proxy_statistics_prefs_) { 843 if (data_reduction_proxy_statistics_prefs_) {
844 StoreAccumulatedContentLength(received_content_length, 844 StoreAccumulatedContentLength(received_content_length,
845 original_content_length, 845 original_content_length,
846 request_type, 846 request_type,
847 reinterpret_cast<Profile*>(profile_), 847 reinterpret_cast<Profile*>(profile_),
848 data_reduction_proxy_statistics_prefs_); 848 data_reduction_proxy_statistics_prefs_);
849 } 849 }
850 received_content_length_ += received_content_length; 850 received_content_length_ += received_content_length;
851 original_content_length_ += original_content_length; 851 original_content_length_ += original_content_length;
852 } 852 }
OLDNEW
« no previous file with comments | « no previous file | components/data_reduction_proxy/browser/data_reduction_proxy_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698