| 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 | 36 |
| 37 bool ShouldRequestEarlyExit(const SyncProtocolError& error) { | 37 bool ShouldRequestEarlyExit(const SyncProtocolError& error) { |
| 38 switch (error.error_type) { | 38 switch (error.error_type) { |
| 39 case SYNC_SUCCESS: | 39 case SYNC_SUCCESS: |
| 40 case MIGRATION_DONE: | 40 case MIGRATION_DONE: |
| 41 case THROTTLED: | 41 case THROTTLED: |
| 42 case TRANSIENT_ERROR: | 42 case TRANSIENT_ERROR: |
| 43 return false; | 43 return false; |
| 44 case NOT_MY_BIRTHDAY: | 44 case NOT_MY_BIRTHDAY: |
| 45 case CLEAR_PENDING: | 45 case CLEAR_PENDING: |
| 46 case DISABLED_BY_ADMIN: |
| 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 849 | 850 |
| 850 #undef SDVLOG_LOC | 851 #undef SDVLOG_LOC |
| 851 | 852 |
| 852 #undef SDVLOG | 853 #undef SDVLOG |
| 853 | 854 |
| 854 #undef SLOG | 855 #undef SLOG |
| 855 | 856 |
| 856 #undef ENUM_CASE | 857 #undef ENUM_CASE |
| 857 | 858 |
| 858 } // namespace syncer | 859 } // namespace syncer |
| OLD | NEW |