| Index: chrome/browser/sync/glue/model_association_manager.cc
|
| diff --git a/chrome/browser/sync/glue/model_association_manager.cc b/chrome/browser/sync/glue/model_association_manager.cc
|
| index 0e435e8d2d4edcf7329b461e38f23071b6516b3d..8cbb49ffa19692979024df532d8ffecf80c26f7f 100644
|
| --- a/chrome/browser/sync/glue/model_association_manager.cc
|
| +++ b/chrome/browser/sync/glue/model_association_manager.cc
|
| @@ -180,12 +180,12 @@ void ModelAssociationManager::Initialize(syncer::ModelTypeSet desired_types) {
|
| // currently MODEL_STARTING, ASSOCIATING, RUNNING or DISABLED.
|
| for (DataTypeController::TypeMap::const_iterator it = controllers_->begin();
|
| it != controllers_->end(); ++it) {
|
| - DataTypeController* dtc = (*it).second;
|
| - if (!desired_types.Has(dtc->type()) && (
|
| - dtc->state() == DataTypeController::MODEL_STARTING ||
|
| - dtc->state() == DataTypeController::ASSOCIATING ||
|
| - dtc->state() == DataTypeController::RUNNING ||
|
| - dtc->state() == DataTypeController::DISABLED)) {
|
| + DataTypeController* dtc = (*it).second.get();
|
| + if (!desired_types.Has(dtc->type()) &&
|
| + (dtc->state() == DataTypeController::MODEL_STARTING ||
|
| + dtc->state() == DataTypeController::ASSOCIATING ||
|
| + dtc->state() == DataTypeController::RUNNING ||
|
| + dtc->state() == DataTypeController::DISABLED)) {
|
| needs_stop_.push_back(dtc);
|
| DVLOG(1) << "ModelTypeToString: Will stop " << dtc->name();
|
| }
|
| @@ -265,7 +265,7 @@ void ModelAssociationManager::Stop() {
|
| state_ == INITIALIZED_TO_CONFIGURE);
|
| for (DataTypeController::TypeMap::const_iterator it = controllers_->begin();
|
| it != controllers_->end(); ++it) {
|
| - DataTypeController* dtc = (*it).second;
|
| + DataTypeController* dtc = (*it).second.get();
|
| if (dtc->state() != DataTypeController::NOT_RUNNING &&
|
| dtc->state() != DataTypeController::STOPPING) {
|
| dtc->Stop();
|
|
|