diff options
author | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 21:23:13 +0000 |
---|---|---|
committer | scottbyer@chromium.org <scottbyer@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-02 21:23:13 +0000 |
commit | 5dfa52b9e1e269faa84348fc84932b73e9cea7f7 (patch) | |
tree | 0477a757db6a1fce77d26ea63fccf65add4d3ca6 /chrome/service/service_process.cc | |
parent | 66175145594a89b2ac64030e7790a84dc83df167 (diff) | |
download | chromium_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/service_process.cc')
-rw-r--r-- | chrome/service/service_process.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc index 6a8b689..1335936 100644 --- a/chrome/service/service_process.cc +++ b/chrome/service/service_process.cc @@ -23,6 +23,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/service_process_util.h" #include "chrome/service/cloud_print/cloud_print_proxy.h" +#include "chrome/service/net/service_url_request_context.h" #include "chrome/service/service_ipc_server.h" #include "chrome/service/service_process_prefs.h" #include "grit/chromium_strings.h" @@ -141,6 +142,8 @@ bool ServiceProcess::Initialize(MessageLoopForUI* message_loop, return false; } + request_context_getter_ = new ServiceURLRequestContextGetter(); + // See if we have been suppiled an LSID in the command line. This LSID will // override the credentials we use for Cloud Print. std::string lsid = command_line.GetSwitchValueASCII( @@ -306,6 +309,12 @@ void ServiceProcess::OnChromotingHostDisabled() { OnServiceDisabled(); } +ServiceURLRequestContextGetter* +ServiceProcess::GetServiceURLRequestContextGetter() { + DCHECK(request_context_getter_.get()); + return request_context_getter_.get(); +} + void ServiceProcess::OnServiceEnabled() { enabled_services_++; if ((1 == enabled_services_) && |