| 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 COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 4 #ifndef COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
| 5 #define COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 5 #define COMPONENTS_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 "components/sync/base/model_type.h" | 10 #include "components/sync/base/model_type.h" |
| 11 #include "components/sync/base/sync_export.h" | |
| 12 | 11 |
| 13 namespace syncer { | 12 namespace syncer { |
| 14 | 13 |
| 15 enum SyncProtocolErrorType { | 14 enum SyncProtocolErrorType { |
| 16 // Success case. | 15 // Success case. |
| 17 SYNC_SUCCESS, | 16 SYNC_SUCCESS, |
| 18 | 17 |
| 19 // Birthday does not match that of the server. | 18 // Birthday does not match that of the server. |
| 20 NOT_MY_BIRTHDAY, | 19 NOT_MY_BIRTHDAY, |
| 21 | 20 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 STOP_SYNC_FOR_DISABLED_ACCOUNT, | 69 STOP_SYNC_FOR_DISABLED_ACCOUNT, |
| 71 | 70 |
| 72 // Generated in response to CLIENT_DATA_OBSOLETE error. ProfileSyncService | 71 // Generated in response to CLIENT_DATA_OBSOLETE error. ProfileSyncService |
| 73 // should stop sync engine, delete directory and restart sync engine. | 72 // should stop sync engine, delete directory and restart sync engine. |
| 74 RESET_LOCAL_SYNC_DATA, | 73 RESET_LOCAL_SYNC_DATA, |
| 75 | 74 |
| 76 // The default. No action. | 75 // The default. No action. |
| 77 UNKNOWN_ACTION | 76 UNKNOWN_ACTION |
| 78 }; | 77 }; |
| 79 | 78 |
| 80 struct SYNC_EXPORT SyncProtocolError { | 79 struct SyncProtocolError { |
| 81 SyncProtocolErrorType error_type; | 80 SyncProtocolErrorType error_type; |
| 82 std::string error_description; | 81 std::string error_description; |
| 83 std::string url; | 82 std::string url; |
| 84 ClientAction action; | 83 ClientAction action; |
| 85 ModelTypeSet error_data_types; | 84 ModelTypeSet error_data_types; |
| 86 SyncProtocolError(); | 85 SyncProtocolError(); |
| 87 SyncProtocolError(const SyncProtocolError& other); | 86 SyncProtocolError(const SyncProtocolError& other); |
| 88 ~SyncProtocolError(); | 87 ~SyncProtocolError(); |
| 89 base::DictionaryValue* ToValue() const; | 88 base::DictionaryValue* ToValue() const; |
| 90 }; | 89 }; |
| 91 | 90 |
| 92 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); | 91 const char* GetSyncErrorTypeString(SyncProtocolErrorType type); |
| 93 SYNC_EXPORT const char* GetClientActionString(ClientAction action); | 92 const char* GetClientActionString(ClientAction action); |
| 94 } // namespace syncer | 93 } // namespace syncer |
| 95 #endif // COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 94 #endif // COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
| OLD | NEW |