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

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

Issue 653313003: Check effective proxy config before adding data reduction proxies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments on comments Created 6 years, 1 month 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 | chrome/browser/net/chrome_network_delegate.cc » ('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 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 6 #define CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 namespace prerender { 66 namespace prerender {
67 class PrerenderTracker; 67 class PrerenderTracker;
68 } 68 }
69 69
70 // ChromeNetworkDelegate is the central point from within the chrome code to 70 // ChromeNetworkDelegate is the central point from within the chrome code to
71 // add hooks into the network stack. 71 // add hooks into the network stack.
72 class ChromeNetworkDelegate : public net::NetworkDelegate { 72 class ChromeNetworkDelegate : public net::NetworkDelegate {
73 public: 73 public:
74 // Provides an opportunity to interpose on proxy resolution. Called before 74 // Provides an opportunity to interpose on proxy resolution. Called before
75 // ProxyService.ResolveProxy() returns. |proxy_info| contains information 75 // ProxyService.ResolveProxy() returns. Two proxy configurations are provided
76 // about the proxy being used, and may be modified by this callback. 76 // that specify the data reduction proxy's configuration and the effective
77 // configuration according to the proxy service, respectively. Retry info is
78 // presumed to be from the proxy service.
77 typedef base::Callback<void( 79 typedef base::Callback<void(
78 const GURL& url, 80 const GURL& url,
79 int load_flags, 81 int load_flags,
80 const net::ProxyConfig& data_reduction_proxy_config, 82 const net::ProxyConfig& data_reduction_proxy_config,
83 const net::ProxyConfig& proxy_service_proxy_config,
81 const net::ProxyRetryInfoMap& proxy_retry_info_map, 84 const net::ProxyRetryInfoMap& proxy_retry_info_map,
82 const data_reduction_proxy::DataReductionProxyParams* params, 85 const data_reduction_proxy::DataReductionProxyParams* params,
83 net::ProxyInfo* result)> OnResolveProxyHandler; 86 net::ProxyInfo* result)> OnResolveProxyHandler;
84 87
85 // Provides an additional proxy configuration that can be consulted after 88 // Provides an additional proxy configuration that can be consulted after
86 // proxy resolution. 89 // proxy resolution.
87 typedef base::Callback<const net::ProxyConfig&()> ProxyConfigGetter; 90 typedef base::Callback<const net::ProxyConfig&()> ProxyConfigGetter;
88 91
89 // |enable_referrers| (and all of the other optional PrefMembers) should be 92 // |enable_referrers| (and all of the other optional PrefMembers) should be
90 // initialized on the UI thread (see below) beforehand. This object's owner is 93 // initialized on the UI thread (see below) beforehand. This object's owner is
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 data_reduction_proxy::DataReductionProxyStatisticsPrefs* 330 data_reduction_proxy::DataReductionProxyStatisticsPrefs*
328 data_reduction_proxy_statistics_prefs_; 331 data_reduction_proxy_statistics_prefs_;
329 332
330 OnResolveProxyHandler on_resolve_proxy_handler_; 333 OnResolveProxyHandler on_resolve_proxy_handler_;
331 ProxyConfigGetter proxy_config_getter_; 334 ProxyConfigGetter proxy_config_getter_;
332 335
333 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate); 336 DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
334 }; 337 };
335 338
336 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_ 339 #endif // CHROME_BROWSER_NET_CHROME_NETWORK_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698