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

Side by Side Diff: components/sync_driver/non_blocking_data_type_manager.h

Issue 1096983002: Update usages of std::map to use ScopedPtrMap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@passwordmanager-scopedmemory
Patch Set: Rebase. Created 5 years, 5 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 #ifndef COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_MANAGER_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_MANAGER_H_
6 #define COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_MANAGER_H_ 6 #define COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_MANAGER_H_
7 7
8 #include <map> 8 #include "base/containers/scoped_ptr_map.h"
9
10 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
13 #include "base/stl_util.h"
14 #include "sync/internal_api/public/base/model_type.h" 12 #include "sync/internal_api/public/base/model_type.h"
15 13
16 namespace base { 14 namespace base {
17 class SequencedTaskRunner; 15 class SequencedTaskRunner;
18 } // namespace base 16 } // namespace base
19 17
20 namespace syncer { 18 namespace syncer {
21 class ModelTypeSyncProxyImpl; 19 class ModelTypeSyncProxyImpl;
22 class SyncContextProxy; 20 class SyncContextProxy;
23 } //namespace syncer 21 } //namespace syncer
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void DisconnectSyncBackend(); 57 void DisconnectSyncBackend();
60 58
61 // Updates the set of types the user wants to have synced. 59 // Updates the set of types the user wants to have synced.
62 void SetPreferredTypes(syncer::ModelTypeSet types); 60 void SetPreferredTypes(syncer::ModelTypeSet types);
63 61
64 // Returns the list of all known non-blocking sync types that registered with 62 // Returns the list of all known non-blocking sync types that registered with
65 // RegisterType. 63 // RegisterType.
66 syncer::ModelTypeSet GetRegisteredTypes() const; 64 syncer::ModelTypeSet GetRegisteredTypes() const;
67 65
68 private: 66 private:
69 typedef 67 typedef base::ScopedPtrMap<syncer::ModelType,
70 std::map<syncer::ModelType, NonBlockingDataTypeController*> 68 scoped_ptr<NonBlockingDataTypeController>>
71 NonBlockingDataTypeControllerMap; 69 NonBlockingDataTypeControllerMap;
72 70
73 // List of data type controllers for non-blocking types. 71 // List of data type controllers for non-blocking types.
74 NonBlockingDataTypeControllerMap non_blocking_data_type_controllers_; 72 NonBlockingDataTypeControllerMap non_blocking_data_type_controllers_;
75
76 // Deleter for elements of the non-blocking data types controller map.
77 STLValueDeleter<NonBlockingDataTypeControllerMap>
78 non_blocking_data_type_controllers_deleter_;
79 }; 73 };
80 74
81 } // namespace sync_driver 75 } // namespace sync_driver
82 76
83 #endif // COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_MANAGER_H_ 77 #endif // COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_MANAGER_H_
OLDNEW
« no previous file with comments | « components/policy/core/common/schema.cc ('k') | components/sync_driver/non_blocking_data_type_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698