| OLD | NEW |
| 1 // Copyright (c) 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/internal_api/public/base/model_type.h" | 11 #include "sync/internal_api/public/base/model_type.h" |
| 11 | 12 |
| 12 namespace syncer{ | 13 namespace syncer{ |
| 13 | 14 |
| 14 enum SyncProtocolErrorType { | 15 enum SyncProtocolErrorType { |
| 15 // Success case. | 16 // Success case. |
| 16 SYNC_SUCCESS, | 17 SYNC_SUCCESS, |
| 17 | 18 |
| 18 // Birthday does not match that of the server. | 19 // Birthday does not match that of the server. |
| 19 NOT_MY_BIRTHDAY, | 20 NOT_MY_BIRTHDAY, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 // Stop sync and restart sync. | 56 // Stop sync and restart sync. |
| 56 STOP_AND_RESTART_SYNC, | 57 STOP_AND_RESTART_SYNC, |
| 57 | 58 |
| 58 // Wipe this client of any sync data. | 59 // Wipe this client of any sync data. |
| 59 DISABLE_SYNC_ON_CLIENT, | 60 DISABLE_SYNC_ON_CLIENT, |
| 60 | 61 |
| 61 // The default. No action. | 62 // The default. No action. |
| 62 UNKNOWN_ACTION | 63 UNKNOWN_ACTION |
| 63 }; | 64 }; |
| 64 | 65 |
| 65 struct SyncProtocolError { | 66 struct SYNC_EXPORT SyncProtocolError { |
| 66 SyncProtocolErrorType error_type; | 67 SyncProtocolErrorType error_type; |
| 67 std::string error_description; | 68 std::string error_description; |
| 68 std::string url; | 69 std::string url; |
| 69 ClientAction action; | 70 ClientAction action; |
| 70 ModelTypeSet error_data_types; | 71 ModelTypeSet error_data_types; |
| 71 SyncProtocolError(); | 72 SyncProtocolError(); |
| 72 ~SyncProtocolError(); | 73 ~SyncProtocolError(); |
| 73 DictionaryValue* ToValue() const; | 74 DictionaryValue* ToValue() const; |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 const char* GetSyncErrorTypeString(SyncProtocolErrorType type); | 77 SYNC_EXPORT const char* GetSyncErrorTypeString(SyncProtocolErrorType type); |
| 77 const char* GetClientActionString(ClientAction action); | 78 SYNC_EXPORT const char* GetClientActionString(ClientAction action); |
| 78 } // namespace syncer | 79 } // namespace syncer |
| 79 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 80 #endif // SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
| 80 | 81 |
| OLD | NEW |