Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: sync/internal_api/public/util/syncer_error.h

Issue 72403003: sync: Per-type update application (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + fix typo Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sync/engine/update_applicator.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 {
11 11
12 // This enum describes all the ways a SyncerCommand can fail. 12 // This enum describes all the possible results of a sync cycle.
13 //
14 // SyncerCommands do many different things, but they share a common function
15 // signature. This enum, the return value for all SyncerCommands, must be able
16 // to describe any possible failure for all SyncerComand.
17 //
18 // For convenience, functions which are invoked only by SyncerCommands may also
19 // return a SyncerError. It saves us having to write a conversion function, and
20 // it makes refactoring easier.
21 enum SYNC_EXPORT_PRIVATE SyncerError { 13 enum SYNC_EXPORT_PRIVATE SyncerError {
22 UNSET = 0, // Default value. 14 UNSET = 0, // Default value.
23 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.
24 16
25 NETWORK_CONNECTION_UNAVAILABLE, // Connectivity failure. 17 NETWORK_CONNECTION_UNAVAILABLE, // Connectivity failure.
26 NETWORK_IO_ERROR, // Response buffer read error. 18 NETWORK_IO_ERROR, // Response buffer read error.
27 SYNC_SERVER_ERROR, // Non auth HTTP error. 19 SYNC_SERVER_ERROR, // Non auth HTTP error.
28 SYNC_AUTH_ERROR, // HTTP auth error. 20 SYNC_AUTH_ERROR, // HTTP auth error.
29 21
30 // Based on values returned by server. Most are defined in sync.proto. 22 // Based on values returned by server. Most are defined in sync.proto.
(...skipping 13 matching lines...) Expand all
44 36
45 SYNC_EXPORT const char* GetSyncerErrorString(SyncerError); 37 SYNC_EXPORT const char* GetSyncerErrorString(SyncerError);
46 38
47 // Helper to check that |error| is set to something (not UNSET) and is not 39 // Helper to check that |error| is set to something (not UNSET) and is not
48 // SYNCER_OK. 40 // SYNCER_OK.
49 bool SyncerErrorIsError(SyncerError error); 41 bool SyncerErrorIsError(SyncerError error);
50 42
51 } // namespace syncer 43 } // namespace syncer
52 44
53 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_ 45 #endif // SYNC_INTERNAL_API_PUBLIC_UTIL_SYNCER_ERROR_H_
OLDNEW
« no previous file with comments | « sync/engine/update_applicator.cc ('k') | sync/internal_api/sync_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698