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

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

Issue 1024553010: [Sync] Add support for immediately enabling wallet datatype (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unit tests Created 5 years, 9 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 #include "sync/test/fake_server/unique_client_entity.h" 5 #include "sync/test/fake_server/unique_client_entity.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/guid.h" 10 #include "base/guid.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 client_entity.ctime(), 67 client_entity.ctime(),
68 client_entity.mtime()); 68 client_entity.mtime());
69 } 69 }
70 70
71 // static 71 // static
72 scoped_ptr<FakeServerEntity> UniqueClientEntity::CreateForInjection( 72 scoped_ptr<FakeServerEntity> UniqueClientEntity::CreateForInjection(
73 ModelType model_type, 73 ModelType model_type,
74 const string& name, 74 const string& name,
75 const sync_pb::EntitySpecifics& entity_specifics) { 75 const sync_pb::EntitySpecifics& entity_specifics) {
76 string client_defined_unique_tag = GenerateSyncableHash(model_type, name); 76 string client_defined_unique_tag = GenerateSyncableHash(model_type, name);
77 string id = FakeServerEntity::CreateId(model_type, base::GenerateGUID()); 77 string id = FakeServerEntity::CreateId(model_type, client_defined_unique_tag);
78 return scoped_ptr<FakeServerEntity>( 78 return scoped_ptr<FakeServerEntity>(
79 new UniqueClientEntity(id, 79 new UniqueClientEntity(id,
80 model_type, 80 model_type,
81 kUnusedVersion, 81 kUnusedVersion,
82 name, 82 name,
83 client_defined_unique_tag, 83 client_defined_unique_tag,
84 entity_specifics, 84 entity_specifics,
85 kDefaultTime, 85 kDefaultTime,
86 kDefaultTime)); 86 kDefaultTime));
87 } 87 }
(...skipping 26 matching lines...) Expand all
114 114
115 bool UniqueClientEntity::IsDeleted() const { 115 bool UniqueClientEntity::IsDeleted() const {
116 return false; 116 return false;
117 } 117 }
118 118
119 bool UniqueClientEntity::IsFolder() const { 119 bool UniqueClientEntity::IsFolder() const {
120 return false; 120 return false;
121 } 121 }
122 122
123 } // namespace fake_server 123 } // namespace fake_server
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698