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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the previous fix Created 9 years, 8 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/frontend_data_type_controller.cc
diff --git a/chrome/browser/sync/glue/frontend_data_type_controller.cc b/chrome/browser/sync/glue/frontend_data_type_controller.cc
index edec12ce9388ed79c9745f67414c7b3697974569..372f4fc09dbfe0c87e6eda71276054e95a193dfb 100644
--- a/chrome/browser/sync/glue/frontend_data_type_controller.cc
+++ b/chrome/browser/sync/glue/frontend_data_type_controller.cc
@@ -107,7 +107,7 @@ void FrontendDataTypeController::StartFailed(StartResult result,
const tracked_objects::Location& location) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
CleanUpState();
- model_associator_.reset();
+ model_associator_ = NULL; // scoped_refptr, so set to NULL to release.
change_processor_.reset();
state_ = NOT_RUNNING;
RecordStartFailure(result);
@@ -144,14 +144,14 @@ void FrontendDataTypeController::Stop() {
CleanUpState();
- if (change_processor_ != NULL)
+ if (change_processor_.get())
sync_service_->DeactivateDataType(this, change_processor_.get());
- if (model_associator_ != NULL)
+ if (model_associator_.get())
model_associator_->DisassociateModels();
+ model_associator_ = NULL; // scoped_refptr, so set to NULL to release.
change_processor_.reset();
- model_associator_.reset();
state_ = NOT_RUNNING;
}
@@ -181,4 +181,13 @@ void FrontendDataTypeController::OnUnrecoverableError(
sync_service_->OnUnrecoverableError(from_here, message);
}
+NewAssociatorInterface* FrontendDataTypeController::model_associator() const {
+ return model_associator_.get();
+}
+
+void FrontendDataTypeController::set_model_associator(
+ AssociatorInterface* associator) {
+ model_associator_ = reinterpret_cast<NewAssociatorInterface*>(associator);
+}
+
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698