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

Unified Diff: chrome/browser/sync/glue/password_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/password_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/password_data_type_controller.cc b/chrome/browser/sync/glue/password_data_type_controller.cc
index 10985cfa44b8d7640bee17ecff357170099653c9..1e0ee682a07b82bec8024dbef935903fad6f3f85 100644
--- a/chrome/browser/sync/glue/password_data_type_controller.cc
+++ b/chrome/browser/sync/glue/password_data_type_controller.cc
@@ -30,6 +30,15 @@ PasswordDataTypeController::PasswordDataTypeController(
PasswordDataTypeController::~PasswordDataTypeController() {
}
+bool PasswordDataTypeController::PostTaskOnBackendThread(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ DCHECK(password_store_.get());
+ password_store_->ScheduleTask(task);
+ return true;
+}
+
bool PasswordDataTypeController::StartModels() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(state(), MODEL_STARTING);
@@ -45,15 +54,6 @@ bool PasswordDataTypeController::StartModels() {
return true;
}
-bool PasswordDataTypeController::StartAssociationAsync() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(state(), ASSOCIATING);
- DCHECK(password_store_.get());
- password_store_->ScheduleTask(
- base::Bind(&PasswordDataTypeController::StartAssociation, this));
- return true;
-}
-
void PasswordDataTypeController::CreateSyncComponents() {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(state(), ASSOCIATING);
@@ -66,15 +66,6 @@ void PasswordDataTypeController::CreateSyncComponents() {
set_change_processor(sync_components.change_processor);
}
-bool PasswordDataTypeController::StopAssociationAsync() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- DCHECK_EQ(state(), STOPPING);
- DCHECK(password_store_.get());
- password_store_->ScheduleTask(
- base::Bind(&PasswordDataTypeController::StopAssociation, this));
- return true;
-}
-
syncable::ModelType PasswordDataTypeController::type() const {
return syncable::PASSWORDS;
}
« no previous file with comments | « chrome/browser/sync/glue/password_data_type_controller.h ('k') | chrome/browser/sync/glue/typed_url_data_type_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698