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

Unified Diff: chrome/browser/sync/glue/non_frontend_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/non_frontend_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
index 3ae6efee88032c58b05d8b6bf77c838e046b59a7..69ff0ace4d7bf89f55d9e292da5e27450f8e9015 100644
--- a/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/non_frontend_data_type_controller.cc
@@ -278,6 +278,23 @@ void NonFrontendDataTypeController::OnUnrecoverableErrorImpl(
profile_sync_service_->OnUnrecoverableError(from_here, message);
}
+bool NonFrontendDataTypeController::StartAssociationAsync() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_EQ(state(), ASSOCIATING);
+ return PostTaskOnBackendThread(
+ FROM_HERE,
+ base::Bind(&NonFrontendDataTypeController::StartAssociation, this));
+}
+
+bool NonFrontendDataTypeController::StopAssociationAsync() {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK_EQ(state(), STOPPING);
+ return PostTaskOnBackendThread(
+ FROM_HERE,
+ base::Bind(
+ &NonFrontendDataTypeController::StopAssociation, this));
+}
+
ProfileSyncComponentsFactory*
NonFrontendDataTypeController::profile_sync_factory() const {
return profile_sync_factory_;

Powered by Google App Engine
This is Rietveld 408576698