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

Unified Diff: components/sync/model/model_type_sync_bridge.h

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/model_type_sync_bridge.h
diff --git a/components/sync/model/model_type_sync_bridge.h b/components/sync/model/model_type_sync_bridge.h
index 693e85b150728e265abf2cdbd9fe8cb9960968d9..74e7df45cda788681eaf2acfd4f6e1338929740b 100644
--- a/components/sync/model/model_type_sync_bridge.h
+++ b/components/sync/model/model_type_sync_bridge.h
@@ -11,6 +11,7 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
+#include "base/optional.h"
#include "components/sync/engine/activation_context.h"
#include "components/sync/model/conflict_resolution.h"
#include "components/sync/model/entity_change.h"
@@ -62,7 +63,7 @@ class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
// combine all change atomically, should save the metadata after the data
// changes, so that this merge will be re-driven by sync if is not completely
// saved during the current run.
- virtual ModelError MergeSyncData(
+ virtual base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) = 0;
@@ -71,7 +72,7 @@ class ModelTypeSyncBridge : public base::SupportsWeakPtr<ModelTypeSyncBridge> {
// |metadata_change_list| in case when some of the data changes are filtered
// out, or even be empty in case when a commit confirmation is processed and
// only the metadata needs to persisted.
- virtual ModelError ApplySyncChanges(
+ virtual base::Optional<ModelError> ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_changes) = 0;

Powered by Google App Engine
This is Rietveld 408576698