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 "chrome/browser/profile_import_process_host.h" | 5 #include "chrome/browser/profile_import_process_host.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
11 #include "base/values.h" | 11 #include "base/values.h" |
12 #include "chrome/browser/importer/firefox_importer_utils.h" | 12 #include "chrome/browser/importer/firefox_importer_utils.h" |
13 #include "chrome/browser/importer/importer_messages.h" | 13 #include "chrome/browser/importer/importer_messages.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "ipc/ipc_switches.h" | 16 #include "ipc/ipc_switches.h" |
17 | 17 |
18 ProfileImportProcessHost::ProfileImportProcessHost( | 18 ProfileImportProcessHost::ProfileImportProcessHost( |
19 ResourceDispatcherHost* resource_dispatcher, | 19 ResourceDispatcherHost* resource_dispatcher, |
20 ImportProcessClient* import_process_client, | 20 ImportProcessClient* import_process_client, |
21 ChromeThread::ID thread_id) | 21 ChromeThread::ID thread_id) |
22 : ChildProcessHost(PROFILE_IMPORT_PROCESS, resource_dispatcher), | 22 : BrowserChildProcessHost(PROFILE_IMPORT_PROCESS, resource_dispatcher), |
23 import_process_client_(import_process_client), | 23 import_process_client_(import_process_client), |
24 thread_id_(thread_id) { | 24 thread_id_(thread_id) { |
25 } | 25 } |
26 | 26 |
27 bool ProfileImportProcessHost::StartProfileImportProcess( | 27 bool ProfileImportProcessHost::StartProfileImportProcess( |
28 const importer::ProfileInfo& profile_info, int items, | 28 const importer::ProfileInfo& profile_info, int items, |
29 bool import_to_bookmark_bar) { | 29 bool import_to_bookmark_bar) { |
30 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); | 30 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
31 if (!StartProcess()) | 31 if (!StartProcess()) |
32 return false; | 32 return false; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart, | 160 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart, |
161 ImportProcessClient::OnFavIconsImportStart) | 161 ImportProcessClient::OnFavIconsImportStart) |
162 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup, | 162 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup, |
163 ImportProcessClient::OnFavIconsImportGroup) | 163 ImportProcessClient::OnFavIconsImportGroup) |
164 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady, | 164 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady, |
165 ImportProcessClient::OnPasswordFormImportReady) | 165 ImportProcessClient::OnPasswordFormImportReady) |
166 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady, | 166 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady, |
167 ImportProcessClient::OnKeywordsImportReady) | 167 ImportProcessClient::OnKeywordsImportReady) |
168 IPC_END_MESSAGE_MAP_EX() | 168 IPC_END_MESSAGE_MAP_EX() |
169 } | 169 } |
OLD | NEW |