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

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

Issue 653313003: Check effective proxy config before adding data reduction proxies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 435
436 void ChromeNetworkDelegate::OnResolveProxy( 436 void ChromeNetworkDelegate::OnResolveProxy(
437 const GURL& url, 437 const GURL& url,
438 int load_flags, 438 int load_flags,
439 const net::ProxyService& proxy_service, 439 const net::ProxyService& proxy_service,
440 net::ProxyInfo* result) { 440 net::ProxyInfo* result) {
441 if (!on_resolve_proxy_handler_.is_null() && 441 if (!on_resolve_proxy_handler_.is_null() &&
442 !proxy_config_getter_.is_null()) { 442 !proxy_config_getter_.is_null()) {
443 on_resolve_proxy_handler_.Run(url, load_flags, 443 on_resolve_proxy_handler_.Run(url, load_flags,
444 proxy_config_getter_.Run(), 444 proxy_config_getter_.Run(),
445 proxy_service.config(),
marq (ping after 24h) 2014/10/28 08:15:27 This change will also need to be made in CrNet's n
bengr 2014/10/29 21:12:36 Acknowledged.
445 proxy_service.proxy_retry_info(), 446 proxy_service.proxy_retry_info(),
446 data_reduction_proxy_params_, result); 447 data_reduction_proxy_params_,
448 result);
marq (ping after 24h) 2014/10/28 08:15:27 No need to move this onto another line, as method
bengr 2014/10/29 21:12:36 Done.
447 } 449 }
448 } 450 }
449 451
450 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy, 452 void ChromeNetworkDelegate::OnProxyFallback(const net::ProxyServer& bad_proxy,
451 int net_error) { 453 int net_error) {
452 if (data_reduction_proxy_usage_stats_) { 454 if (data_reduction_proxy_usage_stats_) {
453 data_reduction_proxy_usage_stats_->OnProxyFallback( 455 data_reduction_proxy_usage_stats_->OnProxyFallback(
454 bad_proxy, net_error); 456 bad_proxy, net_error);
455 } 457 }
456 } 458 }
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 if (data_reduction_proxy_statistics_prefs_) { 840 if (data_reduction_proxy_statistics_prefs_) {
839 StoreAccumulatedContentLength(received_content_length, 841 StoreAccumulatedContentLength(received_content_length,
840 original_content_length, 842 original_content_length,
841 request_type, 843 request_type,
842 reinterpret_cast<Profile*>(profile_), 844 reinterpret_cast<Profile*>(profile_),
843 data_reduction_proxy_statistics_prefs_); 845 data_reduction_proxy_statistics_prefs_);
844 } 846 }
845 received_content_length_ += received_content_length; 847 received_content_length_ += received_content_length;
846 original_content_length_ += original_content_length; 848 original_content_length_ += original_content_length;
847 } 849 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698