OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sync/engine/sync_scheduler_impl.h" | 5 #include "sync/engine/sync_scheduler_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cstring> | 8 #include <cstring> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 bool ShouldRequestEarlyExit(const SyncProtocolError& error) { | 36 bool ShouldRequestEarlyExit(const SyncProtocolError& error) { |
37 switch (error.error_type) { | 37 switch (error.error_type) { |
38 case SYNC_SUCCESS: | 38 case SYNC_SUCCESS: |
39 case MIGRATION_DONE: | 39 case MIGRATION_DONE: |
40 case THROTTLED: | 40 case THROTTLED: |
41 case TRANSIENT_ERROR: | 41 case TRANSIENT_ERROR: |
42 return false; | 42 return false; |
43 case NOT_MY_BIRTHDAY: | 43 case NOT_MY_BIRTHDAY: |
44 case CLEAR_PENDING: | 44 case CLEAR_PENDING: |
45 case DISABLED_BY_ADMIN: | 45 case DISABLED_BY_ADMIN: |
| 46 case USER_ROLLBACK: |
46 // If we send terminate sync early then |sync_cycle_ended| notification | 47 // If we send terminate sync early then |sync_cycle_ended| notification |
47 // would not be sent. If there were no actions then |ACTIONABLE_ERROR| | 48 // would not be sent. If there were no actions then |ACTIONABLE_ERROR| |
48 // notification wouldnt be sent either. Then the UI layer would be left | 49 // notification wouldnt be sent either. Then the UI layer would be left |
49 // waiting forever. So assert we would send something. | 50 // waiting forever. So assert we would send something. |
50 DCHECK_NE(error.action, UNKNOWN_ACTION); | 51 DCHECK_NE(error.action, UNKNOWN_ACTION); |
51 return true; | 52 return true; |
52 case INVALID_CREDENTIAL: | 53 case INVALID_CREDENTIAL: |
53 // The notification for this is handled by PostAndProcessHeaders|. | 54 // The notification for this is handled by PostAndProcessHeaders|. |
54 // Server does no have to send any action for this. | 55 // Server does no have to send any action for this. |
55 return true; | 56 return true; |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
910 | 911 |
911 #undef SDVLOG_LOC | 912 #undef SDVLOG_LOC |
912 | 913 |
913 #undef SDVLOG | 914 #undef SDVLOG |
914 | 915 |
915 #undef SLOG | 916 #undef SLOG |
916 | 917 |
917 #undef ENUM_CASE | 918 #undef ENUM_CASE |
918 | 919 |
919 } // namespace syncer | 920 } // namespace syncer |
OLD | NEW |