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

Unified Diff: chrome/browser/net/chrome_network_delegate.h

Issue 449973002: Use data reduction proxy when managed proxy config returns direct (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-uma-in-proxy-service
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/net/chrome_network_delegate.h
diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h
index f7c03dc2cf5cd00593f4ed452e1a6618ef946c05..f24d39a848d4c7b3dce9cf25cf18dd2e5f25ccbe 100644
--- a/chrome/browser/net/chrome_network_delegate.h
+++ b/chrome/browser/net/chrome_network_delegate.h
@@ -15,6 +15,7 @@
#include "base/values.h"
#include "components/data_reduction_proxy/browser/data_reduction_proxy_metrics.h"
#include "net/base/network_delegate.h"
+#include "net/proxy/proxy_retry_info.h"
class ChromeExtensionsNetworkDelegate;
class ClientHints;
@@ -50,8 +51,10 @@ class InfoMap;
}
namespace net {
+class ProxyConfig;
class ProxyInfo;
class ProxyServer;
+class ProxyService;
class URLRequest;
}
@@ -73,9 +76,16 @@ class ChromeNetworkDelegate : public net::NetworkDelegate {
typedef base::Callback<void(
const GURL& url,
int load_flags,
+ const net::ProxyConfig& data_reduction_proxy_config,
+ const net::ProxyRetryInfoMap& proxy_retry_info_map,
const data_reduction_proxy::DataReductionProxyParams* params,
net::ProxyInfo* result)> OnResolveProxyHandler;
+ // Provides an additional proxy configuration that can be consulted after
+ // proxy resolution.
+ typedef base::Callback<void(net::ProxyConfig* proxy_config)>
+ ProxyConfigGetter;
+
// |enable_referrers| (and all of the other optional PrefMembers) should be
// initialized on the UI thread (see below) beforehand. This object's owner is
// responsible for cleaning them up at shutdown.
@@ -161,6 +171,11 @@ class ChromeNetworkDelegate : public net::NetworkDelegate {
on_resolve_proxy_handler_ = handler;
}
+ void set_proxy_config_getter(ProxyConfigGetter getter) {
mef 2014/08/11 19:44:40 const &?
bengr 2014/08/11 23:03:19 Done.
+ proxy_config_getter_ = getter;
+ }
+
+
marq (ping after 24h) 2014/08/11 16:11:33 Extra line.
bengr 2014/08/11 23:03:19 Done.
// Adds the Client Hints header to HTTP requests.
void SetEnableClientHints();
@@ -198,7 +213,10 @@ class ChromeNetworkDelegate : public net::NetworkDelegate {
const net::CompletionCallback& callback,
GURL* new_url) OVERRIDE;
virtual void OnResolveProxy(
- const GURL& url, int load_flags, net::ProxyInfo* result) OVERRIDE;
+ const GURL& url,
+ int load_flags,
+ const net::ProxyService* proxy_service,
+ net::ProxyInfo* result) OVERRIDE;
virtual void OnProxyFallback(const net::ProxyServer& bad_proxy,
int net_error,
bool did_fallback) OVERRIDE;
@@ -306,6 +324,7 @@ class ChromeNetworkDelegate : public net::NetworkDelegate {
data_reduction_proxy_auth_request_handler_;
OnResolveProxyHandler on_resolve_proxy_handler_;
+ ProxyConfigGetter proxy_config_getter_;
DISALLOW_COPY_AND_ASSIGN(ChromeNetworkDelegate);
};
« no previous file with comments | « no previous file | chrome/browser/net/chrome_network_delegate.cc » ('j') | chrome/browser/net/chrome_network_delegate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698