| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "sync/base/sync_export.h" | 8 #include "sync/base/sync_export.h" |
| 9 | 9 |
| 10 namespace syncer { | 10 namespace syncer { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Based on values returned by server. Most are defined in sync.proto. | 30 // Based on values returned by server. Most are defined in sync.proto. |
| 31 SERVER_RETURN_INVALID_CREDENTIAL, | 31 SERVER_RETURN_INVALID_CREDENTIAL, |
| 32 SERVER_RETURN_UNKNOWN_ERROR, | 32 SERVER_RETURN_UNKNOWN_ERROR, |
| 33 SERVER_RETURN_THROTTLED, | 33 SERVER_RETURN_THROTTLED, |
| 34 SERVER_RETURN_TRANSIENT_ERROR, | 34 SERVER_RETURN_TRANSIENT_ERROR, |
| 35 SERVER_RETURN_MIGRATION_DONE, | 35 SERVER_RETURN_MIGRATION_DONE, |
| 36 SERVER_RETURN_CLEAR_PENDING, | 36 SERVER_RETURN_CLEAR_PENDING, |
| 37 SERVER_RETURN_NOT_MY_BIRTHDAY, | 37 SERVER_RETURN_NOT_MY_BIRTHDAY, |
| 38 SERVER_RETURN_CONFLICT, | 38 SERVER_RETURN_CONFLICT, |
| 39 SERVER_RESPONSE_VALIDATION_FAILED, | 39 SERVER_RESPONSE_VALIDATION_FAILED, |
| 40 SERVER_RETURN_DISABLED_BY_ADMIN, |
| 40 | 41 |
| 41 SYNCER_OK | 42 SYNCER_OK |
| 42 }; | 43 }; |
| 43 | 44 |
| 44 SYNC_EXPORT const char* GetSyncerErrorString(SyncerError); | 45 SYNC_EXPORT const char* GetSyncerErrorString(SyncerError); |
| 45 | 46 |
| 46 // Helper to check that |error| is set to something (not UNSET) and is not | 47 // Helper to check that |error| is set to something (not UNSET) and is not |
| 47 // SYNCER_OK. | 48 // SYNCER_OK. |
| 48 bool SyncerErrorIsError(SyncerError error); | 49 bool SyncerErrorIsError(SyncerError error); |
| 49 | 50 |
| 50 } // namespace syncer | 51 } // namespace syncer |
| 51 | 52 |
| 52 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ | 53 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ |
| OLD | NEW |