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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/debug/leak_annotations.h" | 6 #include "base/debug/leak_annotations.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/optional.h" | 8 #include "base/optional.h" |
9 #include "base/power_monitor/power_monitor.h" | 9 #include "base/power_monitor/power_monitor.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
11 #include "base/threading/platform_thread.h" | 11 #include "base/threading/platform_thread.h" |
12 #include "base/timer/hi_res_timer_manager.h" | 12 #include "base/timer/hi_res_timer_manager.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/child/child_process.h" | 14 #include "content/child/child_process.h" |
15 #include "content/common/sandbox_linux/sandbox_linux.h" | |
16 #include "content/public/common/content_switches.h" | 15 #include "content/public/common/content_switches.h" |
17 #include "content/public/common/main_function_params.h" | 16 #include "content/public/common/main_function_params.h" |
18 #include "content/public/common/sandbox_init.h" | 17 #include "content/public/common/sandbox_init.h" |
19 #include "content/utility/utility_thread_impl.h" | 18 #include "content/utility/utility_thread_impl.h" |
20 | 19 |
| 20 #if defined(OS_LINUX) |
| 21 #include "content/common/sandbox_linux/sandbox_linux.h" |
| 22 #endif |
| 23 |
21 #if defined(OS_WIN) | 24 #if defined(OS_WIN) |
22 #include "base/rand_util.h" | 25 #include "base/rand_util.h" |
23 #include "sandbox/win/src/sandbox.h" | 26 #include "sandbox/win/src/sandbox.h" |
24 #endif | 27 #endif |
25 | 28 |
26 namespace content { | 29 namespace content { |
27 | 30 |
28 // Mainline routine for running as the utility process. | 31 // Mainline routine for running as the utility process. |
29 int UtilityMain(const MainFunctionParams& parameters) { | 32 int UtilityMain(const MainFunctionParams& parameters) { |
30 // The main message loop of the utility process. | 33 // The main message loop of the utility process. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 #if defined(LEAK_SANITIZER) | 82 #if defined(LEAK_SANITIZER) |
80 // Invoke LeakSanitizer before shutting down the utility thread, to avoid | 83 // Invoke LeakSanitizer before shutting down the utility thread, to avoid |
81 // reporting shutdown-only leaks. | 84 // reporting shutdown-only leaks. |
82 __lsan_do_leak_check(); | 85 __lsan_do_leak_check(); |
83 #endif | 86 #endif |
84 | 87 |
85 return 0; | 88 return 0; |
86 } | 89 } |
87 | 90 |
88 } // namespace content | 91 } // namespace content |
OLD | NEW |