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