diff options
author | abodenha@google.com <abodenha@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-21 23:26:09 +0000 |
---|---|---|
committer | abodenha@google.com <abodenha@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-21 23:26:09 +0000 |
commit | 88b6288d7f18abb79775f1632911135b13aa2187 (patch) | |
tree | 386d5d8ac05af1a3fd67eb0828934120bacbb86d | |
parent | 4c8e02d05ac246d5afed8c3adb743839a4037404 (diff) | |
download | chromium_src-88b6288d7f18abb79775f1632911135b13aa2187.zip chromium_src-88b6288d7f18abb79775f1632911135b13aa2187.tar.gz chromium_src-88b6288d7f18abb79775f1632911135b13aa2187.tar.bz2 |
Merge 145335 - Restored missing broker initialization.
BUG=134574
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10690070
TBR=vitalybuka@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10790114
git-svn-id: svn://svn.chromium.org/chrome/branches/1180/src@147807 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/service/service_main.cc | 4 | ||||
-rw-r--r-- | content/common/sandbox_init_win.cc | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/chrome/service/service_main.cc b/chrome/service/service_main.cc index c17ded3..d73aabc 100644 --- a/chrome/service/service_main.cc +++ b/chrome/service/service_main.cc @@ -43,10 +43,6 @@ int ServiceProcessMain(const content::MainFunctionParams& parameters) { if (!state->Initialize()) return 0; -#if defined(OS_WIN) - content::InitializeSandbox(parameters.sandbox_info); -#endif // defined(OS_WIN) - ServiceProcess service_process; if (service_process.Initialize(&main_message_loop, parameters.command_line, diff --git a/content/common/sandbox_init_win.cc b/content/common/sandbox_init_win.cc index a5d8baa..e2fe0b2 100644 --- a/content/common/sandbox_init_win.cc +++ b/content/common/sandbox_init_win.cc @@ -18,15 +18,20 @@ bool InitializeSandbox( const CommandLine& command_line = *CommandLine::ForCurrentProcess(); std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); + sandbox::BrokerServices* broker_services = sandbox_info->broker_services; + if (broker_services && (process_type.empty() || + process_type == switches::kNaClBrokerProcess || + process_type == switches::kServiceProcess)) { + if (!sandbox::InitBrokerServices(broker_services)) + return false; + } + if (process_type.empty() || process_type == switches::kNaClBrokerProcess) { // IMPORTANT: This piece of code needs to run as early as possible in the // process because it will initialize the sandbox broker, which requires the // process to swap its window station. During this time all the UI will be // broken. This has to run before threads and windows are created. - sandbox::BrokerServices* broker_services = sandbox_info->broker_services; if (broker_services) { - if (!sandbox::InitBrokerServices(broker_services)) - return false; if (!command_line.HasSwitch(switches::kNoSandbox)) { bool use_winsta = !command_line.HasSwitch( switches::kDisableAltWinstation); |