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

Unified Diff: chrome/browser/ui/webui/options/import_data_handler.cc

Issue 480953002: Implement "Autofill form data" import for Firefox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review feedback (simplify Read method) Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/import_data_handler.cc
diff --git a/chrome/browser/ui/webui/options/import_data_handler.cc b/chrome/browser/ui/webui/options/import_data_handler.cc
index 5481cf82c7a8d77cac9ecb48c6b4455c21ea61bf..c8682778e4d1fa08af4e9cd992fc3a8db63b5891 100644
--- a/chrome/browser/ui/webui/options/import_data_handler.cc
+++ b/chrome/browser/ui/webui/options/import_data_handler.cc
@@ -55,20 +55,21 @@ void ImportDataHandler::GetLocalizedValues(
DCHECK(localized_strings);
static OptionsStringResource resources[] = {
- { "importFromLabel", IDS_IMPORT_FROM_LABEL },
- { "importLoading", IDS_IMPORT_LOADING_PROFILES },
- { "importDescription", IDS_IMPORT_ITEMS_LABEL },
- { "importHistory", IDS_IMPORT_HISTORY_CHKBOX },
- { "importFavorites", IDS_IMPORT_FAVORITES_CHKBOX },
- { "importSearch", IDS_IMPORT_SEARCH_ENGINES_CHKBOX },
- { "importPasswords", IDS_IMPORT_PASSWORDS_CHKBOX },
- { "importChooseFile", IDS_IMPORT_CHOOSE_FILE },
- { "importCommit", IDS_IMPORT_COMMIT },
- { "noProfileFound", IDS_IMPORT_NO_PROFILE_FOUND },
- { "importSucceeded", IDS_IMPORT_SUCCEEDED },
- { "findYourImportedBookmarks", IDS_IMPORT_FIND_YOUR_BOOKMARKS },
+ {"importFromLabel", IDS_IMPORT_FROM_LABEL},
+ {"importLoading", IDS_IMPORT_LOADING_PROFILES},
+ {"importDescription", IDS_IMPORT_ITEMS_LABEL},
+ {"importHistory", IDS_IMPORT_HISTORY_CHKBOX},
+ {"importFavorites", IDS_IMPORT_FAVORITES_CHKBOX},
+ {"importSearch", IDS_IMPORT_SEARCH_ENGINES_CHKBOX},
+ {"importPasswords", IDS_IMPORT_PASSWORDS_CHKBOX},
+ {"importAutofillFormData", IDS_IMPORT_AUTOFILL_FORM_DATA_CHKBOX},
+ {"importChooseFile", IDS_IMPORT_CHOOSE_FILE},
+ {"importCommit", IDS_IMPORT_COMMIT},
+ {"noProfileFound", IDS_IMPORT_NO_PROFILE_FOUND},
+ {"importSucceeded", IDS_IMPORT_SUCCEEDED},
+ {"findYourImportedBookmarks", IDS_IMPORT_FIND_YOUR_BOOKMARKS},
#if defined(OS_MACOSX)
- { "macPasswordKeychain", IDS_IMPORT_PASSWORD_KEYCHAIN_WARNING },
+ {"macPasswordKeychain", IDS_IMPORT_PASSWORD_KEYCHAIN_WARNING},
#endif
};
@@ -152,6 +153,9 @@ void ImportDataHandler::ImportData(const base::ListValue* args) {
if (args->GetString(4, &string_value) && string_value == "true") {
selected_items |= importer::SEARCH_ENGINES;
}
+ if (args->GetString(5, &string_value) && string_value == "true") {
+ selected_items |= importer::AUTOFILL_FORM_DATA;
+ }
const importer::SourceProfile& source_profile =
importer_list_->GetSourceProfileAt(browser_index);
@@ -186,6 +190,8 @@ void ImportDataHandler::InitializePage() {
(browser_services & importer::PASSWORDS) != 0);
browser_profile->SetBoolean("search",
(browser_services & importer::SEARCH_ENGINES) != 0);
+ browser_profile->SetBoolean("autofill-form-data",
+ (browser_services & importer::AUTOFILL_FORM_DATA) != 0);
browser_profile->SetBoolean("show_bottom_bar",
#if defined(OS_MACOSX)
« no previous file with comments | « chrome/browser/ui/browser_ui_prefs.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698