| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 822 | 823 | 
| 823 #undef SDVLOG_LOC | 824 #undef SDVLOG_LOC | 
| 824 | 825 | 
| 825 #undef SDVLOG | 826 #undef SDVLOG | 
| 826 | 827 | 
| 827 #undef SLOG | 828 #undef SLOG | 
| 828 | 829 | 
| 829 #undef ENUM_CASE | 830 #undef ENUM_CASE | 
| 830 | 831 | 
| 831 }  // namespace syncer | 832 }  // namespace syncer | 
| OLD | NEW | 
|---|