Chromium Code Reviews| Index: content/common/sandbox_init_win.cc |
| =================================================================== |
| --- content/common/sandbox_init_win.cc (revision 145177) |
| +++ content/common/sandbox_init_win.cc (working copy) |
| @@ -18,15 +18,20 @@ |
| 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 |
|
Vitaly Buka (NO REVIEWS)
2012/07/03 05:01:09
Moved comment back and removed unnecessary changes
|
| // 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); |