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

Unified Diff: components/sync/engine_impl/loopback_server/persistent_unique_client_entity.cc

Issue 2938553003: Revert of [sync] Replace FakeServer's implementation with LoopbackServer invocations. (Closed)
Patch Set: Created 3 years, 6 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
Index: components/sync/engine_impl/loopback_server/persistent_unique_client_entity.cc
diff --git a/components/sync/engine_impl/loopback_server/persistent_unique_client_entity.cc b/components/sync/engine_impl/loopback_server/persistent_unique_client_entity.cc
index 2554ab6a39b7b448c9b51e793274bd0b9e7e21ae..9a2b8725b17d1d4c877cc6e15c0a33f6ad4df74e 100644
--- a/components/sync/engine_impl/loopback_server/persistent_unique_client_entity.cc
+++ b/components/sync/engine_impl/loopback_server/persistent_unique_client_entity.cc
@@ -5,7 +5,6 @@
#include "components/sync/engine_impl/loopback_server/persistent_unique_client_entity.h"
#include "base/guid.h"
-#include "components/sync/base/hash_util.h"
#include "components/sync/engine_impl/loopback_server/persistent_permanent_entity.h"
#include "components/sync/protocol/sync.pb.h"
@@ -32,8 +31,7 @@
PersistentUniqueClientEntity::~PersistentUniqueClientEntity() {}
// static
-std::unique_ptr<LoopbackServerEntity>
-PersistentUniqueClientEntity::CreateFromEntity(
+std::unique_ptr<LoopbackServerEntity> PersistentUniqueClientEntity::Create(
const sync_pb::SyncEntity& client_entity) {
CHECK(client_entity.has_client_defined_unique_tag())
<< "A PersistentUniqueClientEntity must have a client-defined unique "
@@ -44,20 +42,6 @@
id, model_type, client_entity.version(), client_entity.name(),
client_entity.client_defined_unique_tag(), client_entity.specifics(),
client_entity.ctime(), client_entity.mtime()));
-}
-
-// static
-std::unique_ptr<LoopbackServerEntity>
-PersistentUniqueClientEntity::CreateFromEntitySpecifics(
- 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 =
- LoopbackServerEntity::CreateId(model_type, client_defined_unique_tag);
- return std::unique_ptr<LoopbackServerEntity>(new PersistentUniqueClientEntity(
- id, model_type, 0, name, client_defined_unique_tag, entity_specifics,
- 1337, 1337));
}
// static

Powered by Google App Engine
This is Rietveld 408576698