Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(682)

Side by Side Diff: sync/protocol/proto_value_conversions.cc

Issue 1147753002: Fixup Wallet sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/sync_driver/sync_prefs.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/sync_driver/sync_prefs.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698