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

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

Issue 9264062: [Sync] Consolidate DataTypeController methods that post on the backend thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add suppressions Created 8 years, 11 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/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 bfefa446c16d688f6af2b4a293a2d7d5e61bb391..ed49636cef7cab1a5b16c548e7012c67594ffa74 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller.cc
@@ -30,6 +30,13 @@ AutofillDataTypeController::~AutofillDataTypeController() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
+bool AutofillDataTypeController::PostTaskOnBackendThread(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return BrowserThread::PostTask(BrowserThread::DB, from_here, task);
+}
+
bool AutofillDataTypeController::StartModels() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(MODEL_STARTING, state());
@@ -60,13 +67,6 @@ void AutofillDataTypeController::Observe(
}
}
-bool AutofillDataTypeController::StartAssociationAsync() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(ASSOCIATING, state());
- return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- base::Bind(&AutofillDataTypeController::StartAssociation, this));
-}
-
base::WeakPtr<SyncableService>
AutofillDataTypeController::GetWeakPtrToSyncableService() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
@@ -81,12 +81,6 @@ void AutofillDataTypeController::StopModels() {
notification_registrar_.RemoveAll();
}
-void AutofillDataTypeController::StopLocalServiceAsync() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- base::Bind(&AutofillDataTypeController::StopLocalService, this));
-}
-
syncable::ModelType AutofillDataTypeController::type() const {
return syncable::AUTOFILL;
}

Powered by Google App Engine
This is Rietveld 408576698