| 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_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 void ProfileImportProcessHost::OnMessageReceived(const IPC::Message& message) { | 121 void ProfileImportProcessHost::OnMessageReceived(const IPC::Message& message) { |
| 122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 122 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 123 BrowserThread::PostTask( | 123 BrowserThread::PostTask( |
| 124 thread_id_, FROM_HERE, | 124 thread_id_, FROM_HERE, |
| 125 NewRunnableMethod(import_process_client_.get(), | 125 NewRunnableMethod(import_process_client_.get(), |
| 126 &ImportProcessClient::OnMessageReceived, | 126 &ImportProcessClient::OnMessageReceived, |
| 127 message)); | 127 message)); |
| 128 } | 128 } |
| 129 | 129 |
| 130 void ProfileImportProcessHost::OnProcessCrashed() { | 130 void ProfileImportProcessHost::OnProcessCrashed(int exit_code) { |
| 131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 131 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 132 BrowserThread::PostTask( | 132 BrowserThread::PostTask( |
| 133 thread_id_, FROM_HERE, | 133 thread_id_, FROM_HERE, |
| 134 NewRunnableMethod(import_process_client_.get(), | 134 NewRunnableMethod(import_process_client_.get(), |
| 135 &ImportProcessClient::OnProcessCrashed)); | 135 &ImportProcessClient::OnProcessCrashed, |
| 136 exit_code)); |
| 136 } | 137 } |
| 137 | 138 |
| 138 bool ProfileImportProcessHost::CanShutdown() { | 139 bool ProfileImportProcessHost::CanShutdown() { |
| 139 return true; | 140 return true; |
| 140 } | 141 } |
| 141 | 142 |
| 142 URLRequestContext* ProfileImportProcessHost::GetRequestContext( | 143 URLRequestContext* ProfileImportProcessHost::GetRequestContext( |
| 143 uint32 request_id, | 144 uint32 request_id, |
| 144 const ViewHostMsg_Resource_Request& request_data) { | 145 const ViewHostMsg_Resource_Request& request_data) { |
| 145 return NULL; | 146 return NULL; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 176 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart, | 177 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportStart, |
| 177 ImportProcessClient::OnFavIconsImportStart) | 178 ImportProcessClient::OnFavIconsImportStart) |
| 178 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup, | 179 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyFavIconsImportGroup, |
| 179 ImportProcessClient::OnFavIconsImportGroup) | 180 ImportProcessClient::OnFavIconsImportGroup) |
| 180 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady, | 181 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyPasswordFormReady, |
| 181 ImportProcessClient::OnPasswordFormImportReady) | 182 ImportProcessClient::OnPasswordFormImportReady) |
| 182 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady, | 183 IPC_MESSAGE_HANDLER(ProfileImportProcessHostMsg_NotifyKeywordsReady, |
| 183 ImportProcessClient::OnKeywordsImportReady) | 184 ImportProcessClient::OnKeywordsImportReady) |
| 184 IPC_END_MESSAGE_MAP_EX() | 185 IPC_END_MESSAGE_MAP_EX() |
| 185 } | 186 } |
| OLD | NEW |