Chromium Code Reviews| Index: sync/engine/syncer_proto_util.cc |
| diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc |
| index 3b72c173470293666cee65aab599931c492ea867..adee880fbaa5e10b8f32dcf9f501ba0e8250f730 100644 |
| --- a/sync/engine/syncer_proto_util.cc |
| +++ b/sync/engine/syncer_proto_util.cc |
| @@ -121,6 +121,8 @@ SyncProtocolErrorType ConvertSyncProtocolErrorTypePBToLocalType( |
| return TRANSIENT_ERROR; |
| case sync_pb::SyncEnums::MIGRATION_DONE: |
| return MIGRATION_DONE; |
| + case sync_pb::SyncEnums::DISABLED_BY_ADMIN: |
| + return DISABLED_BY_ADMIN; |
| case sync_pb::SyncEnums::UNKNOWN: |
| return UNKNOWN_ERROR; |
| case sync_pb::SyncEnums::USER_NOT_ACTIVATED: |
| @@ -341,6 +343,8 @@ SyncProtocolError ConvertLegacyErrorCodeToNewError( |
| if (error_type == sync_pb::SyncEnums::CLEAR_PENDING || |
| error_type == sync_pb::SyncEnums::NOT_MY_BIRTHDAY) { |
| error.action = DISABLE_SYNC_ON_CLIENT; |
| + } else if (error_type == sync_pb::SyncEnums::DISABLED_BY_ADMIN) { |
| + error.action = STOP_SYNC_FOR_DISABLED_ACCOUNT; |
|
tim (not reviewing)
2013/05/13 04:18:58
nit - indent should be two spaces from 'if' (345 w
pavely
2013/05/13 22:37:09
Done.
|
| } // There is no other action we can compute for legacy server. |
| return error; |
| } |
| @@ -401,8 +405,10 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( |
| sync_protocol_error = ConvertErrorPBToLocalType(response->error()); |
| } else { |
| // Legacy server implementation. Compute the error based on |error_code|. |
| + ::sync_pb::SyncEnums_ErrorType error_code = response->error_code(); |
| + // error_code = sync_pb::SyncEnums::DISABLED_BY_ADMIN; |
|
tim (not reviewing)
2013/05/13 04:18:58
This needs to be fixed / cleaned up.
pavely
2013/05/13 22:37:09
Done.
|
| sync_protocol_error = ConvertLegacyErrorCodeToNewError( |
| - response->error_code()); |
| + /*response->error_code()*/ error_code); |
| } |
| // Now set the error into the status so the layers above us could read it. |
| @@ -467,6 +473,8 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( |
| return SERVER_RETURN_CLEAR_PENDING; |
| case NOT_MY_BIRTHDAY: |
| return SERVER_RETURN_NOT_MY_BIRTHDAY; |
| + case DISABLED_BY_ADMIN: |
| + return SERVER_RETURN_DISABLED_BY_ADMIN; |
| default: |
| NOTREACHED(); |
| return UNSET; |