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

Unified Diff: chrome/browser/webdata/web_data_service_factory.cc

Issue 14081043: Hook up Autofill Backend interface to SyncableServices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 7 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
Index: chrome/browser/webdata/web_data_service_factory.cc
diff --git a/chrome/browser/webdata/web_data_service_factory.cc b/chrome/browser/webdata/web_data_service_factory.cc
index 95b557ba18667dd70a8c7257caa62af89dd540e3..5d619647fab3b23a46bad40ca5f4f374e462ac8d 100644
--- a/chrome/browser/webdata/web_data_service_factory.cc
+++ b/chrome/browser/webdata/web_data_service_factory.cc
@@ -42,17 +42,19 @@ void ProfileErrorCallback(sql::InitStatus status) {
void InitSyncableServicesOnDBThread(
scoped_refptr<AutofillWebDataService> autofill_web_data,
const base::FilePath& profile_path,
- const std::string& app_locale) {
+ const std::string& app_locale,
+ autofill::AutofillWebDataBackend* autofill_backend) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
// Currently only Autocomplete and Autofill profiles use the new Sync API, but
// all the database data should migrate to this API over time.
- AutocompleteSyncableService::CreateForWebDataService(autofill_web_data);
+ AutocompleteSyncableService::CreateForWebDataServiceAndBackend(
+ autofill_web_data, autofill_backend);
AutocompleteSyncableService::FromWebDataService(
autofill_web_data)->InjectStartSyncFlare(
sync_start_util::GetFlareForSyncableService(profile_path));
- AutofillProfileSyncableService::CreateForWebDataService(
- autofill_web_data, app_locale);
+ AutofillProfileSyncableService::CreateForWebDataServiceAndBackend(
+ autofill_web_data, autofill_backend, app_locale);
AutofillProfileSyncableService::FromWebDataService(
autofill_web_data)->InjectStartSyncFlare(
sync_start_util::GetFlareForSyncableService(profile_path));
@@ -99,12 +101,11 @@ WebDataServiceWrapper::WebDataServiceWrapper(Profile* profile) {
web_database_, base::Bind(&ProfileErrorCallback));
web_data_->Init();
- BrowserThread::PostTask(
- BrowserThread::DB, FROM_HERE,
- base::Bind(&InitSyncableServicesOnDBThread,
- autofill_web_data_,
- profile_path,
- g_browser_process->GetApplicationLocale()));
+autofill_web_data_->GetAutofillBackend(
+ base::Bind(&InitSyncableServicesOnDBThread,
+ autofill_web_data_,
+ profile_path,
+ g_browser_process->GetApplicationLocale()));
}
WebDataServiceWrapper::~WebDataServiceWrapper() {
« no previous file with comments | « chrome/browser/webdata/autofill_profile_syncable_service.cc ('k') | components/autofill/browser/webdata/autofill_webdata.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698