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_ENGINE_IMPL_LOOPBACK_SERVER_PERSISTENT_PERMANENT_ENTITY_
H_ | 5 #ifndef COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_PERSISTENT_PERMANENT_ENTITY_
H_ |
6 #define COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_PERSISTENT_PERMANENT_ENTITY_
H_ | 6 #define COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_PERSISTENT_PERMANENT_ENTITY_
H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 const syncer::ModelType& model_type, | 22 const syncer::ModelType& model_type, |
23 const std::string& name, | 23 const std::string& name, |
24 const std::string& parent_id, | 24 const std::string& parent_id, |
25 const std::string& server_defined_unique_tag, | 25 const std::string& server_defined_unique_tag, |
26 const sync_pb::EntitySpecifics& entity_specifics); | 26 const sync_pb::EntitySpecifics& entity_specifics); |
27 | 27 |
28 ~PersistentPermanentEntity() override; | 28 ~PersistentPermanentEntity() override; |
29 | 29 |
30 // Factory function for PersistentPermanentEntity. |server_tag| should be a | 30 // Factory function for PersistentPermanentEntity. |server_tag| should be a |
31 // globally unique identifier. | 31 // globally unique identifier. |
32 static std::unique_ptr<LoopbackServerEntity> Create( | 32 static std::unique_ptr<LoopbackServerEntity> CreateNew( |
33 const syncer::ModelType& model_type, | 33 const syncer::ModelType& model_type, |
34 const std::string& server_tag, | 34 const std::string& server_tag, |
35 const std::string& name, | 35 const std::string& name, |
36 const std::string& parent_server_tag); | 36 const std::string& parent_server_tag); |
37 | 37 |
38 // Factory function for a top level PersistentPermanentEntity. Top level means | 38 // Factory function for a top level PersistentPermanentEntity. Top level means |
39 // that the entity's parent is the root entity (no PersistentPermanentEntity | 39 // that the entity's parent is the root entity (no PersistentPermanentEntity |
40 // exists for root). | 40 // exists for root). |
41 static std::unique_ptr<LoopbackServerEntity> CreateTopLevel( | 41 static std::unique_ptr<LoopbackServerEntity> CreateTopLevel( |
42 const syncer::ModelType& model_type); | 42 const syncer::ModelType& model_type); |
(...skipping 16 matching lines...) Expand all Loading... |
59 | 59 |
60 private: | 60 private: |
61 // All member values have equivalent fields in SyncEntity. | 61 // All member values have equivalent fields in SyncEntity. |
62 std::string server_defined_unique_tag_; | 62 std::string server_defined_unique_tag_; |
63 std::string parent_id_; | 63 std::string parent_id_; |
64 }; | 64 }; |
65 | 65 |
66 } // namespace syncer | 66 } // namespace syncer |
67 | 67 |
68 #endif // COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_PERSISTENT_PERMANENT_ENTI
TY_H_ | 68 #endif // COMPONENTS_SYNC_ENGINE_IMPL_LOOPBACK_SERVER_PERSISTENT_PERMANENT_ENTI
TY_H_ |
OLD | NEW |