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

Unified Diff: components/sync/device_info/device_info_sync_bridge.cc

Issue 2618483003: [Sync] Introduce ModelError for USS error handling. (Closed)
Patch Set: Fix iOS reading list. 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.cc
diff --git a/components/sync/device_info/device_info_sync_bridge.cc b/components/sync/device_info/device_info_sync_bridge.cc
index e1387abef361d7f0fcfff38b043161c3ef10810c..da0572377d8edf0112df5ff2b78efad40cd4189b 100644
--- a/components/sync/device_info/device_info_sync_bridge.cc
+++ b/components/sync/device_info/device_info_sync_bridge.cc
@@ -385,8 +385,9 @@ void DeviceInfoSyncBridge::OnReadAllMetadata(
void DeviceInfoSyncBridge::OnCommit(Result result) {
if (result != Result::SUCCESS) {
- change_processor()->CreateAndUploadError(FROM_HERE,
- "Failed a write to store.");
+ change_processor()->OnUnrecoverableError(
+ SyncError(FROM_HERE, SyncError::DATATYPE_ERROR,
+ "Failed a write to store.", type()));
}
}
@@ -476,7 +477,8 @@ void DeviceInfoSyncBridge::ReportStartupErrorToSync(const std::string& msg) {
// TODO(skym): Shouldn't need to log this here, reporting should always log.
LOG(WARNING) << msg;
change_processor()->OnMetadataLoaded(
- change_processor()->CreateAndUploadError(FROM_HERE, msg), nullptr);
+ change_processor()->CreateAndUploadError(FROM_HERE, msg, type()),
skym 2017/01/05 17:03:49 What if, we instead abandon the old error interfac
maxbogue 2017/01/07 00:12:39 Done!
+ nullptr);
}
} // namespace syncer

Powered by Google App Engine
This is Rietveld 408576698