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 "sync/protocol/proto_value_conversions.h" | 7 #include "sync/protocol/proto_value_conversions.h" |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 | 360 |
361 scoped_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue( | 361 scoped_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue( |
362 const sync_pb::AutofillWalletSpecifics& proto) { | 362 const sync_pb::AutofillWalletSpecifics& proto) { |
363 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 363 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
364 | 364 |
365 SET_ENUM(type, GetWalletInfoTypeString); | 365 SET_ENUM(type, GetWalletInfoTypeString); |
366 if (proto.type() == sync_pb::AutofillWalletSpecifics::MASKED_CREDIT_CARD) { | 366 if (proto.type() == sync_pb::AutofillWalletSpecifics::MASKED_CREDIT_CARD) { |
367 value->Set("masked_card", | 367 value->Set("masked_card", |
368 WalletMaskedCreditCardToValue(proto.masked_card())); | 368 WalletMaskedCreditCardToValue(proto.masked_card())); |
369 } else if (proto.type() == sync_pb::AutofillWalletSpecifics::POSTAL_ADDRESS) { | 369 } else if (proto.type() == sync_pb::AutofillWalletSpecifics::POSTAL_ADDRESS) { |
370 value->Set("masked_card", | 370 value->Set("address", |
371 WalletPostalAddressToValue(proto.address())); | 371 WalletPostalAddressToValue(proto.address())); |
372 } | 372 } |
373 return value; | 373 return value; |
374 } | 374 } |
375 | 375 |
376 scoped_ptr<base::DictionaryValue> MetaInfoToValue( | 376 scoped_ptr<base::DictionaryValue> MetaInfoToValue( |
377 const sync_pb::MetaInfo& proto) { | 377 const sync_pb::MetaInfo& proto) { |
378 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); | 378 scoped_ptr<base::DictionaryValue> value(new base::DictionaryValue()); |
379 SET_STR(key); | 379 SET_STR(key); |
380 SET_STR(value); | 380 SET_STR(value); |
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 #undef SET_BYTES | 1066 #undef SET_BYTES |
1067 #undef SET_INT32 | 1067 #undef SET_INT32 |
1068 #undef SET_INT64 | 1068 #undef SET_INT64 |
1069 #undef SET_INT64_REP | 1069 #undef SET_INT64_REP |
1070 #undef SET_STR | 1070 #undef SET_STR |
1071 #undef SET_STR_REP | 1071 #undef SET_STR_REP |
1072 | 1072 |
1073 #undef SET_FIELD | 1073 #undef SET_FIELD |
1074 | 1074 |
1075 } // namespace syncer | 1075 } // namespace syncer |
OLD | NEW |