| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // The main thread of the broker. | 36 // The main thread of the broker. |
| 37 MessageLoopForIO main_message_loop; | 37 MessageLoopForIO main_message_loop; |
| 38 base::PlatformThread::SetName("CrNaClBrokerMain"); | 38 base::PlatformThread::SetName("CrNaClBrokerMain"); |
| 39 | 39 |
| 40 base::SystemMonitor system_monitor; | 40 base::SystemMonitor system_monitor; |
| 41 HighResolutionTimerManager hi_res_timer_manager; | 41 HighResolutionTimerManager hi_res_timer_manager; |
| 42 | 42 |
| 43 const CommandLine& parsed_command_line = parameters.command_line_; | 43 const CommandLine& parsed_command_line = parameters.command_line_; |
| 44 | 44 |
| 45 DVLOG(1) << "Started NaCL broker with " | 45 DVLOG(1) << "Started NaCL broker with " |
| 46 << parsed_command_line.command_line_string(); | 46 << parsed_command_line.GetCommandLineString(); |
| 47 | 47 |
| 48 // NOTE: this code is duplicated from browser_main.cc | 48 // NOTE: this code is duplicated from browser_main.cc |
| 49 // IMPORTANT: This piece of code needs to run as early as possible in the | 49 // IMPORTANT: This piece of code needs to run as early as possible in the |
| 50 // process because it will initialize the sandbox broker, which requires the | 50 // process because it will initialize the sandbox broker, which requires the |
| 51 // process to swap its window station. During this time all the UI will be | 51 // process to swap its window station. During this time all the UI will be |
| 52 // broken. This has to run before threads and windows are created. | 52 // broken. This has to run before threads and windows are created. |
| 53 sandbox::BrokerServices* broker_services = | 53 sandbox::BrokerServices* broker_services = |
| 54 parameters.sandbox_info_.BrokerServices(); | 54 parameters.sandbox_info_.BrokerServices(); |
| 55 if (broker_services) { | 55 if (broker_services) { |
| 56 sandbox::InitBrokerServices(broker_services); | 56 sandbox::InitBrokerServices(broker_services); |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // require waiting for a timeout. | 128 // require waiting for a timeout. |
| 129 VLOG(1) << "Sandbox test failed: Not launching NaCl process"; | 129 VLOG(1) << "Sandbox test failed: Not launching NaCl process"; |
| 130 } | 130 } |
| 131 #else | 131 #else |
| 132 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; | 132 NOTIMPLEMENTED() << " not implemented startup, plugin startup dialog etc."; |
| 133 #endif | 133 #endif |
| 134 | 134 |
| 135 platform.PlatformUninitialize(); | 135 platform.PlatformUninitialize(); |
| 136 return 0; | 136 return 0; |
| 137 } | 137 } |
| OLD | NEW |