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

Unified Diff: chrome/browser/sync/glue/autofill_data_type_controller.cc

Issue 72613006: Eliminate AutofillWebDataService::FromBrowserContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years 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/sync/glue/autofill_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller.cc b/chrome/browser/sync/glue/autofill_data_type_controller.cc
index 3c8f0cf9943d915090028434197f02389b76b2c7..daa2852c5007080c77dd5bde1b700369a27edb0e 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/sync/profile_sync_service.h"
#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/webdata/autocomplete_syncable_service.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
#include "content/public/browser/browser_thread.h"
#include "sync/api/sync_error.h"
@@ -59,7 +60,8 @@ bool AutofillDataTypeController::StartModels() {
DCHECK_EQ(MODEL_STARTING, state());
autofill::AutofillWebDataService* web_data_service =
- autofill::AutofillWebDataService::FromBrowserContext(profile()).get();
+ WebDataServiceFactory::GetAutofillWebDataForProfile(
+ profile(), Profile::EXPLICIT_ACCESS).get();
if (!web_data_service)
return false;
@@ -87,7 +89,8 @@ void AutofillDataTypeController::StartAssociating(
profile());
DCHECK(sync);
scoped_refptr<autofill::AutofillWebDataService> web_data_service =
- autofill::AutofillWebDataService::FromBrowserContext(profile());
+ WebDataServiceFactory::GetAutofillWebDataForProfile(
+ profile(), Profile::EXPLICIT_ACCESS);
bool cull_expired_entries = sync->current_experiments().autofill_culling;
// First, post the update task to the DB thread, which guarantees us it
// would run before anything StartAssociating does (e.g.

Powered by Google App Engine
This is Rietveld 408576698