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

Unified Diff: chrome/browser/sync/test/integration/sync_test.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 | « no previous file | sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 68bdae55b16cbf004b7d135c272082c6ee2c1c96..3123760e77bce9d8985fc8d914e4c1c437656b41 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -915,10 +915,18 @@ sync_pb::SyncEnums::ErrorType
return sync_pb::SyncEnums::MIGRATION_DONE;
case syncer::UNKNOWN_ERROR:
return sync_pb::SyncEnums::UNKNOWN;
- default:
- NOTREACHED();
+ case syncer::INVALID_CREDENTIAL:
+ NOTREACHED(); // NOTREACHED() because auth error is not set through
+ // error code in sync response.
+ return sync_pb::SyncEnums::UNKNOWN;
+ case syncer::DISABLED_BY_ADMIN:
+ return sync_pb::SyncEnums::DISABLED_BY_ADMIN;
+ case syncer::USER_ROLLBACK:
+ return sync_pb::SyncEnums::USER_ROLLBACK;
+ case syncer::NON_RETRIABLE_ERROR:
return sync_pb::SyncEnums::UNKNOWN;
}
+ return sync_pb::SyncEnums::UNKNOWN;
}
sync_pb::SyncEnums::Action GetClientToServerResponseAction(
@@ -934,12 +942,15 @@ sync_pb::SyncEnums::Action GetClientToServerResponseAction(
return sync_pb::SyncEnums::STOP_AND_RESTART_SYNC;
case syncer::DISABLE_SYNC_ON_CLIENT:
return sync_pb::SyncEnums::DISABLE_SYNC_ON_CLIENT;
- case syncer::UNKNOWN_ACTION:
+ case syncer::STOP_SYNC_FOR_DISABLED_ACCOUNT:
+ case syncer::DISABLE_SYNC_AND_ROLLBACK:
+ NOTREACHED(); // No corresponding proto action for these. Shouldn't
+ // test.
return sync_pb::SyncEnums::UNKNOWN_ACTION;
- default:
- NOTREACHED();
+ case syncer::UNKNOWN_ACTION:
return sync_pb::SyncEnums::UNKNOWN_ACTION;
}
+ return sync_pb::SyncEnums::UNKNOWN_ACTION;
}
} // namespace
« no previous file with comments | « no previous file | sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698