OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/system_monitor.h" | |
9 #include "chrome/common/child_process.h" | 8 #include "chrome/common/child_process.h" |
10 #include "chrome/common/chrome_constants.h" | 9 #include "chrome/common/chrome_constants.h" |
11 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
12 #include "chrome/common/logging_chrome.h" | 11 #include "chrome/common/logging_chrome.h" |
13 #include "chrome/common/main_function_params.h" | 12 #include "chrome/common/main_function_params.h" |
14 #include "chrome/profile_import/profile_import_thread.h" | 13 #include "chrome/profile_import/profile_import_thread.h" |
15 | 14 |
16 // Mainline routine for running as the profile import process. | 15 // Mainline routine for running as the profile import process. |
17 int ProfileImportMain(const MainFunctionParams& parameters) { | 16 int ProfileImportMain(const MainFunctionParams& parameters) { |
18 // The main message loop of the profile import process. | 17 // The main message loop of the profile import process. |
19 MessageLoop main_message_loop; | 18 MessageLoop main_message_loop; |
20 std::wstring app_name = chrome::kBrowserAppName; | 19 std::wstring app_name = chrome::kBrowserAppName; |
21 PlatformThread::SetName(WideToASCII( | 20 PlatformThread::SetName(WideToASCII( |
22 app_name + L"_ProfileImportMain").c_str()); | 21 app_name + L"_ProfileImportMain").c_str()); |
23 | 22 |
24 ChildProcess profile_import_process; | 23 ChildProcess profile_import_process; |
25 profile_import_process.set_main_thread(new ProfileImportThread()); | 24 profile_import_process.set_main_thread(new ProfileImportThread()); |
26 | 25 |
27 MessageLoop::current()->Run(); | 26 MessageLoop::current()->Run(); |
28 | 27 |
29 return 0; | 28 return 0; |
30 } | 29 } |
OLD | NEW |