Commit fb3f20a2 authored by rouslan's avatar rouslan Committed by Commit bot

Fixup Wallet sync.

1) Select the correct preference name for synced data type.
2) Set the correct field name when converting Wallet specifics to
   dictionary.

BUG=481595

Review URL: https://codereview.chromium.org/1147753002

Cr-Commit-Position: refs/heads/master@{#330441}
parent 3208992c
...@@ -252,9 +252,9 @@ const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) { ...@@ -252,9 +252,9 @@ const char* SyncPrefs::GetPrefNameForDataType(syncer::ModelType data_type) {
case syncer::AUTOFILL: case syncer::AUTOFILL:
return prefs::kSyncAutofill; return prefs::kSyncAutofill;
case syncer::AUTOFILL_PROFILE: case syncer::AUTOFILL_PROFILE:
return prefs::kSyncAutofillWallet;
case syncer::AUTOFILL_WALLET_DATA:
return prefs::kSyncAutofillProfile; return prefs::kSyncAutofillProfile;
case syncer::AUTOFILL_WALLET_DATA:
return prefs::kSyncAutofillWallet;
case syncer::THEMES: case syncer::THEMES:
return prefs::kSyncThemes; return prefs::kSyncThemes;
case syncer::TYPED_URLS: case syncer::TYPED_URLS:
...@@ -476,5 +476,3 @@ void SyncPrefs::SetCleanShutdown(bool value) { ...@@ -476,5 +476,3 @@ void SyncPrefs::SetCleanShutdown(bool value) {
} }
} // namespace sync_driver } // namespace sync_driver
...@@ -367,7 +367,7 @@ scoped_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue( ...@@ -367,7 +367,7 @@ scoped_ptr<base::DictionaryValue> AutofillWalletSpecificsToValue(
value->Set("masked_card", value->Set("masked_card",
WalletMaskedCreditCardToValue(proto.masked_card())); WalletMaskedCreditCardToValue(proto.masked_card()));
} else if (proto.type() == sync_pb::AutofillWalletSpecifics::POSTAL_ADDRESS) { } else if (proto.type() == sync_pb::AutofillWalletSpecifics::POSTAL_ADDRESS) {
value->Set("masked_card", value->Set("address",
WalletPostalAddressToValue(proto.address())); WalletPostalAddressToValue(proto.address()));
} }
return value; return value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment