| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/app_switches.h" | 5 #include "app/app_switches.h" |
| 6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.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 "chrome/common/child_process.h" | 12 #include "chrome/common/child_process.h" |
| 13 #include "chrome/common/chrome_constants.h" | 13 #include "chrome/common/chrome_constants.h" |
| 14 #include "chrome/common/chrome_paths.h" | 14 #include "chrome/common/chrome_paths.h" |
| 15 #include "chrome/common/extensions/extension_l10n_util.h" | 15 #include "chrome/common/extensions/extension_l10n_util.h" |
| 16 #include "chrome/common/hi_res_timer_manager.h" | 16 #include "chrome/common/hi_res_timer_manager.h" |
| 17 #include "chrome/common/logging_chrome.h" | 17 #include "chrome/common/logging_chrome.h" |
| 18 #include "chrome/common/main_function_params.h" | 18 #include "chrome/common/main_function_params.h" |
| 19 #include "chrome/utility/utility_thread.h" | 19 #include "chrome/utility/utility_thread.h" |
| 20 #include "ui/base/system_monitor/system_monitor.h" | 20 #include "ui/base/system_monitor/system_monitor.h" |
| 21 #include "ui/base/ui_base_switches.h" |
| 21 | 22 |
| 22 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 23 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/sandbox_init_wrapper.h" | 25 #include "chrome/common/sandbox_init_wrapper.h" |
| 25 #include "sandbox/src/sandbox.h" | 26 #include "sandbox/src/sandbox.h" |
| 26 #endif // defined(OS_WIN) | 27 #endif // defined(OS_WIN) |
| 27 | 28 |
| 28 // Mainline routine for running as the utility process. | 29 // Mainline routine for running as the utility process. |
| 29 int UtilityMain(const MainFunctionParams& parameters) { | 30 int UtilityMain(const MainFunctionParams& parameters) { |
| 30 // The main message loop of the utility process. | 31 // The main message loop of the utility process. |
| (...skipping 27 matching lines...) Expand all Loading... |
| 58 | 59 |
| 59 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 60 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 60 std::string lang = command_line->GetSwitchValueASCII(switches::kLang); | 61 std::string lang = command_line->GetSwitchValueASCII(switches::kLang); |
| 61 if (!lang.empty()) | 62 if (!lang.empty()) |
| 62 extension_l10n_util::SetProcessLocale(lang); | 63 extension_l10n_util::SetProcessLocale(lang); |
| 63 | 64 |
| 64 MessageLoop::current()->Run(); | 65 MessageLoop::current()->Run(); |
| 65 | 66 |
| 66 return 0; | 67 return 0; |
| 67 } | 68 } |
| OLD | NEW |