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

Unified Diff: net/base/network_delegate.h

Issue 332313003: Add Finch experiment for selectively bypassing proxies. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: callback design (not yet done) Created 6 years, 6 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: net/base/network_delegate.h
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 4be320b9305ccd869a76239eeb25834aa5d8a83d..95092f89ab00853a65115744937f735f55ce1148 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -37,6 +37,7 @@ class HttpRequestHeaders;
class HttpResponseHeaders;
class SocketStream;
class URLRequest;
+class ProxyInfo;
class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
public:
@@ -60,6 +61,8 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
int NotifyBeforeURLRequest(URLRequest* request,
const CompletionCallback& callback,
GURL* new_url);
+ void NotifyResolveProxy(const GURL& url, int load_flags,
+ ProxyInfo* result);
int NotifyBeforeSendHeaders(URLRequest* request,
const CompletionCallback& callback,
HttpRequestHeaders* headers);
@@ -117,6 +120,13 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const CompletionCallback& callback,
GURL* new_url);
+ // Called as the proxy is being resolved for |url|. Allows the delegate to
+ // override the proxy resolution decision made by ProxyService. The delegate
+ // may override the decision by modifying the ProxyInfo |result|.
+ virtual void OnResolveProxy(const GURL& url,
+ int load_flags,
+ ProxyInfo* result);
+
// Called right before the HTTP headers are sent. Allows the delegate to
// read/write |headers| before they get sent out. |callback| and |headers| are
// valid only until OnCompleted or OnURLRequestDestroyed is called for this

Powered by Google App Engine
This is Rietveld 408576698