diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-29 23:03:57 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-29 23:03:57 +0000 |
commit | 2dd868ff64f453c0da93c072986e1389836e8728 (patch) | |
tree | 89b767170d28968ffcdc7cf2b0770cfa2516da74 /content/browser/resolve_proxy_msg_helper.h | |
parent | e8981b7eda49d88b74239c6c5dad5d0dd093a142 (diff) | |
download | chromium_src-2dd868ff64f453c0da93c072986e1389836e8728.zip chromium_src-2dd868ff64f453c0da93c072986e1389836e8728.tar.gz chromium_src-2dd868ff64f453c0da93c072986e1389836e8728.tar.bz2 |
Stop using the default profile's proxy service for plugin proxy requests, and instead use the associated profile's proxy service. I proxy the IPC through the renderer first, as that makes it easy to get to the associated profile.
BUG=92361,64339
Review URL: http://codereview.chromium.org/7791005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98728 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/resolve_proxy_msg_helper.h')
-rw-r--r-- | content/browser/resolve_proxy_msg_helper.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/content/browser/resolve_proxy_msg_helper.h b/content/browser/resolve_proxy_msg_helper.h index d672a33..f728cf1 100644 --- a/content/browser/resolve_proxy_msg_helper.h +++ b/content/browser/resolve_proxy_msg_helper.h @@ -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 @@ class ResolveProxyMsgHelper : public BrowserMessageFilter { // 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 @@ class ResolveProxyMsgHelper : public BrowserMessageFilter { }; // Members for the current outstanding proxy request. - net::ProxyService* proxy_service_; net::CompletionCallbackImpl<ResolveProxyMsgHelper> callback_; net::ProxyInfo proxy_info_; @@ -77,9 +76,8 @@ class ResolveProxyMsgHelper : public BrowserMessageFilter { 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_ |