Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: chrome/browser/importer/external_process_importer_client.cc

Issue 616763002: Importing certain bookmarks from firefox and HTML file as search engines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed dependency issue. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/importer/external_process_importer_client.h ('k') | chrome/browser/importer/firefox_importer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698