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

Unified Diff: chrome/browser/sync/glue/autofill_profile_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_profile_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
index f358b762a1b09544ca6afefa3139c6dc8d497dd6..882e898c3b639715729c431063a4c4bd89d6f45e 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.cc
@@ -78,6 +78,13 @@ void AutofillProfileDataTypeController::Observe(
DoStartAssociationAsync();
}
+bool AutofillProfileDataTypeController::PostTaskOnBackendThread(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return BrowserThread::PostTask(BrowserThread::DB, from_here, task);
+}
+
void AutofillProfileDataTypeController::DoStartAssociationAsync() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(state(), MODEL_STARTING);
@@ -90,14 +97,6 @@ void AutofillProfileDataTypeController::DoStartAssociationAsync() {
}
}
-bool AutofillProfileDataTypeController::StartAssociationAsync() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(state(), ASSOCIATING);
- return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- base::Bind(&AutofillProfileDataTypeController::StartAssociation,
- this));
-}
-
base::WeakPtr<SyncableService>
AutofillProfileDataTypeController::GetWeakPtrToSyncableService() const {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB));
@@ -112,11 +111,6 @@ void AutofillProfileDataTypeController::StopModels() {
personal_data_->RemoveObserver(this);
}
-void AutofillProfileDataTypeController::StopLocalServiceAsync() {
- BrowserThread::PostTask(BrowserThread::DB, FROM_HERE,
- base::Bind(&AutofillProfileDataTypeController::StopLocalService,
- this));
-}
syncable::ModelType AutofillProfileDataTypeController::type() const {
return syncable::AUTOFILL_PROFILE;
}

Powered by Google App Engine
This is Rietveld 408576698