| Index: components/sync_driver/non_blocking_data_type_manager.cc
|
| diff --git a/components/sync_driver/non_blocking_data_type_manager.cc b/components/sync_driver/non_blocking_data_type_manager.cc
|
| index 9aa8aac2e983ca67f81ff49181674449c1b099d9..391077fc4cc4133cc937f5ce7cf6a6c6f4891765 100644
|
| --- a/components/sync_driver/non_blocking_data_type_manager.cc
|
| +++ b/components/sync_driver/non_blocking_data_type_manager.cc
|
| @@ -10,11 +10,11 @@
|
|
|
| namespace sync_driver {
|
|
|
| -NonBlockingDataTypeManager::NonBlockingDataTypeManager()
|
| - : non_blocking_data_type_controllers_deleter_(
|
| - &non_blocking_data_type_controllers_) {}
|
| +NonBlockingDataTypeManager::NonBlockingDataTypeManager() {
|
| +}
|
|
|
| -NonBlockingDataTypeManager::~NonBlockingDataTypeManager() {}
|
| +NonBlockingDataTypeManager::~NonBlockingDataTypeManager() {
|
| +}
|
|
|
| void NonBlockingDataTypeManager::RegisterType(
|
| syncer::ModelType type,
|
| @@ -22,18 +22,15 @@ void NonBlockingDataTypeManager::RegisterType(
|
| DCHECK_EQ(0U, non_blocking_data_type_controllers_.count(type))
|
| << "Duplicate registration of type " << ModelTypeToString(type);
|
|
|
| - non_blocking_data_type_controllers_.insert(std::make_pair(
|
| - type,
|
| - new NonBlockingDataTypeController(
|
| - type,
|
| - enabled)));
|
| + non_blocking_data_type_controllers_.insert(
|
| + type, make_scoped_ptr(new NonBlockingDataTypeController(type, enabled)));
|
| }
|
|
|
| void NonBlockingDataTypeManager::InitializeType(
|
| syncer::ModelType type,
|
| const scoped_refptr<base::SequencedTaskRunner>& task_runner,
|
| const base::WeakPtr<syncer::ModelTypeSyncProxyImpl>& proxy_impl) {
|
| - NonBlockingDataTypeControllerMap::iterator it =
|
| + NonBlockingDataTypeControllerMap::const_iterator it =
|
| non_blocking_data_type_controllers_.find(type);
|
| DCHECK(it != non_blocking_data_type_controllers_.end());
|
| it->second->InitializeType(task_runner, proxy_impl);
|
| @@ -41,16 +38,16 @@ void NonBlockingDataTypeManager::InitializeType(
|
|
|
| void NonBlockingDataTypeManager::ConnectSyncBackend(
|
| scoped_ptr<syncer::SyncContextProxy> proxy) {
|
| - for (NonBlockingDataTypeControllerMap::iterator it =
|
| - non_blocking_data_type_controllers_.begin();
|
| + for (NonBlockingDataTypeControllerMap::const_iterator it =
|
| + non_blocking_data_type_controllers_.begin();
|
| it != non_blocking_data_type_controllers_.end(); ++it) {
|
| it->second->InitializeSyncContext(proxy->Clone());
|
| }
|
| }
|
|
|
| void NonBlockingDataTypeManager::DisconnectSyncBackend() {
|
| - for (NonBlockingDataTypeControllerMap::iterator it =
|
| - non_blocking_data_type_controllers_.begin();
|
| + for (NonBlockingDataTypeControllerMap::const_iterator it =
|
| + non_blocking_data_type_controllers_.begin();
|
| it != non_blocking_data_type_controllers_.end(); ++it) {
|
| it->second->ClearSyncContext();
|
| }
|
| @@ -58,8 +55,8 @@ void NonBlockingDataTypeManager::DisconnectSyncBackend() {
|
|
|
| void NonBlockingDataTypeManager::SetPreferredTypes(
|
| syncer::ModelTypeSet preferred_types) {
|
| - for (NonBlockingDataTypeControllerMap::iterator it =
|
| - non_blocking_data_type_controllers_.begin();
|
| + for (NonBlockingDataTypeControllerMap::const_iterator it =
|
| + non_blocking_data_type_controllers_.begin();
|
| it != non_blocking_data_type_controllers_.end(); ++it) {
|
| it->second->SetIsPreferred(preferred_types.Has(it->first));
|
| }
|
|
|