Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1192)

Unified Diff: sync/engine/syncer_proto_util.cc

Issue 238273008: Add an action for server to send down rollback command. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | sync/internal_api/public/util/syncer_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_proto_util.cc
diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc
index dab228f3ae303df826bfa9ca73458dd5b2b046c6..fe2a875bccc799ccfdf682b30014df1c3b9dcba6 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;
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | sync/internal_api/public/util/syncer_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698