X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fautofill%2Fcontent%2Fbrowser%2Fwallet%2Fwallet_items.cc;h=d9a45d12c410e7c62ad63f89b840dba02d67ae5a;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=ee322e890ad30e44e503ac8d358013d1d63672e1;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/autofill/content/browser/wallet/wallet_items.cc b/src/components/autofill/content/browser/wallet/wallet_items.cc index ee322e8..d9a45d1 100644 --- a/src/components/autofill/content/browser/wallet/wallet_items.cc +++ b/src/components/autofill/content/browser/wallet/wallet_items.cc @@ -245,7 +245,7 @@ bool WalletItems::HasRequiredAction(RequiredAction action) const { bool WalletItems::SupportsCard(const base::string16& card_number, base::string16* message) const { - std::string card_type = CreditCard::GetCreditCardType(card_number); + const char* const card_type = CreditCard::GetCreditCardType(card_number); if (card_type == kVisaCard || card_type == kMasterCard || @@ -539,6 +539,22 @@ scoped_ptr DVLOG(1) << "Response from Google wallet missing addresses"; } + const base::ListValue* allowed_shipping_countries; + if (dictionary.GetList("allowed_shipping_spec_by_country", + &allowed_shipping_countries)) { + for (size_t i = 0; i < allowed_shipping_countries->GetSize(); ++i) { + const base::DictionaryValue* country_spec; + std::string country_code; + if (allowed_shipping_countries->GetDictionary(i, &country_spec) && + country_spec->GetString("country_code", &country_code)) { + wallet_items->AddAllowedShippingCountry(country_code); + } + } + } else { + DVLOG(1) << "Response from Google wallet missing allowed shipping" + " countries"; + } + return wallet_items.Pass(); } @@ -568,7 +584,8 @@ bool WalletItems::operator==(const WalletItems& other) const { other.instruments()) && VectorsAreEqual
(addresses(), other.addresses()) && VectorsAreEqual(legal_documents(), - other.legal_documents()); + other.legal_documents()) && + allowed_shipping_countries() == other.allowed_shipping_countries(); } bool WalletItems::operator!=(const WalletItems& other) const {