| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/importer/external_process_importer_client.h" | 5 #include "chrome/browser/importer/external_process_importer_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "build/build_config.h" |
| 9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/importer/external_process_importer_host.h" | 11 #include "chrome/browser/importer/external_process_importer_host.h" |
| 11 #include "chrome/browser/importer/in_process_importer_bridge.h" | 12 #include "chrome/browser/importer/in_process_importer_bridge.h" |
| 12 #include "chrome/common/importer/firefox_importer_utils.h" | 13 #include "chrome/common/importer/firefox_importer_utils.h" |
| 13 #include "chrome/common/importer/imported_bookmark_entry.h" | 14 #include "chrome/common/importer/imported_bookmark_entry.h" |
| 14 #include "chrome/common/importer/profile_import_process_messages.h" | 15 #include "chrome/common/importer/profile_import_process_messages.h" |
| 15 #include "chrome/grit/generated_resources.h" | 16 #include "chrome/grit/generated_resources.h" |
| 16 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/utility_process_host.h" | 18 #include "content/public/browser/utility_process_host.h" |
| 18 #include "grit/components_strings.h" | 19 #include "grit/components_strings.h" |
| 19 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
| 20 | 21 |
| 21 using content::BrowserThread; | 22 using content::BrowserThread; |
| 22 using content::UtilityProcessHost; | 23 using content::UtilityProcessHost; |
| 23 | 24 |
| 24 ExternalProcessImporterClient::ExternalProcessImporterClient( | 25 ExternalProcessImporterClient::ExternalProcessImporterClient( |
| 25 base::WeakPtr<ExternalProcessImporterHost> importer_host, | 26 base::WeakPtr<ExternalProcessImporterHost> importer_host, |
| 26 const importer::SourceProfile& source_profile, | 27 const importer::SourceProfile& source_profile, |
| 27 uint16 items, | 28 uint16_t items, |
| 28 InProcessImporterBridge* bridge) | 29 InProcessImporterBridge* bridge) |
| 29 : total_bookmarks_count_(0), | 30 : total_bookmarks_count_(0), |
| 30 total_history_rows_count_(0), | 31 total_history_rows_count_(0), |
| 31 total_favicons_count_(0), | 32 total_favicons_count_(0), |
| 32 process_importer_host_(importer_host), | 33 process_importer_host_(importer_host), |
| 33 source_profile_(source_profile), | 34 source_profile_(source_profile), |
| 34 items_(items), | 35 items_(items), |
| 35 bridge_(bridge), | 36 bridge_(bridge), |
| 36 cancelled_(false) { | 37 cancelled_(false) { |
| 37 process_importer_host_->NotifyImportStarted(); | 38 process_importer_host_->NotifyImportStarted(); |
| (...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 localized_strings.SetString( | 346 localized_strings.SetString( |
| 346 base::IntToString(IDS_IMPORT_FROM_SAFARI), | 347 base::IntToString(IDS_IMPORT_FROM_SAFARI), |
| 347 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); | 348 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); |
| 348 localized_strings.SetString( | 349 localized_strings.SetString( |
| 349 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), | 350 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), |
| 350 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); | 351 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); |
| 351 | 352 |
| 352 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( | 353 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( |
| 353 source_profile_, items_, localized_strings)); | 354 source_profile_, items_, localized_strings)); |
| 354 } | 355 } |
| OLD | NEW |