OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/debug/debugger.h" | 6 #include "base/debug/debugger.h" |
7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/threading/platform_thread.h" | 9 #include "base/threading/platform_thread.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/common/child_process.h" | 11 #include "content/common/child_process.h" |
| 12 #include "content/common/sandbox_linux.h" |
12 #include "content/ppapi_plugin/ppapi_thread.h" | 13 #include "content/ppapi_plugin/ppapi_thread.h" |
13 #include "content/public/common/content_client.h" | 14 #include "content/public/common/content_client.h" |
14 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
15 #include "content/public/common/main_function_params.h" | 16 #include "content/public/common/main_function_params.h" |
16 #include "content/public/plugin/content_plugin_client.h" | 17 #include "content/public/plugin/content_plugin_client.h" |
17 #include "crypto/nss_util.h" | 18 #include "crypto/nss_util.h" |
18 #include "ppapi/proxy/proxy_module.h" | 19 #include "ppapi/proxy/proxy_module.h" |
19 #include "ui/base/ui_base_switches.h" | 20 #include "ui/base/ui_base_switches.h" |
20 | 21 |
21 #if defined(OS_WIN) | 22 #if defined(OS_WIN) |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // NSS must be initialized before enabling the sandbox below. | 87 // NSS must be initialized before enabling the sandbox below. |
87 crypto::InitNSSSafely(); | 88 crypto::InitNSSSafely(); |
88 #endif | 89 #endif |
89 | 90 |
90 // Allow the embedder to perform any necessary per-process initialization | 91 // Allow the embedder to perform any necessary per-process initialization |
91 // before the sandbox is initialized. | 92 // before the sandbox is initialized. |
92 if (GetContentClient()->plugin()) | 93 if (GetContentClient()->plugin()) |
93 GetContentClient()->plugin()->PreSandboxInitialization(); | 94 GetContentClient()->plugin()->PreSandboxInitialization(); |
94 | 95 |
95 #if defined(OS_LINUX) | 96 #if defined(OS_LINUX) |
96 InitializeSandbox(); | 97 LinuxSandbox::InitializeSandbox(); |
97 #endif | 98 #endif |
98 | 99 |
99 ChildProcess ppapi_process; | 100 ChildProcess ppapi_process; |
100 ppapi_process.set_main_thread( | 101 ppapi_process.set_main_thread( |
101 new PpapiThread(parameters.command_line, false)); // Not a broker. | 102 new PpapiThread(parameters.command_line, false)); // Not a broker. |
102 | 103 |
103 main_message_loop.Run(); | 104 main_message_loop.Run(); |
104 return 0; | 105 return 0; |
105 } | 106 } |
106 | 107 |
107 } // namespace content | 108 } // namespace content |
OLD | NEW |