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

Unified Diff: sync/engine/syncer_proto_util.cc

Issue 14655009: Client changes for disabled dasher account (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 7 years, 7 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
Index: sync/engine/syncer_proto_util.cc
diff --git a/sync/engine/syncer_proto_util.cc b/sync/engine/syncer_proto_util.cc
index 721d0de7821e47f1383f3d64d7e15ee103b294a5..e2114f950a6e75982cf485b938652ba00578802e 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:
@@ -340,7 +342,9 @@ SyncProtocolError ConvertLegacyErrorCodeToNewError(
error.error_type = ConvertSyncProtocolErrorTypePBToLocalType(error_type);
if (error_type == sync_pb::SyncEnums::CLEAR_PENDING ||
error_type == sync_pb::SyncEnums::NOT_MY_BIRTHDAY) {
- error.action = DISABLE_SYNC_ON_CLIENT;
+ 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.
return error;
}
@@ -472,6 +476,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;

Powered by Google App Engine
This is Rietveld 408576698