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

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

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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/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();

Powered by Google App Engine
This is Rietveld 408576698