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

Unified Diff: ios/chrome/test/app/sync_test_util.mm

Issue 2969643002: Reland - Replace FakeServer's implementation with LoopbackServer invocations. (Closed)
Patch Set: Rebased on master. Created 3 years, 5 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
« no previous file with comments | « components/sync/test/fake_server/unique_client_entity.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/test/app/sync_test_util.mm
diff --git a/ios/chrome/test/app/sync_test_util.mm b/ios/chrome/test/app/sync_test_util.mm
index 0ba439c48a3771c2615d48a456ff20c90256a4e4..bf9a2b2397f3d5068a3c162b9047380508ed2832 100644
--- a/ios/chrome/test/app/sync_test_util.mm
+++ b/ios/chrome/test/app/sync_test_util.mm
@@ -23,8 +23,6 @@
#include "components/sync/test/fake_server/fake_server_network_resources.h"
#include "components/sync/test/fake_server/fake_server_verifier.h"
#include "components/sync/test/fake_server/sessions_hierarchy.h"
-#include "components/sync/test/fake_server/tombstone_entity.h"
-#include "components/sync/test/fake_server/unique_client_entity.h"
#include "ios/chrome/browser/autofill/personal_data_manager_factory.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
#include "ios/chrome/browser/history/history_service_factory.h"
@@ -178,9 +176,9 @@ void InjectAutofillProfileOnFakeSyncServer(std::string guid,
autofill_profile->add_name_full(full_name);
autofill_profile->set_guid(guid);
- std::unique_ptr<fake_server::FakeServerEntity> entity =
- fake_server::UniqueClientEntity::CreateForInjection(guid,
- entity_specifics);
+ std::unique_ptr<syncer::LoopbackServerEntity> entity =
+ syncer::PersistentUniqueClientEntity::CreateFromEntitySpecifics(
+ guid, entity_specifics);
gSyncFakeServer->InjectEntity(std::move(entity));
}
@@ -197,8 +195,9 @@ void DeleteAutofillProfileOnFakeSyncServer(std::string guid) {
}
// Delete the entity if it exists.
if (!entity_id.empty()) {
- std::unique_ptr<fake_server::FakeServerEntity> entity;
- entity = fake_server::TombstoneEntity::Create(entity_id, std::string());
+ std::unique_ptr<syncer::LoopbackServerEntity> entity;
+ entity =
+ syncer::PersistentTombstoneEntity::CreateNew(entity_id, std::string());
gSyncFakeServer->InjectEntity(std::move(entity));
}
}
@@ -267,8 +266,9 @@ void InjectTypedURLOnFakeSyncServer(const std::string& url) {
typedUrl->add_visits(base::Time::Max().ToInternalValue());
typedUrl->add_visit_transitions(sync_pb::SyncEnums::TYPED);
- std::unique_ptr<fake_server::FakeServerEntity> entity =
- fake_server::UniqueClientEntity::CreateForInjection(url, entitySpecifics);
+ std::unique_ptr<syncer::LoopbackServerEntity> entity =
+ syncer::PersistentUniqueClientEntity::CreateFromEntitySpecifics(
+ url, entitySpecifics);
gSyncFakeServer->InjectEntity(std::move(entity));
}
@@ -346,8 +346,9 @@ void DeleteTypedUrlFromFakeSyncServer(std::string url) {
}
}
if (!entity_id.empty()) {
- std::unique_ptr<fake_server::FakeServerEntity> entity;
- entity = fake_server::TombstoneEntity::Create(entity_id, std::string());
+ std::unique_ptr<syncer::LoopbackServerEntity> entity;
+ entity =
+ syncer::PersistentTombstoneEntity::CreateNew(entity_id, std::string());
gSyncFakeServer->InjectEntity(std::move(entity));
}
}
« no previous file with comments | « components/sync/test/fake_server/unique_client_entity.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698