| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "sync/protocol/sync_protocol_error.h" | 5 #include "sync/protocol/sync_protocol_error.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 } | 44 } |
| 45 | 45 |
| 46 SyncProtocolError::SyncProtocolError() | 46 SyncProtocolError::SyncProtocolError() |
| 47 : error_type(UNKNOWN_ERROR), | 47 : error_type(UNKNOWN_ERROR), |
| 48 action(UNKNOWN_ACTION) { | 48 action(UNKNOWN_ACTION) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 SyncProtocolError::~SyncProtocolError() { | 51 SyncProtocolError::~SyncProtocolError() { |
| 52 } | 52 } |
| 53 | 53 |
| 54 DictionaryValue* SyncProtocolError::ToValue() const { | 54 base::DictionaryValue* SyncProtocolError::ToValue() const { |
| 55 DictionaryValue* value = new DictionaryValue(); | 55 base::DictionaryValue* value = new base::DictionaryValue(); |
| 56 value->SetString("ErrorType", | 56 value->SetString("ErrorType", |
| 57 GetSyncErrorTypeString(error_type)); | 57 GetSyncErrorTypeString(error_type)); |
| 58 value->SetString("ErrorDescription", error_description); | 58 value->SetString("ErrorDescription", error_description); |
| 59 value->SetString("url", url); | 59 value->SetString("url", url); |
| 60 value->SetString("action", GetClientActionString(action)); | 60 value->SetString("action", GetClientActionString(action)); |
| 61 return value; | 61 return value; |
| 62 } | 62 } |
| 63 | 63 |
| 64 } // namespace syncer | 64 } // namespace syncer |
| 65 | 65 |
| OLD | NEW |