Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(820)

Side by Side Diff: components/sync/test/fake_server/tombstone_entity.h

Issue 2328393002: [Sync] Add a sanity integration test for USS. (Closed)
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_ 5 #ifndef COMPONENTS_SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_
6 #define COMPONENTS_SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_ 6 #define COMPONENTS_SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/sync/base/model_type.h" 10 #include "components/sync/base/model_type.h"
11 #include "components/sync/protocol/sync.pb.h" 11 #include "components/sync/protocol/sync.pb.h"
12 #include "components/sync/test/fake_server/fake_server_entity.h" 12 #include "components/sync/test/fake_server/fake_server_entity.h"
13 13
14 namespace fake_server { 14 namespace fake_server {
15 15
16 // A Sync entity that represents a deleted item. 16 // A Sync entity that represents a deleted item.
17 class TombstoneEntity : public FakeServerEntity { 17 class TombstoneEntity : public FakeServerEntity {
18 public: 18 public:
19 ~TombstoneEntity() override; 19 ~TombstoneEntity() override;
20 20
21 // Factory function for TombstoneEntity. 21 // Factory function for TombstoneEntity.
22 static std::unique_ptr<FakeServerEntity> Create(const std::string& id); 22 static std::unique_ptr<FakeServerEntity> Create(
23 const std::string& id,
24 const std::string& client_defined_unique_tag);
23 25
24 // FakeServerEntity implementation. 26 // FakeServerEntity implementation.
25 bool RequiresParentId() const override; 27 bool RequiresParentId() const override;
26 std::string GetParentId() const override; 28 std::string GetParentId() const override;
27 void SerializeAsProto(sync_pb::SyncEntity* proto) const override; 29 void SerializeAsProto(sync_pb::SyncEntity* proto) const override;
28 bool IsDeleted() const override; 30 bool IsDeleted() const override;
29 31
30 private: 32 private:
31 TombstoneEntity(const std::string& id, const syncer::ModelType& model_type); 33 TombstoneEntity(const std::string& id,
34 const std::string& client_defined_unique_tag,
35 const syncer::ModelType& model_type);
32 }; 36 };
33 37
34 } // namespace fake_server 38 } // namespace fake_server
35 39
36 #endif // COMPONENTS_SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_ 40 #endif // COMPONENTS_SYNC_TEST_FAKE_SERVER_TOMBSTONE_ENTITY_H_
OLDNEW
« no previous file with comments | « components/sync/test/fake_server/permanent_entity.cc ('k') | components/sync/test/fake_server/tombstone_entity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698