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

Unified Diff: chrome/browser/importer/profile_writer.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/importer/profile_writer.h ('k') | chrome/browser/resources/options/import_data_overlay.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/profile_writer.cc
diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc
index 6bf93dc79ef4477c79149762385d766251581abc..e94344a099529212ca0000b50a1d843c727d70d0 100644
--- a/chrome/browser/importer/profile_writer.cc
+++ b/chrome/browser/importer/profile_writer.cc
@@ -22,9 +22,11 @@
#include "chrome/browser/password_manager/password_store_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/importer/imported_bookmark_entry.h"
#include "chrome/common/importer/imported_favicon_usage.h"
#include "chrome/common/pref_names.h"
+#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/password_manager/core/browser/password_store.h"
#include "components/search_engines/template_url.h"
@@ -329,4 +331,13 @@ void ProfileWriter::AddKeywords(ScopedVector<TemplateURL> template_urls,
}
}
+void ProfileWriter::AddAutofillFormDataEntries(
+ const std::vector<autofill::AutofillEntry>& autofill_entries) {
+ scoped_refptr<autofill::AutofillWebDataService> web_data_service =
+ WebDataServiceFactory::GetAutofillWebDataForProfile(
+ profile_, Profile::EXPLICIT_ACCESS);
+ if (web_data_service.get())
+ web_data_service->UpdateAutofillEntries(autofill_entries);
+}
+
ProfileWriter::~ProfileWriter() {}
« no previous file with comments | « chrome/browser/importer/profile_writer.h ('k') | chrome/browser/resources/options/import_data_overlay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698