| 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
|
|
|