| 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/internal_api/public/change_record.h" | 5 #include "sync/internal_api/public/change_record.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "sync/internal_api/public/base_node.h" | 9 #include "sync/internal_api/public/base_node.h" |
| 10 #include "sync/internal_api/public/read_node.h" | 10 #include "sync/internal_api/public/read_node.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 NOTREACHED(); | 34 NOTREACHED(); |
| 35 action_str = "Unknown"; | 35 action_str = "Unknown"; |
| 36 break; | 36 break; |
| 37 } | 37 } |
| 38 value->SetString("action", action_str); | 38 value->SetString("action", action_str); |
| 39 value->SetString("id", base::Int64ToString(id)); | 39 value->SetString("id", base::Int64ToString(id)); |
| 40 if (action == ACTION_DELETE) { | 40 if (action == ACTION_DELETE) { |
| 41 if (extra.get()) { | 41 if (extra.get()) { |
| 42 value->Set("extra", extra->ToValue()); | 42 value->Set("extra", extra->ToValue()); |
| 43 } | 43 } |
| 44 value->Set("specifics", | 44 value->Set("specifics", EntitySpecificsToValue(specifics)); |
| 45 syncer::EntitySpecificsToValue(specifics)); | |
| 46 } | 45 } |
| 47 return value; | 46 return value; |
| 48 } | 47 } |
| 49 | 48 |
| 50 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData() {} | 49 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData() {} |
| 51 | 50 |
| 52 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( | 51 ExtraPasswordChangeRecordData::ExtraPasswordChangeRecordData( |
| 53 const sync_pb::PasswordSpecificsData& data) | 52 const sync_pb::PasswordSpecificsData& data) |
| 54 : unencrypted_(data) { | 53 : unencrypted_(data) { |
| 55 } | 54 } |
| 56 | 55 |
| 57 ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} | 56 ExtraPasswordChangeRecordData::~ExtraPasswordChangeRecordData() {} |
| 58 | 57 |
| 59 DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { | 58 DictionaryValue* ExtraPasswordChangeRecordData::ToValue() const { |
| 60 return syncer::PasswordSpecificsDataToValue(unencrypted_); | 59 return PasswordSpecificsDataToValue(unencrypted_); |
| 61 } | 60 } |
| 62 | 61 |
| 63 const sync_pb::PasswordSpecificsData& | 62 const sync_pb::PasswordSpecificsData& |
| 64 ExtraPasswordChangeRecordData::unencrypted() const { | 63 ExtraPasswordChangeRecordData::unencrypted() const { |
| 65 return unencrypted_; | 64 return unencrypted_; |
| 66 } | 65 } |
| 67 | 66 |
| 68 } // namespace syncer | 67 } // namespace syncer |
| OLD | NEW |