| 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 SYNC_TEST_FAKE_SERVER_PERMANENT_ENTITY_H_ | 5 #ifndef SYNC_TEST_FAKE_SERVER_PERMANENT_ENTITY_H_ |
| 6 #define SYNC_TEST_FAKE_SERVER_PERMANENT_ENTITY_H_ | 6 #define SYNC_TEST_FAKE_SERVER_PERMANENT_ENTITY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 static FakeServerEntity* CreateTopLevel(const syncer::ModelType& model_type); | 31 static FakeServerEntity* CreateTopLevel(const syncer::ModelType& model_type); |
| 32 | 32 |
| 33 // Factory function for creating an updated version of a PermanentEntity. | 33 // Factory function for creating an updated version of a PermanentEntity. |
| 34 // This function should only be called for the Nigori entity. | 34 // This function should only be called for the Nigori entity. |
| 35 static FakeServerEntity* CreateUpdatedNigoriEntity( | 35 static FakeServerEntity* CreateUpdatedNigoriEntity( |
| 36 const sync_pb::SyncEntity& client_entity, | 36 const sync_pb::SyncEntity& client_entity, |
| 37 FakeServerEntity* current_server_entity); | 37 FakeServerEntity* current_server_entity); |
| 38 | 38 |
| 39 // FakeServerEntity implementation. | 39 // FakeServerEntity implementation. |
| 40 virtual std::string GetParentId() const OVERRIDE; | 40 virtual std::string GetParentId() const OVERRIDE; |
| 41 virtual sync_pb::SyncEntity* SerializeAsProto() OVERRIDE; | 41 virtual void SerializeAsProto(sync_pb::SyncEntity* proto) OVERRIDE; |
| 42 virtual bool IsDeleted() const OVERRIDE; | 42 virtual bool IsDeleted() const OVERRIDE; |
| 43 virtual bool IsFolder() const OVERRIDE; | 43 virtual bool IsFolder() const OVERRIDE; |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 PermanentEntity(const std::string& id, | 46 PermanentEntity(const std::string& id, |
| 47 const syncer::ModelType& model_type, | 47 const syncer::ModelType& model_type, |
| 48 const std::string& name, | 48 const std::string& name, |
| 49 const std::string& parent_id, | 49 const std::string& parent_id, |
| 50 const std::string& server_defined_unique_tag, | 50 const std::string& server_defined_unique_tag, |
| 51 const sync_pb::EntitySpecifics& entity_specifics); | 51 const sync_pb::EntitySpecifics& entity_specifics); |
| 52 | 52 |
| 53 // All member values have equivalent fields in SyncEntity. | 53 // All member values have equivalent fields in SyncEntity. |
| 54 std::string server_defined_unique_tag_; | 54 std::string server_defined_unique_tag_; |
| 55 std::string parent_id_; | 55 std::string parent_id_; |
| 56 sync_pb::EntitySpecifics specifics_; | 56 sync_pb::EntitySpecifics specifics_; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace fake_server | 59 } // namespace fake_server |
| 60 | 60 |
| 61 #endif // SYNC_TEST_FAKE_SERVER_PERMANENT_ENTITY_H_ | 61 #endif // SYNC_TEST_FAKE_SERVER_PERMANENT_ENTITY_H_ |
| OLD | NEW |