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

Side by Side Diff: components/sync/test/fake_server/unique_client_entity.cc

Issue 2502253003: [Sync] Move GenerateSyncableHash to base. (Closed)
Patch Set: Keep full syncable/ DEP. Created 4 years, 1 month 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 #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/base/hash_util.h"
8 #include "components/sync/protocol/sync.pb.h" 9 #include "components/sync/protocol/sync.pb.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 using syncer::GenerateSyncableHash;
13 using syncer::GetModelTypeFromSpecifics; 14 using syncer::GetModelTypeFromSpecifics;
14 using syncer::ModelType; 15 using syncer::ModelType;
15 using syncer::syncable::GenerateSyncableHash;
16 16
17 namespace fake_server { 17 namespace fake_server {
18 18
19 namespace { 19 namespace {
20 20
21 // 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
22 // is overrideen immediately when saving the entity in FakeServer. 22 // is overrideen immediately when saving the entity in FakeServer.
23 const int64_t kUnusedVersion = 0L; 23 const int64_t kUnusedVersion = 0L;
24 24
25 // Default time (creation and last modified) used when creating entities. 25 // Default time (creation and last modified) used when creating entities.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 94
95 void UniqueClientEntity::SerializeAsProto(sync_pb::SyncEntity* proto) const { 95 void UniqueClientEntity::SerializeAsProto(sync_pb::SyncEntity* proto) const {
96 FakeServerEntity::SerializeBaseProtoFields(proto); 96 FakeServerEntity::SerializeBaseProtoFields(proto);
97 97
98 proto->set_ctime(creation_time_); 98 proto->set_ctime(creation_time_);
99 proto->set_mtime(last_modified_time_); 99 proto->set_mtime(last_modified_time_);
100 } 100 }
101 101
102 } // namespace fake_server 102 } // namespace fake_server
OLDNEW
« no previous file with comments | « components/sync/test/fake_server/bookmark_entity_builder.cc ('k') | components/sync_sessions/sessions_sync_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698