Chromium Code Reviews| Index: components/sync/engine_impl/syncer_proto_util.cc |
| diff --git a/components/sync/engine_impl/syncer_proto_util.cc b/components/sync/engine_impl/syncer_proto_util.cc |
| index 9efd929169bc7425fe6ac591713d0e441813f31a..716114e50fcf7d6f53d5f248f516fecfe6bb2c5b 100644 |
| --- a/components/sync/engine_impl/syncer_proto_util.cc |
| +++ b/components/sync/engine_impl/syncer_proto_util.cc |
| @@ -472,9 +472,15 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( |
| DLOG(WARNING) << "Client fully throttled by syncer."; |
| cycle->delegate()->OnThrottled(GetThrottleDelay(*response)); |
| } else { |
| + // This is a spicial case, since server only throttle some of datatype, |
|
Nicolas Zea
2016/11/09 00:21:25
typo: spicial -> special
Gang Wu
2016/11/10 21:56:51
Done.
|
| + // so can treat this case as partial failure. |
| DLOG(WARNING) << "Some types throttled by syncer."; |
| cycle->delegate()->OnTypesThrottled( |
| sync_protocol_error.error_data_types, GetThrottleDelay(*response)); |
| + if (partial_failure_data_types != nullptr) { |
| + *partial_failure_data_types = sync_protocol_error.error_data_types; |
| + } |
| + return SERVER_RETURN_PARTIAL_FAILURE; |
| } |
| return SERVER_RETURN_THROTTLED; |
| case TRANSIENT_ERROR: |
| @@ -492,11 +498,12 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( |
| case DISABLED_BY_ADMIN: |
| return SERVER_RETURN_DISABLED_BY_ADMIN; |
| case PARTIAL_FAILURE: |
| - // This only happens when partial throttling during GetUpdates. |
| + // This only happens when partial backoff during GetUpdates. |
| if (!sync_protocol_error.error_data_types.Empty()) { |
| - DLOG(WARNING) << "Some types throttled by syncer during GetUpdates."; |
| - cycle->delegate()->OnTypesThrottled( |
| - sync_protocol_error.error_data_types, GetThrottleDelay(*response)); |
| + DLOG(WARNING) |
| + << "Some types got partial failure by syncer during GetUpdates."; |
| + cycle->delegate()->OnTypesBackedOff( |
| + sync_protocol_error.error_data_types); |
| } |
| if (partial_failure_data_types != nullptr) { |
| *partial_failure_data_types = sync_protocol_error.error_data_types; |