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

Unified Diff: components/sync/device_info/device_info_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/device_info/device_info_sync_bridge.h
diff --git a/components/sync/device_info/device_info_sync_bridge.h b/components/sync/device_info/device_info_sync_bridge.h
index 433aca3a36cf26231ddba822f8523b3c7fb2236d..2634df01af11e1b372d223657879e369c47165db 100644
--- a/components/sync/device_info/device_info_sync_bridge.h
+++ b/components/sync/device_info/device_info_sync_bridge.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
+#include "base/optional.h"
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "components/sync/device_info/device_info_tracker.h"
@@ -43,10 +44,10 @@ class DeviceInfoSyncBridge : public ModelTypeSyncBridge,
// ModelTypeSyncBridge implementation.
std::unique_ptr<MetadataChangeList> CreateMetadataChangeList() override;
- ModelError MergeSyncData(
+ base::Optional<ModelError> MergeSyncData(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityDataMap entity_data_map) override;
- ModelError ApplySyncChanges(
+ base::Optional<ModelError> ApplySyncChanges(
std::unique_ptr<MetadataChangeList> metadata_change_list,
EntityChangeList entity_changes) override;
void GetData(StorageKeyList storage_keys, DataCallback callback) override;
@@ -90,7 +91,7 @@ class DeviceInfoSyncBridge : public ModelTypeSyncBridge,
std::unique_ptr<ModelTypeStore> store);
void OnReadAllData(ModelTypeStore::Result result,
std::unique_ptr<ModelTypeStore::RecordList> record_list);
- void OnReadAllMetadata(ModelError error,
+ void OnReadAllMetadata(base::Optional<ModelError> error,
std::unique_ptr<MetadataBatch> metadata_batch);
void OnCommit(ModelTypeStore::Result result);

Powered by Google App Engine
This is Rietveld 408576698