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 COMPONENTS_SYNC_BASE_SYNCER_ERROR_H_ |
6 #define SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ | 6 #define COMPONENTS_SYNC_BASE_SYNCER_ERROR_H_ |
7 | 7 |
8 #include "sync/base/sync_export.h" | 8 #include "components/sync/base/sync_export.h" |
9 | 9 |
10 namespace syncer { | 10 namespace syncer { |
11 | 11 |
12 // This enum describes all the possible results of a sync cycle. | 12 // This enum describes all the possible results of a sync cycle. |
13 enum SyncerError { | 13 enum SyncerError { |
14 UNSET = 0, // Default value. | 14 UNSET = 0, // Default value. |
15 CANNOT_DO_WORK, // A model worker could not process a work item. | 15 CANNOT_DO_WORK, // A model worker could not process a work item. |
16 | 16 |
17 NETWORK_CONNECTION_UNAVAILABLE, // Connectivity failure. | 17 NETWORK_CONNECTION_UNAVAILABLE, // Connectivity failure. |
18 NETWORK_IO_ERROR, // Response buffer read error. | 18 NETWORK_IO_ERROR, // Response buffer read error. |
(...skipping 24 matching lines...) Expand all Loading... |
43 }; | 43 }; |
44 | 44 |
45 SYNC_EXPORT const char* GetSyncerErrorString(SyncerError); | 45 SYNC_EXPORT const char* GetSyncerErrorString(SyncerError); |
46 | 46 |
47 // 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 |
48 // SYNCER_OK. | 48 // SYNCER_OK. |
49 bool SyncerErrorIsError(SyncerError error); | 49 bool SyncerErrorIsError(SyncerError error); |
50 | 50 |
51 } // namespace syncer | 51 } // namespace syncer |
52 | 52 |
53 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ | 53 #endif // COMPONENTS_SYNC_BASE_SYNCER_ERROR_H_ |
OLD | NEW |