| 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 // Keep this file in sync with the .proto files in this directory. | 5 // Keep this file in sync with the .proto files in this directory. |
| 6 | 6 |
| 7 #include "components/sync/protocol/proto_value_conversions.h" | 7 #include "components/sync/protocol/proto_value_conversions.h" |
| 8 | 8 |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 | 129 |
| 130 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( | 130 std::unique_ptr<base::DictionaryValue> EncryptedDataToValue( |
| 131 const sync_pb::EncryptedData& proto) { | 131 const sync_pb::EncryptedData& proto) { |
| 132 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 132 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 133 SET_STR(key_name); | 133 SET_STR(key_name); |
| 134 // TODO(akalin): Shouldn't blob be of type bytes instead of string? | 134 // TODO(akalin): Shouldn't blob be of type bytes instead of string? |
| 135 SET_BYTES(blob); | 135 SET_BYTES(blob); |
| 136 return value; | 136 return value; |
| 137 } | 137 } |
| 138 | 138 |
| 139 std::unique_ptr<base::DictionaryValue> PasswordSpecificsMetadataToValue( |
| 140 const sync_pb::PasswordSpecificsMetadata& proto) { |
| 141 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 142 SET_STR(url); |
| 143 return value; |
| 144 } |
| 145 |
| 139 std::unique_ptr<base::DictionaryValue> AppSettingsToValue( | 146 std::unique_ptr<base::DictionaryValue> AppSettingsToValue( |
| 140 const sync_pb::AppNotificationSettings& proto) { | 147 const sync_pb::AppNotificationSettings& proto) { |
| 141 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 148 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 142 SET_BOOL(initial_setup_done); | 149 SET_BOOL(initial_setup_done); |
| 143 SET_BOOL(disabled); | 150 SET_BOOL(disabled); |
| 144 SET_STR(oauth_client_id); | 151 SET_STR(oauth_client_id); |
| 145 return value; | 152 return value; |
| 146 } | 153 } |
| 147 | 154 |
| 148 std::unique_ptr<base::DictionaryValue> SessionHeaderToValue( | 155 std::unique_ptr<base::DictionaryValue> SessionHeaderToValue( |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 SET_STR(entry_id); | 606 SET_STR(entry_id); |
| 600 SET_STR(title); | 607 SET_STR(title); |
| 601 SET_REP(pages, ArticlePageToValue); | 608 SET_REP(pages, ArticlePageToValue); |
| 602 return value; | 609 return value; |
| 603 } | 610 } |
| 604 | 611 |
| 605 std::unique_ptr<base::DictionaryValue> PasswordSpecificsToValue( | 612 std::unique_ptr<base::DictionaryValue> PasswordSpecificsToValue( |
| 606 const sync_pb::PasswordSpecifics& proto) { | 613 const sync_pb::PasswordSpecifics& proto) { |
| 607 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 614 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 608 SET(encrypted, EncryptedDataToValue); | 615 SET(encrypted, EncryptedDataToValue); |
| 616 SET(unencrypted_metadata, PasswordSpecificsMetadataToValue); |
| 609 return value; | 617 return value; |
| 610 } | 618 } |
| 611 | 619 |
| 612 std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( | 620 std::unique_ptr<base::DictionaryValue> PreferenceSpecificsToValue( |
| 613 const sync_pb::PreferenceSpecifics& proto) { | 621 const sync_pb::PreferenceSpecifics& proto) { |
| 614 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 622 std::unique_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
| 615 SET_STR(name); | 623 SET_STR(name); |
| 616 SET_STR(value); | 624 SET_STR(value); |
| 617 return value; | 625 return value; |
| 618 } | 626 } |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1089 #undef SET_BYTES | 1097 #undef SET_BYTES |
| 1090 #undef SET_INT32 | 1098 #undef SET_INT32 |
| 1091 #undef SET_INT64 | 1099 #undef SET_INT64 |
| 1092 #undef SET_INT64_REP | 1100 #undef SET_INT64_REP |
| 1093 #undef SET_STR | 1101 #undef SET_STR |
| 1094 #undef SET_STR_REP | 1102 #undef SET_STR_REP |
| 1095 | 1103 |
| 1096 #undef SET_FIELD | 1104 #undef SET_FIELD |
| 1097 | 1105 |
| 1098 } // namespace syncer | 1106 } // namespace syncer |
| OLD | NEW |