| Index: content/browser/resolve_proxy_msg_helper.h
|
| ===================================================================
|
| --- content/browser/resolve_proxy_msg_helper.h (revision 98569)
|
| +++ content/browser/resolve_proxy_msg_helper.h (working copy)
|
| @@ -15,6 +15,10 @@
|
| #include "net/base/completion_callback.h"
|
| #include "net/proxy/proxy_service.h"
|
|
|
| +namespace net {
|
| +class URLRequestContextGetter;
|
| +}
|
| +
|
| // Responds to ChildProcessHostMsg_ResolveProxy, kicking off a ProxyResolve
|
| // request on the IO thread using the specified proxy service. Completion is
|
| // notified through the delegate. If multiple requests are started at the same
|
| @@ -27,8 +31,8 @@
|
| // This object is expected to live on the IO thread.
|
| class ResolveProxyMsgHelper : public BrowserMessageFilter {
|
| public:
|
| - // If |proxy_service| is NULL, then the main browser context's proxy service
|
| - // will be used.
|
| + explicit ResolveProxyMsgHelper(net::URLRequestContextGetter* getter);
|
| + // Constructor used by unittests.
|
| explicit ResolveProxyMsgHelper(net::ProxyService* proxy_service);
|
|
|
| // Destruction cancels the current outstanding request, and clears the
|
| @@ -48,10 +52,6 @@
|
| // Starts the first pending request.
|
| void StartPendingRequest();
|
|
|
| - // Get the proxy service instance to use. On success returns true and
|
| - // sets |*out|. Otherwise returns false.
|
| - bool GetProxyService(net::ProxyService** out) const;
|
| -
|
| // A PendingRequest is a resolve request that is in progress, or queued.
|
| struct PendingRequest {
|
| public:
|
| @@ -69,7 +69,6 @@
|
| };
|
|
|
| // Members for the current outstanding proxy request.
|
| - net::ProxyService* proxy_service_;
|
| net::CompletionCallbackImpl<ResolveProxyMsgHelper> callback_;
|
| net::ProxyInfo proxy_info_;
|
|
|
| @@ -77,9 +76,8 @@
|
| typedef std::deque<PendingRequest> PendingRequestList;
|
| PendingRequestList pending_requests_;
|
|
|
| - // Specified by unit-tests, to use this proxy service in place of the
|
| - // global one.
|
| - net::ProxyService* proxy_service_override_;
|
| + scoped_refptr<net::URLRequestContextGetter> context_getter_;
|
| + net::ProxyService* proxy_service_;
|
| };
|
|
|
| #endif // CONTENT_BROWSER_RESOLVE_PROXY_MSG_HELPER_H_
|
|
|