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

Unified Diff: net/base/network_delegate_impl.h

Issue 1735203002: Revert of Moving proxy resolution logic out of NetworkDelegate and into ProxyDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « net/base/network_delegate.cc ('k') | net/base/network_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_delegate_impl.h
diff --git a/net/base/network_delegate_impl.h b/net/base/network_delegate_impl.h
index 150e65c380b4107f3db757effccc6e34bef1a52a..8a0b007f3d836cac5440304e8775a39d79d9c1d8 100644
--- a/net/base/network_delegate_impl.h
+++ b/net/base/network_delegate_impl.h
@@ -24,6 +24,8 @@
class HttpRequestHeaders;
class HttpResponseHeaders;
class ProxyInfo;
+class ProxyServer;
+class ProxyService;
class URLRequest;
class NET_EXPORT NetworkDelegateImpl : public NetworkDelegate {
@@ -50,6 +52,20 @@
int OnBeforeURLRequest(URLRequest* request,
const CompletionCallback& callback,
GURL* new_url) override;
+
+ // 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|.
+ void OnResolveProxy(const GURL& url,
+ int load_flags,
+ const ProxyService& proxy_service,
+ ProxyInfo* result) override;
+
+ // Called when use of |bad_proxy| fails due to |net_error|. |net_error| is
+ // the network error encountered, if any, and OK if the fallback was
+ // for a reason other than a network error (e.g. the proxy service was
+ // explicitly directed to skip a proxy).
+ void OnProxyFallback(const ProxyServer& bad_proxy, int net_error) override;
// Called right before the HTTP headers are sent. Allows the delegate to
// read/write |headers| before they get sent out. |callback| and |headers| are
« no previous file with comments | « net/base/network_delegate.cc ('k') | net/base/network_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698