| Index: components/sync/test/fake_server/bookmark_entity_builder.cc
|
| diff --git a/components/sync/test/fake_server/bookmark_entity_builder.cc b/components/sync/test/fake_server/bookmark_entity_builder.cc
|
| index 599405faa6b629a4c2f9e82a79438164e56b8168..e9ca35395f24501d636a2552a1e9911d71f46d14 100644
|
| --- a/components/sync/test/fake_server/bookmark_entity_builder.cc
|
| +++ b/components/sync/test/fake_server/bookmark_entity_builder.cc
|
| @@ -12,13 +12,14 @@
|
| #include "components/sync/base/hash_util.h"
|
| #include "components/sync/base/time.h"
|
| #include "components/sync/base/unique_position.h"
|
| +#include "components/sync/engine_impl/loopback_server/persistent_bookmark_entity.h"
|
| #include "components/sync/protocol/sync.pb.h"
|
| -#include "components/sync/test/fake_server/bookmark_entity.h"
|
|
|
| using std::string;
|
| using syncer::GenerateSyncableBookmarkHash;
|
| +using syncer::LoopbackServerEntity;
|
|
|
| -// A version must be passed when creating a FakeServerEntity, but this value
|
| +// A version must be passed when creating a LoopbackServerEntity, but this value
|
| // is overrideen immediately when saving the entity in FakeServer.
|
| const int64_t kUnusedVersion = 0L;
|
|
|
| @@ -44,10 +45,10 @@ void BookmarkEntityBuilder::SetParentId(const std::string& parent_id) {
|
| parent_id_ = parent_id;
|
| }
|
|
|
| -std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildBookmark(
|
| +std::unique_ptr<LoopbackServerEntity> BookmarkEntityBuilder::BuildBookmark(
|
| const GURL& url) {
|
| if (!url.is_valid()) {
|
| - return base::WrapUnique<FakeServerEntity>(nullptr);
|
| + return base::WrapUnique<LoopbackServerEntity>(nullptr);
|
| }
|
|
|
| sync_pb::EntitySpecifics entity_specifics = CreateBaseEntitySpecifics();
|
| @@ -56,7 +57,7 @@ std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildBookmark(
|
| return Build(entity_specifics, kIsNotFolder);
|
| }
|
|
|
| -std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::BuildFolder() {
|
| +std::unique_ptr<LoopbackServerEntity> BookmarkEntityBuilder::BuildFolder() {
|
| const bool kIsFolder = true;
|
| return Build(CreateBaseEntitySpecifics(), kIsFolder);
|
| }
|
| @@ -71,7 +72,7 @@ sync_pb::EntitySpecifics BookmarkEntityBuilder::CreateBaseEntitySpecifics()
|
| return entity_specifics;
|
| }
|
|
|
| -std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::Build(
|
| +std::unique_ptr<LoopbackServerEntity> BookmarkEntityBuilder::Build(
|
| const sync_pb::EntitySpecifics& entity_specifics,
|
| bool is_folder) {
|
| sync_pb::UniquePosition unique_position;
|
| @@ -81,16 +82,18 @@ std::unique_ptr<FakeServerEntity> BookmarkEntityBuilder::Build(
|
| syncer::UniquePosition::FromInt64(0, suffix).ToProto(&unique_position);
|
|
|
| if (parent_id_.empty()) {
|
| - parent_id_ = FakeServerEntity::CreateId(syncer::BOOKMARKS, "bookmark_bar");
|
| + parent_id_ =
|
| + LoopbackServerEntity::CreateId(syncer::BOOKMARKS, "bookmark_bar");
|
| }
|
|
|
| const string id =
|
| - FakeServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID());
|
| + LoopbackServerEntity::CreateId(syncer::BOOKMARKS, base::GenerateGUID());
|
|
|
| - return base::WrapUnique<FakeServerEntity>(new BookmarkEntity(
|
| - id, kUnusedVersion, title_, originator_cache_guid_,
|
| - originator_client_item_id_, unique_position, entity_specifics, is_folder,
|
| - parent_id_, kDefaultTime, kDefaultTime));
|
| + return base::WrapUnique<LoopbackServerEntity>(
|
| + new syncer::PersistentBookmarkEntity(
|
| + id, kUnusedVersion, title_, originator_cache_guid_,
|
| + originator_client_item_id_, unique_position, entity_specifics,
|
| + is_folder, parent_id_, kDefaultTime, kDefaultTime));
|
| }
|
|
|
| } // namespace fake_server
|
|
|