OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_ | |
6 #define SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "sync/internal_api/public/base/model_type.h" | |
11 #include "sync/protocol/sync.pb.h" | |
12 #include "sync/test/fake_server/fake_server_entity.h" | |
13 | |
14 namespace fake_server { | |
15 | |
16 // A Sync entity that represents a deleted item. | |
17 class TombstoneEntity : public FakeServerEntity { | |
18 public: | |
19 ~TombstoneEntity() override; | |
20 | |
21 // Factory function for TombstoneEntity. | |
22 static std::unique_ptr<FakeServerEntity> Create(const std::string& id); | |
23 | |
24 // FakeServerEntity implementation. | |
25 bool RequiresParentId() const override; | |
26 std::string GetParentId() const override; | |
27 void SerializeAsProto(sync_pb::SyncEntity* proto) const override; | |
28 bool IsDeleted() const override; | |
29 | |
30 private: | |
31 TombstoneEntity(const std::string& id, const syncer::ModelType& model_type); | |
32 }; | |
33 | |
34 } // namespace fake_server | |
35 | |
36 #endif // SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_ | |
OLD | NEW |