| Index: net/proxy/proxy_service.h
|
| diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
|
| index e71fe9b9c0fe67ff7d9b8abbf69ce613860b4880..377cde35aabba47b4abfe772d690e06ac015ba82 100644
|
| --- a/net/proxy/proxy_service.h
|
| +++ b/net/proxy/proxy_service.h
|
| @@ -30,21 +30,21 @@ class GURL;
|
|
|
| namespace base {
|
| class SingleThreadTaskRunner;
|
| class TimeDelta;
|
| } // namespace base
|
|
|
| namespace net {
|
|
|
| class DhcpProxyScriptFetcher;
|
| class HostResolver;
|
| -class NetworkDelegate;
|
| +class ProxyDelegate;
|
| class ProxyResolver;
|
| class ProxyResolverFactory;
|
| class ProxyResolverScriptData;
|
| class ProxyScriptDecider;
|
| class ProxyScriptFetcher;
|
|
|
| // This class can be used to resolve the proxy server to use when loading a
|
| // HTTP(S) URL. It uses the given ProxyResolver to handle the actual proxy
|
| // resolution. See ProxyResolverV8 for example.
|
| class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
|
| @@ -124,29 +124,29 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
|
| // 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,
|
| int load_flags,
|
| ProxyInfo* results,
|
| const CompletionCallback& callback,
|
| PacRequest** pac_request,
|
| - NetworkDelegate* network_delegate,
|
| + 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,
|
| int load_flags,
|
| ProxyInfo* result,
|
| - NetworkDelegate* network_delegate,
|
| + 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.
|
| //
|
| @@ -155,45 +155,45 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
|
| //
|
| // 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,
|
| int load_flags,
|
| int net_error,
|
| ProxyInfo* results,
|
| const CompletionCallback& callback,
|
| PacRequest** pac_request,
|
| - NetworkDelegate* network_delegate,
|
| + 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,
|
| // additional bad proxies (can be none). Will retry after |retry_delay| if
|
| // positive, and will use the default proxy retry duration otherwise. Proxies
|
| // marked as bad will not be retried until |retry_delay| has passed. Returns
|
| // true if there will be at least one proxy remaining in the list after
|
| // fallback and false otherwise. This method should be used to add proxies to
|
| // the bad proxy list only for reasons other than a network error. If a proxy
|
| // needs to be added to the bad proxy list because a network error was
|
| // encountered when trying to connect to it, use |ReconsiderProxyAfterError|.
|
| bool MarkProxiesAsBadUntil(
|
| const ProxyInfo& results,
|
| base::TimeDelta retry_delay,
|
| const std::vector<ProxyServer>& additional_bad_proxies,
|
| const BoundNetLog& net_log);
|
|
|
| // Called to report that the last proxy connection succeeded. If |proxy_info|
|
| // has a non empty proxy_retry_info map, the proxies that have been tried (and
|
| - // failed) for this request will be marked as bad. |network_delegate| will
|
| + // failed) for this request will be marked as bad. |proxy_delegate| will
|
| // be notified of any proxy fallbacks.
|
| void ReportSuccess(const ProxyInfo& proxy_info,
|
| - NetworkDelegate* network_delegate);
|
| + ProxyDelegate* proxy_delegate);
|
|
|
| // Call this method with a non-null |pac_request| to cancel the PAC request.
|
| void CancelPacRequest(PacRequest* pac_request);
|
|
|
| // Returns the LoadState for this |pac_request| which must be non-NULL.
|
| LoadState GetLoadState(const PacRequest* pac_request) const;
|
|
|
| // Sets the ProxyScriptFetcher and DhcpProxyScriptFetcher dependencies. This
|
| // is needed if the ProxyResolver is of type ProxyResolverWithoutFetch.
|
| // ProxyService takes ownership of proxy_script_fetcher.
|
| @@ -319,32 +319,32 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
|
|
|
| // Callback for when the proxy resolver has been initialized with a
|
| // PAC script.
|
| void OnInitProxyResolverComplete(int result);
|
|
|
| // Returns ERR_IO_PENDING if the request cannot be completed synchronously.
|
| // Otherwise it fills |result| with the proxy information for |url|.
|
| // Completing synchronously means we don't need to query ProxyResolver.
|
| int TryToCompleteSynchronously(const GURL& url,
|
| int load_flags,
|
| - NetworkDelegate* network_delegate,
|
| + 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,
|
| int load_flags,
|
| ProxyInfo* results,
|
| const CompletionCallback& callback,
|
| PacRequest** pac_request,
|
| - NetworkDelegate* network_delegate,
|
| + 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();
|
|
|
| // Advances the current state to |STATE_READY|, and resumes any pending
|
| // requests which had been stalled waiting for initialization to complete.
|
| void SetReady();
|
|
|
| @@ -352,21 +352,21 @@ class NET_EXPORT ProxyService : public NetworkChangeNotifier::IPAddressObserver,
|
| 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,
|
| int load_flags,
|
| - NetworkDelegate* network_delegate,
|
| + 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();
|
|
|
| // Start the initialization skipping past the "decision" phase.
|
|
|