OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
tim (not reviewing)
2014/01/08 19:33:42
2014 (check other files)
rlarocque
2014/01/09 00:31:18
Done.
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ | |
6 #define SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ | |
7 | |
8 #include <map> | |
9 | |
10 #include "base/basictypes.h" | |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "sync/base/sync_export.h" | |
13 #include "sync/internal_api/public/base/model_type.h" | |
14 #include "sync/internal_api/public/engine/model_safe_worker.h" | |
15 | |
16 namespace syncer { | |
17 | |
18 class CommitterList; | |
19 class UpdaterList; | |
20 | |
21 namespace syncable { | |
22 class Directory; | |
23 } // namespace syncable | |
24 | |
25 class SYNC_EXPORT_PRIVATE ModelTypeRegistry { | |
tim (not reviewing)
2014/01/08 19:33:42
Class comment, and in same vein as the CommitterLi
rlarocque
2014/01/09 00:31:18
Added class comment.
| |
26 public: | |
27 ModelTypeRegistry( | |
28 const std::vector<ModelSafeWorker*>& workers, | |
29 syncable::Directory* directory); | |
30 ~ModelTypeRegistry(); | |
31 | |
32 // Sets the set of enabled types. | |
33 void SetEnabledDirectoryTypes(const ModelSafeRoutingInfo& routing_info); | |
34 | |
35 // Simple getters. | |
36 UpdaterList* updater_list(); | |
37 CommitterList* committer_list(); | |
38 | |
39 private: | |
40 // Classes to manage the types hooked up to receive and commit sync data. | |
41 scoped_ptr<UpdaterList> updater_list_; | |
42 scoped_ptr<CommitterList> committer_list_; | |
43 | |
44 // The known ModelSafeWorkers. | |
45 std::map<ModelSafeGroup, scoped_refptr<ModelSafeWorker> > workers_map_; | |
46 | |
47 // The directory. Not owned. | |
48 syncable::Directory* directory_; | |
49 | |
50 DISALLOW_COPY_AND_ASSIGN(ModelTypeRegistry); | |
51 }; | |
52 | |
53 } // namespace syncer | |
54 | |
55 #endif // SYNC_ENGINE_MODEL_TYPE_REGISTRY_H_ | |
56 | |
OLD | NEW |