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

Unified Diff: sync/engine/sync_scheduler_impl.cc

Issue 1500803002: [Sync] Ensure all values of SyncProtocolErrorType are handled in ShouldRequestEarlyExit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows build Created 5 years 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/protocol/sync_protocol_error.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler_impl.cc
diff --git a/sync/engine/sync_scheduler_impl.cc b/sync/engine/sync_scheduler_impl.cc
index f40158b3299360a95aff0a95b178c04efdf1b384..4353be0752195af7aee3fe79c3647dfd6b7cd3cb 100644
--- a/sync/engine/sync_scheduler_impl.cc
+++ b/sync/engine/sync_scheduler_impl.cc
@@ -51,6 +51,7 @@ bool ShouldRequestEarlyExit(const SyncProtocolError& error) {
case MIGRATION_DONE:
case THROTTLED:
case TRANSIENT_ERROR:
+ case PARTIAL_FAILURE:
return false;
case NOT_MY_BIRTHDAY:
case CLIENT_DATA_OBSOLETE:
@@ -67,12 +68,13 @@ bool ShouldRequestEarlyExit(const SyncProtocolError& error) {
// The notification for this is handled by PostAndProcessHeaders|.
// Server does no have to send any action for this.
return true;
- // Make the default a NOTREACHED. So if a new error is introduced we
- // think about its expected functionality.
- default:
+ // Make UNKNOWN_ERROR a NOTREACHED. All the other error should be explicitly
+ // handled.
+ case UNKNOWN_ERROR:
NOTREACHED();
return false;
}
+ return false;
}
bool IsActionableError(
« no previous file with comments | « no previous file | sync/protocol/sync_protocol_error.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698