diff options
author | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-22 01:04:08 +0000 |
---|---|---|
committer | haitaol@chromium.org <haitaol@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-22 01:04:08 +0000 |
commit | ce7399ac8cb2355d80a71a3ac860b53fa15ff1f8 (patch) | |
tree | c7672724594566068416760c7cd32cb48e41da64 /sync/engine | |
parent | 185fa85d78c5f8443faf455c10748cb7b0a4d4ed (diff) | |
download | chromium_src-ce7399ac8cb2355d80a71a3ac860b53fa15ff1f8.zip chromium_src-ce7399ac8cb2355d80a71a3ac860b53fa15ff1f8.tar.gz chromium_src-ce7399ac8cb2355d80a71a3ac860b53fa15ff1f8.tar.bz2 |
Add an action for server to send down rollback command.
BUG=362679
Review URL: https://codereview.chromium.org/238273008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/engine')
-rw-r--r-- | sync/engine/syncer_proto_util.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc index dab228f..fe2a875 100644 --- a/sync/engine/syncer_proto_util.cc +++ b/sync/engine/syncer_proto_util.cc @@ -122,6 +122,8 @@ SyncProtocolErrorType ConvertSyncProtocolErrorTypePBToLocalType( return MIGRATION_DONE; case sync_pb::SyncEnums::DISABLED_BY_ADMIN: return DISABLED_BY_ADMIN; + case sync_pb::SyncEnums::USER_ROLLBACK: + return USER_ROLLBACK; case sync_pb::SyncEnums::UNKNOWN: return UNKNOWN_ERROR; case sync_pb::SyncEnums::USER_NOT_ACTIVATED: @@ -331,7 +333,9 @@ SyncProtocolError ConvertLegacyErrorCodeToNewError( error.action = DISABLE_SYNC_ON_CLIENT; } else if (error_type == sync_pb::SyncEnums::DISABLED_BY_ADMIN) { error.action = STOP_SYNC_FOR_DISABLED_ACCOUNT; - } // There is no other action we can compute for legacy server. + } else if (error_type == sync_pb::SyncEnums::USER_ROLLBACK) { + error.action = DISABLE_SYNC_AND_ROLLBACK; + } // There is no other action we can compute for legacy server. return error; } @@ -467,6 +471,8 @@ SyncerError SyncerProtoUtil::PostClientToServerMessage( return SERVER_RETURN_NOT_MY_BIRTHDAY; case DISABLED_BY_ADMIN: return SERVER_RETURN_DISABLED_BY_ADMIN; + case USER_ROLLBACK: + return SERVER_RETURN_USER_ROLLBACK; default: NOTREACHED(); return UNSET; |