summaryrefslogtreecommitdiffstats
path: root/chrome/service/net/service_url_request_context.h
diff options
context:
space:
mode:
authorscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 21:23:13 +0000
committerscottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-02 21:23:13 +0000
commit5dfa52b9e1e269faa84348fc84932b73e9cea7f7 (patch)
tree0477a757db6a1fce77d26ea63fccf65add4d3ca6 /chrome/service/net/service_url_request_context.h
parent66175145594a89b2ac64030e7790a84dc83df167 (diff)
downloadchromium_src-5dfa52b9e1e269faa84348fc84932b73e9cea7f7.zip
chromium_src-5dfa52b9e1e269faa84348fc84932b73e9cea7f7.tar.gz
chromium_src-5dfa52b9e1e269faa84348fc84932b73e9cea7f7.tar.bz2
Service process fixes for Linux.
Linux requires that the proxy_config_service be created on the I/O thread. Fortunately, ServiceURLRequestContextGetter was already thread safe ref counted, so we lift creation of that and the (also, fortunately) thread safe ref counted net::ProxyService up to service process initialization time. That created proxy service now gets passed in to the dynamic creation of the ServiceURLRequestContexts. Should have no effect on other platforms. BUG=74226 TEST=Start Chromium on Linux with --enable-cloud-print-proxy, sign in, and examine ~/.config/chromium/Service State. With the fix, Service State properly contains the needed tokens to properly re-launch and be a proxy. Review URL: http://codereview.chromium.org/6602041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76612 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/net/service_url_request_context.h')
-rw-r--r--chrome/service/net/service_url_request_context.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/service/net/service_url_request_context.h b/chrome/service/net/service_url_request_context.h
index 7ffda3c..becc21a 100644
--- a/chrome/service/net/service_url_request_context.h
+++ b/chrome/service/net/service_url_request_context.h
@@ -31,7 +31,8 @@ class MessageLoopProxy;
//
class ServiceURLRequestContext : public net::URLRequestContext {
public:
- explicit ServiceURLRequestContext(const std::string& user_agent);
+ explicit ServiceURLRequestContext(const std::string& user_agent,
+ net::ProxyService* net_proxy_service);
// Overridden from net::URLRequestContext:
virtual const std::string& GetUserAgent(const GURL& url) const;
@@ -45,8 +46,6 @@ class ServiceURLRequestContext : public net::URLRequestContext {
class ServiceURLRequestContextGetter : public URLRequestContextGetter {
public:
- ServiceURLRequestContextGetter();
-
virtual net::URLRequestContext* GetURLRequestContext();
virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() const;
@@ -56,12 +55,18 @@ class ServiceURLRequestContextGetter : public URLRequestContextGetter {
std::string user_agent() const {
return user_agent_;
}
+
private:
+ friend class ServiceProcess;
+ ServiceURLRequestContextGetter();
virtual ~ServiceURLRequestContextGetter();
+ void CreateProxyService();
+
std::string user_agent_;
scoped_refptr<net::URLRequestContext> url_request_context_;
scoped_refptr<base::MessageLoopProxy> io_message_loop_proxy_;
+ scoped_refptr<net::ProxyService> proxy_service_;
};
#endif // CHROME_SERVICE_NET_SERVICE_URL_REQUEST_CONTEXT_H_