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 #ifndef SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ |
7 | 7 |
8 namespace syncer { | 8 namespace syncer { |
9 | 9 |
10 // This enum describes all the ways a SyncerCommand can fail. | 10 // This enum describes all the ways a SyncerCommand can fail. |
(...skipping 22 matching lines...) Expand all Loading... |
33 SERVER_RETURN_MIGRATION_DONE, | 33 SERVER_RETURN_MIGRATION_DONE, |
34 SERVER_RETURN_CLEAR_PENDING, | 34 SERVER_RETURN_CLEAR_PENDING, |
35 SERVER_RETURN_NOT_MY_BIRTHDAY, | 35 SERVER_RETURN_NOT_MY_BIRTHDAY, |
36 SERVER_RESPONSE_VALIDATION_FAILED, | 36 SERVER_RESPONSE_VALIDATION_FAILED, |
37 | 37 |
38 SYNCER_OK | 38 SYNCER_OK |
39 }; | 39 }; |
40 | 40 |
41 const char * GetSyncerErrorString(SyncerError); | 41 const char * GetSyncerErrorString(SyncerError); |
42 | 42 |
| 43 // Helper to check that |error| is set to something (not UNSET) and is not |
| 44 // SYNCER_OK. |
| 45 bool SyncerErrorIsError(SyncerError error); |
| 46 |
43 } // namespace syncer | 47 } // namespace syncer |
44 | 48 |
45 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ | 49 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ |
OLD | NEW |