Chromium Code Reviews| 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 |