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

Unified Diff: components/sync/api/fake_model_type_service.cc

Issue 2369103002: [Sync] Move conflict resolution test code to FakeModelTypeService. (Closed)
Patch Set: Self-review. 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/api/fake_model_type_service.cc
diff --git a/components/sync/api/fake_model_type_service.cc b/components/sync/api/fake_model_type_service.cc
index caff7ca231a72f151f982a00722c1767c66b5e42..9c9b2e89373048965fdef30b813f5948d20ddbfd 100644
--- a/components/sync/api/fake_model_type_service.cc
+++ b/components/sync/api/fake_model_type_service.cc
@@ -304,6 +304,18 @@ void FakeModelTypeService::SetServiceError(
syncer::PREFERENCES);
}
+ConflictResolution FakeModelTypeService::ResolveConflict(
+ const EntityData& local_data,
+ const EntityData& remote_data) const {
+ DCHECK(conflict_resolution_);
+ return std::move(*conflict_resolution_);
+}
+
+void FakeModelTypeService::SetConflictResolution(
+ ConflictResolution resolution) {
+ conflict_resolution_.reset(new ConflictResolution(std::move(resolution)));
+}
+
void FakeModelTypeService::CheckPostConditions() {
DCHECK(!service_error_.IsSet());
}

Powered by Google App Engine
This is Rietveld 408576698