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

Unified Diff: components/sync/model/fake_model_type_sync_bridge.cc

Issue 2623723002: [Sync] Remove ModelError::IsSet() in favor of base::Optional. (Closed)
Patch Set: Rebase. Created 3 years, 11 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/model/fake_model_type_sync_bridge.cc
diff --git a/components/sync/model/fake_model_type_sync_bridge.cc b/components/sync/model/fake_model_type_sync_bridge.cc
index 957dfd486ade4286ed017e395d43579ad3df7ffe..94c5cc39b7738c9c2c4ce57597474b5bb40a6b73 100644
--- a/components/sync/model/fake_model_type_sync_bridge.cc
+++ b/components/sync/model/fake_model_type_sync_bridge.cc
@@ -199,7 +199,7 @@ FakeModelTypeSyncBridge::CreateMetadataChangeList() {
return base::MakeUnique<TestMetadataChangeList>();
}
-ModelError FakeModelTypeSyncBridge::MergeSyncData(
+base::Optional<ModelError> FakeModelTypeSyncBridge::MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_changes,
EntityDataMap data_map) {
if (error_next_) {
@@ -219,10 +219,10 @@ ModelError FakeModelTypeSyncBridge::MergeSyncData(
db_->PutData(kv.first, kv.second.value());
}
ApplyMetadataChangeList(std::move(metadata_changes));
- return ModelError();
+ return {};
}
-ModelError FakeModelTypeSyncBridge::ApplySyncChanges(
+base::Optional<ModelError> FakeModelTypeSyncBridge::ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_changes,
EntityChangeList entity_changes) {
if (error_next_) {
@@ -247,7 +247,7 @@ ModelError FakeModelTypeSyncBridge::ApplySyncChanges(
}
}
ApplyMetadataChangeList(std::move(metadata_changes));
- return ModelError();
+ return {};
}
void FakeModelTypeSyncBridge::ApplyMetadataChangeList(

Powered by Google App Engine
This is Rietveld 408576698