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 |