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

Unified Diff: net/proxy/proxy_service.h

Issue 545633002: Don't preresolve DNS if a fixed proxy configuration is in place. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remote superfluous net:: prefix Created 6 years, 2 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 | « chrome/browser/net/predictor_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_service.h
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 9fdcb5815c0250e771d4f1f43d9c2ece931c25cf..e138367650adc67d3f57aa688ac91eef805f5e0d 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -130,6 +130,14 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
NetworkDelegate* network_delegate,
const BoundNetLog& net_log);
+ // Returns true if the proxy information could be determined without spawning
+ // an asynchronous task. Otherwise, |result| is unmodified.
+ bool TryResolveProxySynchronously(const GURL& raw_url,
+ int load_flags,
+ ProxyInfo* result,
+ NetworkDelegate* network_delegate,
+ const BoundNetLog& net_log);
+
// This method is called after a failure to connect or resolve a host name.
// It gives the proxy service an opportunity to reconsider the proxy to use.
// The |results| parameter contains the results returned by an earlier call
@@ -321,6 +329,17 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
NetworkDelegate* network_delegate,
ProxyInfo* result);
+ // Identical to ResolveProxy, except that |callback| is permitted to be null.
+ // if |callback.is_null()|, this function becomes a thin wrapper around
+ // |TryToCompleteSynchronously|.
+ int ResolveProxyHelper(const GURL& url,
+ int load_flags,
+ ProxyInfo* results,
+ const net::CompletionCallback& callback,
+ PacRequest** pac_request,
+ NetworkDelegate* network_delegate,
+ const BoundNetLog& net_log);
+
// Cancels all of the requests sent to the ProxyResolver. These will be
// restarted when calling SetReady().
void SuspendAllPendingRequests();
« no previous file with comments | « chrome/browser/net/predictor_unittest.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698