Chromium Code Reviews| Index: chrome/browser/importer/profile_writer.cc |
| diff --git a/chrome/browser/importer/profile_writer.cc b/chrome/browser/importer/profile_writer.cc |
| index ab5b4482d5c56d22c0cf2923f77fc3bceab658ad..b0bd173a87ed66f7dd21ec0902a9506594a91ee6 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 (!autofill_entries.empty() || web_data_service.get()) |
|
Ilya Sherman
2014/08/20 05:47:41
Hmm, why is this condition an 'or'? It seems like
Nikhil
2014/08/20 11:29:16
It should have been an 'and'. Thanks for catching
|
| + web_data_service->UpdateAutofillEntries(autofill_entries); |
| +} |
| + |
| ProfileWriter::~ProfileWriter() {} |