| 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 "base/base_switches.h" | 5 #include "base/base_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/hi_res_timer_manager.h" | 7 #include "base/hi_res_timer_manager.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/power_monitor/power_monitor.h" | 9 #include "base/power_monitor/power_monitor.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| 11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
| 12 #include "content/common/child_process.h" | 12 #include "content/child/child_process.h" |
| 13 #include "content/common/debug_util.h" |
| 13 #include "content/common/sandbox_linux.h" | 14 #include "content/common/sandbox_linux.h" |
| 14 #include "content/public/common/main_function_params.h" | 15 #include "content/public/common/main_function_params.h" |
| 15 #include "content/public/common/sandbox_init.h" | 16 #include "content/public/common/sandbox_init.h" |
| 16 #include "content/worker/worker_thread.h" | 17 #include "content/worker/worker_thread.h" |
| 17 | 18 |
| 18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
| 19 #include "sandbox/win/src/sandbox.h" | 20 #include "sandbox/win/src/sandbox.h" |
| 20 #endif | 21 #endif |
| 21 | 22 |
| 22 #if defined(OS_MACOSX) | 23 #if defined(OS_MACOSX) |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // On Linux, the sandbox must be initialized early, before any thread is | 56 // On Linux, the sandbox must be initialized early, before any thread is |
| 56 // created. | 57 // created. |
| 57 LinuxSandbox::InitializeSandbox(); | 58 LinuxSandbox::InitializeSandbox(); |
| 58 #endif | 59 #endif |
| 59 | 60 |
| 60 ChildProcess worker_process; | 61 ChildProcess worker_process; |
| 61 worker_process.set_main_thread(new WorkerThread()); | 62 worker_process.set_main_thread(new WorkerThread()); |
| 62 | 63 |
| 63 const CommandLine& parsed_command_line = parameters.command_line; | 64 const CommandLine& parsed_command_line = parameters.command_line; |
| 64 if (parsed_command_line.HasSwitch(switches::kWaitForDebugger)) { | 65 if (parsed_command_line.HasSwitch(switches::kWaitForDebugger)) { |
| 65 ChildProcess::WaitForDebugger("Worker"); | 66 WaitForDebugger("Worker"); |
| 66 } | 67 } |
| 67 | 68 |
| 68 // Load the accelerator table from the browser executable and tell the | 69 // Load the accelerator table from the browser executable and tell the |
| 69 // message loop to use it when translating messages. | 70 // message loop to use it when translating messages. |
| 70 base::MessageLoop::current()->Run(); | 71 base::MessageLoop::current()->Run(); |
| 71 | 72 |
| 72 return 0; | 73 return 0; |
| 73 } | 74 } |
| 74 | 75 |
| 75 } // namespace content | 76 } // namespace content |
| OLD | NEW |