OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |