diff options
author | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-03 18:24:20 +0000 |
---|---|---|
committer | vitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-03 18:24:20 +0000 |
commit | 60263c7c1dc2a91a8a4cab8b92ae9f184f8176fa (patch) | |
tree | 3675e2f564b29096496f3a440fd0cd2444dd5e58 | |
parent | c05132972c3845affefe93366ca5763ff01fab5c (diff) | |
download | chromium_src-60263c7c1dc2a91a8a4cab8b92ae9f184f8176fa.zip chromium_src-60263c7c1dc2a91a8a4cab8b92ae9f184f8176fa.tar.gz chromium_src-60263c7c1dc2a91a8a4cab8b92ae9f184f8176fa.tar.bz2 |
Restored missing broker initialization.
BUG=134574
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10690070
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145335 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); |