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

Unified Diff: sync/test/fake_server/unique_client_entity.cc

Issue 998373004: Sync: Generalize entity injection in Android tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« sync/sync_tests.gypi ('K') | « sync/test/fake_server/unique_client_entity.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/unique_client_entity.cc
diff --git a/sync/test/fake_server/unique_client_entity.cc b/sync/test/fake_server/unique_client_entity.cc
index 3d08c61322de4c600aaf465c49c22ccb27bf790d..8c81d669741dd63c1312fa9bffddcdc9617bf9ee 100644
--- a/sync/test/fake_server/unique_client_entity.cc
+++ b/sync/test/fake_server/unique_client_entity.cc
@@ -17,6 +17,7 @@
using std::string;
+using syncer::GetModelTypeFromSpecifics;
using syncer::ModelType;
using syncer::syncable::GenerateSyncableHash;
@@ -70,9 +71,9 @@ FakeServerEntity* UniqueClientEntity::Create(
// static
scoped_ptr<FakeServerEntity> UniqueClientEntity::CreateForInjection(
- ModelType model_type,
const string& name,
const sync_pb::EntitySpecifics& entity_specifics) {
+ ModelType model_type = GetModelTypeFromSpecifics(entity_specifics);
string client_defined_unique_tag = GenerateSyncableHash(model_type, name);
string id = FakeServerEntity::CreateId(model_type, base::GenerateGUID());
return scoped_ptr<FakeServerEntity>(
« sync/sync_tests.gypi ('K') | « sync/test/fake_server/unique_client_entity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698