| 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 "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/importer/external_process_importer_host.h" | 10 #include "chrome/browser/importer/external_process_importer_host.h" |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 void ExternalProcessImporterClient::OnPasswordFormImportReady( | 234 void ExternalProcessImporterClient::OnPasswordFormImportReady( |
| 235 const autofill::PasswordForm& form) { | 235 const autofill::PasswordForm& form) { |
| 236 if (cancelled_) | 236 if (cancelled_) |
| 237 return; | 237 return; |
| 238 | 238 |
| 239 bridge_->SetPasswordForm(form); | 239 bridge_->SetPasswordForm(form); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void ExternalProcessImporterClient::OnKeywordsImportReady( | 242 void ExternalProcessImporterClient::OnKeywordsImportReady( |
| 243 const std::vector<importer::URLKeywordInfo>& url_keywords, | 243 const std::vector<importer::SearchEngineInfo>& search_engines, |
| 244 bool unique_on_host_and_path) { | 244 bool unique_on_host_and_path) { |
| 245 if (cancelled_) | 245 if (cancelled_) |
| 246 return; | 246 return; |
| 247 bridge_->SetKeywords(url_keywords, unique_on_host_and_path); | 247 bridge_->SetKeywords(search_engines, unique_on_host_and_path); |
| 248 } | 248 } |
| 249 | 249 |
| 250 void ExternalProcessImporterClient::OnFirefoxSearchEngineDataReceived( | 250 void ExternalProcessImporterClient::OnFirefoxSearchEngineDataReceived( |
| 251 const std::vector<std::string> search_engine_data) { | 251 const std::vector<std::string> search_engine_data) { |
| 252 if (cancelled_) | 252 if (cancelled_) |
| 253 return; | 253 return; |
| 254 bridge_->SetFirefoxSearchEnginesXMLData(search_engine_data); | 254 bridge_->SetFirefoxSearchEnginesXMLData(search_engine_data); |
| 255 } | 255 } |
| 256 | 256 |
| 257 void ExternalProcessImporterClient::OnAutofillFormDataImportStart( | 257 void ExternalProcessImporterClient::OnAutofillFormDataImportStart( |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 localized_strings.SetString( | 343 localized_strings.SetString( |
| 344 base::IntToString(IDS_IMPORT_FROM_SAFARI), | 344 base::IntToString(IDS_IMPORT_FROM_SAFARI), |
| 345 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); | 345 l10n_util::GetStringUTF8(IDS_IMPORT_FROM_SAFARI)); |
| 346 localized_strings.SetString( | 346 localized_strings.SetString( |
| 347 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), | 347 base::IntToString(IDS_BOOKMARK_BAR_FOLDER_NAME), |
| 348 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); | 348 l10n_util::GetStringUTF8(IDS_BOOKMARK_BAR_FOLDER_NAME)); |
| 349 | 349 |
| 350 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( | 350 utility_process_host_->Send(new ProfileImportProcessMsg_StartImport( |
| 351 source_profile_, items_, localized_strings)); | 351 source_profile_, items_, localized_strings)); |
| 352 } | 352 } |
| OLD | NEW |