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 #include "components/sync/test/fake_server/unique_client_entity.h" | 5 #include "components/sync/test/fake_server/unique_client_entity.h" |
6 | 6 |
7 #include "base/guid.h" | 7 #include "base/guid.h" |
8 #include "components/sync/protocol/sync.pb.h" | 8 #include "components/sync/protocol/sync.pb.h" |
9 #include "components/sync/syncable/syncable_util.h" | 9 #include "components/sync/syncable/syncable_util.h" |
10 #include "components/sync/test/fake_server/permanent_entity.h" | 10 #include "components/sync/test/fake_server/permanent_entity.h" |
11 | 11 |
12 using std::string; | 12 using std::string; |
13 | |
14 using syncer::GetModelTypeFromSpecifics; | 13 using syncer::GetModelTypeFromSpecifics; |
15 using syncer::ModelType; | 14 using syncer::ModelType; |
16 using syncer::syncable::GenerateSyncableHash; | 15 using syncer::syncable::GenerateSyncableHash; |
17 | 16 |
18 namespace fake_server { | 17 namespace fake_server { |
19 | 18 |
20 namespace { | 19 namespace { |
21 | 20 |
22 // A version must be passed when creating a FakeServerEntity, but this value | 21 // A version must be passed when creating a FakeServerEntity, but this value |
23 // is overrideen immediately when saving the entity in FakeServer. | 22 // is overrideen immediately when saving the entity in FakeServer. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 93 } |
95 | 94 |
96 void UniqueClientEntity::SerializeAsProto(sync_pb::SyncEntity* proto) const { | 95 void UniqueClientEntity::SerializeAsProto(sync_pb::SyncEntity* proto) const { |
97 FakeServerEntity::SerializeBaseProtoFields(proto); | 96 FakeServerEntity::SerializeBaseProtoFields(proto); |
98 | 97 |
99 proto->set_ctime(creation_time_); | 98 proto->set_ctime(creation_time_); |
100 proto->set_mtime(last_modified_time_); | 99 proto->set_mtime(last_modified_time_); |
101 } | 100 } |
102 | 101 |
103 } // namespace fake_server | 102 } // namespace fake_server |
OLD | NEW |