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

Unified Diff: content/browser/resolve_proxy_msg_helper.h

Issue 7791005: Stop using the default profile's proxy service for plugin proxy requests, and instead use the ass... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix test Created 9 years, 4 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
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_
« no previous file with comments | « content/browser/renderer_host/browser_render_process_host.cc ('k') | content/browser/resolve_proxy_msg_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698