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

Unified Diff: components/sync/engine_impl/net/loopback_server/unique_client_entity.h

Issue 2106743002: WIP: Local sync only... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix after rebase. Created 4 years, 3 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/net/loopback_server/unique_client_entity.h
diff --git a/components/sync/test/fake_server/unique_client_entity.h b/components/sync/engine_impl/net/loopback_server/unique_client_entity.h
similarity index 69%
copy from components/sync/test/fake_server/unique_client_entity.h
copy to components/sync/engine_impl/net/loopback_server/unique_client_entity.h
index 5fe819dcd48ebf7c5cde6d88b33b31ce22ec83d5..d9a0dd99b7240e65e73a2bf670563bd1e20bf6f0 100644
--- a/components/sync/test/fake_server/unique_client_entity.h
+++ b/components/sync/engine_impl/net/loopback_server/unique_client_entity.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_SYNC_TEST_FAKE_SERVER_UNIQUE_CLIENT_ENTITY_H_
-#define COMPONENTS_SYNC_TEST_FAKE_SERVER_UNIQUE_CLIENT_ENTITY_H_
+#ifndef COMPONENTS_SYNC_ENGINE_IMPL_NET_LOOPBACK_SERVER_UNIQUE_CLIENT_ENTITY_H_
+#define COMPONENTS_SYNC_ENGINE_IMPL_NET_LOOPBACK_SERVER_UNIQUE_CLIENT_ENTITY_H_
#include <stdint.h>
@@ -11,27 +11,27 @@
#include <string>
#include "components/sync/base/model_type.h"
-#include "components/sync/test/fake_server/fake_server_entity.h"
+#include "components/sync/engine_impl/net/loopback_server/loopback_server_entity.h"
namespace sync_pb {
class EntitySpecifics;
class SyncEntity;
} // namespace sync_pb
-namespace fake_server {
+namespace syncer {
// An entity that is unique per client account.
//
// TODO(pvalenzuela): Reconsider the naming of this class. In some cases, this
// type is used to represent entities where the unique client tag is irrelevant
// (e.g., Autofill Wallet).
-class UniqueClientEntity : public FakeServerEntity {
+class UniqueClientEntity : public LoopbackServerEntity {
public:
UniqueClientEntity(const std::string& id,
- const std::string& client_defined_unique_tag,
syncer::ModelType model_type,
int64_t version,
const std::string& name,
+ const std::string& client_defined_unique_tag,
const sync_pb::EntitySpecifics& specifics,
int64_t creation_time,
int64_t last_modified_time);
@@ -39,30 +39,25 @@ class UniqueClientEntity : public FakeServerEntity {
~UniqueClientEntity() override;
// Factory function for creating a UniqueClientEntity.
- static std::unique_ptr<FakeServerEntity> Create(
+ static std::unique_ptr<LoopbackServerEntity> Create(
const sync_pb::SyncEntity& client_entity);
- // Factory function for creating a UniqueClientEntity for use in the
- // FakeServer injection API.
- static std::unique_ptr<FakeServerEntity> CreateForInjection(
- const std::string& name,
- const sync_pb::EntitySpecifics& entity_specifics);
-
// Derives an ID from a unique client tagged entity.
static std::string EffectiveIdForClientTaggedEntity(
const sync_pb::SyncEntity& entity);
- // FakeServerEntity implementation.
+ // LoopbackServerEntity implementation.
bool RequiresParentId() const override;
std::string GetParentId() const override;
void SerializeAsProto(sync_pb::SyncEntity* proto) const override;
private:
// These member values have equivalent fields in SyncEntity.
+ std::string client_defined_unique_tag_;
int64_t creation_time_;
int64_t last_modified_time_;
};
-} // namespace fake_server
+} // namespace syncer
-#endif // COMPONENTS_SYNC_TEST_FAKE_SERVER_UNIQUE_CLIENT_ENTITY_H_
+#endif // COMPONENTS_SYNC_ENGINE_IMPL_NET_LOOPBACK_SERVER_UNIQUE_CLIENT_ENTITY_H_

Powered by Google App Engine
This is Rietveld 408576698