| 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..476ded98e016891f1ff40795c366b1ab8ffece3a 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 special case, since server only throttle some of datatype,
|
| + // 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 SYNCER_OK;
|
| }
|
| return SERVER_RETURN_THROTTLED;
|
| case TRANSIENT_ERROR:
|
| @@ -492,16 +498,17 @@ 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;
|
| }
|
| - return SERVER_RETURN_PARTIAL_FAILURE;
|
| + return SYNCER_OK;
|
| case CLIENT_DATA_OBSOLETE:
|
| return SERVER_RETURN_CLIENT_DATA_OBSOLETE;
|
| default:
|
|
|