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 #ifndef SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 4 #ifndef SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
5 #define SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 5 #define SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "sync/base/sync_export.h" | 10 #include "sync/base/sync_export.h" |
(...skipping 21 matching lines...) Expand all Loading... | |
32 // been taken. | 32 // been taken. |
33 NON_RETRIABLE_ERROR, | 33 NON_RETRIABLE_ERROR, |
34 | 34 |
35 // Indicates the datatypes have been migrated and the client should resync | 35 // Indicates the datatypes have been migrated and the client should resync |
36 // them to get the latest progress markers. | 36 // them to get the latest progress markers. |
37 MIGRATION_DONE, | 37 MIGRATION_DONE, |
38 | 38 |
39 // Invalid Credential. | 39 // Invalid Credential. |
40 INVALID_CREDENTIAL, | 40 INVALID_CREDENTIAL, |
41 | 41 |
42 // An administrator disabled the account. | |
Andrew T Wilson (Slow)
2013/05/13 11:51:13
See my previous comment - I think "disabled the ac
pavely
2013/05/13 22:37:09
Done.
| |
43 DISABLED_BY_ADMIN, | |
44 | |
42 // The default value. | 45 // The default value. |
43 UNKNOWN_ERROR | 46 UNKNOWN_ERROR |
44 }; | 47 }; |
45 | 48 |
46 enum ClientAction { | 49 enum ClientAction { |
47 // Upgrade the client to latest version. | 50 // Upgrade the client to latest version. |
48 UPGRADE_CLIENT, | 51 UPGRADE_CLIENT, |
49 | 52 |
50 // Clear user data and setup sync again. | 53 // Clear user data and setup sync again. |
51 CLEAR_USER_DATA_AND_RESYNC, | 54 CLEAR_USER_DATA_AND_RESYNC, |
52 | 55 |
53 // Set the bit on the account to enable sync. | 56 // Set the bit on the account to enable sync. |
54 ENABLE_SYNC_ON_ACCOUNT, | 57 ENABLE_SYNC_ON_ACCOUNT, |
55 | 58 |
56 // Stop sync and restart sync. | 59 // Stop sync and restart sync. |
57 STOP_AND_RESTART_SYNC, | 60 STOP_AND_RESTART_SYNC, |
58 | 61 |
59 // Wipe this client of any sync data. | 62 // Wipe this client of any sync data. |
60 DISABLE_SYNC_ON_CLIENT, | 63 DISABLE_SYNC_ON_CLIENT, |
61 | 64 |
65 // Account is disabled by admin. Stop sync, clear prefs and show message on | |
66 // settings page that account is disabled. | |
67 STOP_SYNC_FOR_DISABLED_ACCOUNT, | |
tim (not reviewing)
2013/05/13 04:18:58
Why is this here as a ClientAction? It isn't part
pavely
2013/05/13 22:37:09
I followed pattern of DISABLE_SYNC_ON_CLIENT. It i
| |
68 | |
62 // The default. No action. | 69 // The default. No action. |
63 UNKNOWN_ACTION | 70 UNKNOWN_ACTION |
64 }; | 71 }; |
65 | 72 |
66 struct SYNC_EXPORT SyncProtocolError { | 73 struct SYNC_EXPORT SyncProtocolError { |
67 SyncProtocolErrorType error_type; | 74 SyncProtocolErrorType error_type; |
68 std::string error_description; | 75 std::string error_description; |
69 std::string url; | 76 std::string url; |
70 ClientAction action; | 77 ClientAction action; |
71 ModelTypeSet error_data_types; | 78 ModelTypeSet error_data_types; |
72 SyncProtocolError(); | 79 SyncProtocolError(); |
73 ~SyncProtocolError(); | 80 ~SyncProtocolError(); |
74 DictionaryValue* ToValue() const; | 81 DictionaryValue* ToValue() const; |
75 }; | 82 }; |
76 | 83 |
77 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); | 84 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); |
78 SYNC_EXPORT const char* GetClientActionString(ClientAction action); | 85 SYNC_EXPORT const char* GetClientActionString(ClientAction action); |
79 } // namespace syncer | 86 } // namespace syncer |
80 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 87 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
81 | 88 |
OLD | NEW |