| 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 <memory> |
| 7 #include <string> | 8 #include <string> |
| 8 | 9 |
| 9 #include "base/values.h" | 10 #include "base/values.h" |
| 10 #include "components/sync/base/model_type.h" | 11 #include "components/sync/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, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 82 |
| 82 struct SyncProtocolError { | 83 struct SyncProtocolError { |
| 83 SyncProtocolErrorType error_type; | 84 SyncProtocolErrorType error_type; |
| 84 std::string error_description; | 85 std::string error_description; |
| 85 std::string url; | 86 std::string url; |
| 86 ClientAction action; | 87 ClientAction action; |
| 87 ModelTypeSet error_data_types; | 88 ModelTypeSet error_data_types; |
| 88 SyncProtocolError(); | 89 SyncProtocolError(); |
| 89 SyncProtocolError(const SyncProtocolError& other); | 90 SyncProtocolError(const SyncProtocolError& other); |
| 90 ~SyncProtocolError(); | 91 ~SyncProtocolError(); |
| 91 base::DictionaryValue* ToValue() const; | 92 std::unique_ptr<base::DictionaryValue> ToValue() const; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 const char* GetSyncErrorTypeString(SyncProtocolErrorType type); | 95 const char* GetSyncErrorTypeString(SyncProtocolErrorType type); |
| 95 const char* GetClientActionString(ClientAction action); | 96 const char* GetClientActionString(ClientAction action); |
| 96 } // namespace syncer | 97 } // namespace syncer |
| 97 #endif // COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ | 98 #endif // COMPONENTS_SYNC_PROTOCOL_SYNC_PROTOCOL_ERROR_H_ |
| OLD | NEW |