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

Side by Side Diff: components/sync_driver/model_association_manager.cc

Issue 554233002: Refactoring the WeakPtrFactory usage, Member variables should appear before the WeakPtrFactory, to … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync_driver/model_association_manager.h" 5 #include "components/sync_driver/model_association_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 9
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 } // namespace 109 } // namespace
110 110
111 ModelAssociationManager::ModelAssociationManager( 111 ModelAssociationManager::ModelAssociationManager(
112 const DataTypeController::TypeMap* controllers, 112 const DataTypeController::TypeMap* controllers,
113 ModelAssociationManagerDelegate* processor) 113 ModelAssociationManagerDelegate* processor)
114 : state_(IDLE), 114 : state_(IDLE),
115 controllers_(controllers), 115 controllers_(controllers),
116 delegate_(processor), 116 delegate_(processor),
117 weak_ptr_factory_(this), 117 configure_status_(DataTypeManager::UNKNOWN),
118 configure_status_(DataTypeManager::UNKNOWN) { 118 weak_ptr_factory_(this) {
119 // Ensure all data type controllers are stopped. 119 // Ensure all data type controllers are stopped.
120 for (DataTypeController::TypeMap::const_iterator it = controllers_->begin(); 120 for (DataTypeController::TypeMap::const_iterator it = controllers_->begin();
121 it != controllers_->end(); ++it) { 121 it != controllers_->end(); ++it) {
122 DCHECK_EQ(DataTypeController::NOT_RUNNING, (*it).second->state()); 122 DCHECK_EQ(DataTypeController::NOT_RUNNING, (*it).second->state());
123 } 123 }
124 } 124 }
125 125
126 ModelAssociationManager::~ModelAssociationManager() { 126 ModelAssociationManager::~ModelAssociationManager() {
127 } 127 }
128 128
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 delegate_->OnModelAssociationDone(result); 409 delegate_->OnModelAssociationDone(result);
410 } 410 }
411 411
412 base::OneShotTimer<ModelAssociationManager>* 412 base::OneShotTimer<ModelAssociationManager>*
413 ModelAssociationManager::GetTimerForTesting() { 413 ModelAssociationManager::GetTimerForTesting() {
414 return &timer_; 414 return &timer_;
415 } 415 }
416 416
417 } // namespace sync_driver 417 } // namespace sync_driver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698