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

Unified Diff: net/proxy/proxy_service.h

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Rebase issue 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/http/http_stream_factory_impl_job.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 377cde35aabba47b4abfe772d690e06ac015ba82..8cd707144ddfd7d17fdc004b71ff785d8659917b 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -100,70 +100,77 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
ProxyService(scoped_ptr<ProxyConfigService> config_service,
scoped_ptr<ProxyResolverFactory> resolver_factory,
NetLog* net_log);
~ProxyService() override;
// Used internally to handle PAC queries.
// TODO(eroman): consider naming this simply "Request".
class PacRequest;
+ // Determines the appropriate proxy for |url| for a |method| request and
+ // stores the result in |results|. If |method| is empty, the caller can expect
+ // method independent resolution.
+ //
// Returns ERR_IO_PENDING if the proxy information could not be provided
// synchronously, to indicate that the result will be available when the
// callback is run. The callback is run on the thread that calls
// ResolveProxy.
//
// The caller is responsible for ensuring that |results| and |callback|
// remain valid until the callback is run or until |pac_request| is cancelled
// via CancelPacRequest. |pac_request| is only valid while the completion
// callback is still pending. NULL can be passed for |pac_request| if
// the caller will not need to cancel the request.
//
// We use the three possible proxy access types in the following order,
// doing fallback if one doesn't work. See "pac_script_decider.h"
// for the specifics.
// 1. WPAD auto-detection
// 2. PAC URL
// 3. named proxy
//
// Profiling information for the request is saved to |net_log| if non-NULL.
int ResolveProxy(const GURL& url,
+ const std::string& method,
int load_flags,
ProxyInfo* results,
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_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,
+ const std::string& method,
int load_flags,
ProxyInfo* result,
ProxyDelegate* proxy_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
// to ResolveProxy. The |net_error| parameter contains the network error
// code associated with the failure. See "net/base/net_error_list.h" for a
// list of possible values. The semantics of this call are otherwise
// similar to ResolveProxy.
//
// NULL can be passed for |pac_request| if the caller will not need to
// cancel the request.
//
// Returns ERR_FAILED if there is not another proxy config to try.
//
// Profiling information for the request is saved to |net_log| if non-NULL.
int ReconsiderProxyAfterError(const GURL& url,
+ const std::string& method,
int load_flags,
int net_error,
ProxyInfo* results,
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
const BoundNetLog& net_log);
// Explicitly trigger proxy fallback for the given |results| by updating our
// list of bad proxies to include the first entry of |results|, and,
@@ -326,20 +333,21 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// Completing synchronously means we don't need to query ProxyResolver.
int TryToCompleteSynchronously(const GURL& url,
int load_flags,
ProxyDelegate* proxy_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,
+ const std::string& method,
int load_flags,
ProxyInfo* results,
const CompletionCallback& callback,
PacRequest** pac_request,
ProxyDelegate* proxy_delegate,
const BoundNetLog& net_log);
// Cancels all of the requests sent to the ProxyResolver. These will be
// restarted when calling SetReady().
void SuspendAllPendingRequests();
@@ -351,20 +359,21 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
// Returns true if |pending_requests_| contains |req|.
bool ContainsPendingRequest(PacRequest* req);
// Removes |req| from the list of pending requests.
void RemovePendingRequest(PacRequest* req);
// Called when proxy resolution has completed (either synchronously or
// asynchronously). Handles logging the result, and cleaning out
// bad entries from the results list.
int DidFinishResolvingProxy(const GURL& url,
+ const std::string& method,
int load_flags,
ProxyDelegate* proxy_delegate,
ProxyInfo* result,
int result_code,
const BoundNetLog& net_log,
base::TimeTicks start_time,
bool script_executed);
// Start initialization using |fetched_config_|.
void InitializeUsingLastFetchedConfig();
« no previous file with comments | « net/http/http_stream_factory_impl_job.cc ('k') | net/proxy/proxy_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698