diff options
author | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 05:27:04 +0000 |
---|---|---|
committer | dbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-04 05:27:04 +0000 |
commit | 2c1196e86abc2cc56e78fc6f33e7dbb307bf8a19 (patch) | |
tree | c0d314997fc11f903bef0c7b3fa5469375f0ac27 /components | |
parent | 3b38479db517949e91631dc5a61454a657a4c66b (diff) | |
download | chromium_src-2c1196e86abc2cc56e78fc6f33e7dbb307bf8a19.zip chromium_src-2c1196e86abc2cc56e78fc6f33e7dbb307bf8a19.tar.gz chromium_src-2c1196e86abc2cc56e78fc6f33e7dbb307bf8a19.tar.bz2 |
rAc: remove handling of "supported_currencies" from wallet items response and related code.
We never used this and are not likely to in the near future.
We should not send this data across the wire as well.
R=estade@chromium.org
BUG=348268
TEST=unit_tests, compilation
Review URL: https://codereview.chromium.org/185193002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254670 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
5 files changed, 0 insertions, 68 deletions
diff --git a/components/autofill/content/browser/wallet/wallet_client_unittest.cc b/components/autofill/content/browser/wallet/wallet_client_unittest.cc index 0c25ce9..49a1678 100644 --- a/components/autofill/content/browser/wallet/wallet_client_unittest.cc +++ b/components/autofill/content/browser/wallet/wallet_client_unittest.cc @@ -103,7 +103,6 @@ const char kGetWalletItemsValidResponse[] = " {" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":\"currency_code\"," " \"last_four_digits\":\"4111\"," " \"expiration_month\":12," " \"expiration_year\":3000," diff --git a/components/autofill/content/browser/wallet/wallet_items.cc b/components/autofill/content/browser/wallet/wallet_items.cc index 6ada828..97e0e6fd 100644 --- a/components/autofill/content/browser/wallet/wallet_items.cc +++ b/components/autofill/content/browser/wallet/wallet_items.cc @@ -103,7 +103,6 @@ base::string16 DisplayStringFromType(WalletItems::MaskedInstrument::Type type) { WalletItems::MaskedInstrument::MaskedInstrument( const base::string16& descriptive_name, const WalletItems::MaskedInstrument::Type& type, - const std::vector<base::string16>& supported_currencies, const base::string16& last_four_digits, int expiration_month, int expiration_year, @@ -112,7 +111,6 @@ WalletItems::MaskedInstrument::MaskedInstrument( const std::string& object_id) : descriptive_name_(descriptive_name), type_(type), - supported_currencies_(supported_currencies), last_four_digits_(last_four_digits), expiration_month_(expiration_month), expiration_year_(expiration_year), @@ -169,18 +167,6 @@ scoped_ptr<WalletItems::MaskedInstrument> return scoped_ptr<MaskedInstrument>(); } - std::vector<base::string16> supported_currencies; - const base::ListValue* supported_currency_list; - if (dictionary.GetList("supported_currency", &supported_currency_list)) { - for (size_t i = 0; i < supported_currency_list->GetSize(); ++i) { - base::string16 currency; - if (supported_currency_list->GetString(i, ¤cy)) - supported_currencies.push_back(currency); - } - } else { - DVLOG(1) << "Response from Google Wallet missing supported currency"; - } - int expiration_month; if (!dictionary.GetInteger("expiration_month", &expiration_month)) DVLOG(1) << "Response from Google Wallet missing expiration month"; @@ -195,7 +181,6 @@ scoped_ptr<WalletItems::MaskedInstrument> return scoped_ptr<MaskedInstrument>(new MaskedInstrument(descriptive_name, type, - supported_currencies, last_four_digits, expiration_month, expiration_year, @@ -210,8 +195,6 @@ bool WalletItems::MaskedInstrument::operator==( return false; if (type_ != other.type_) return false; - if (supported_currencies_ != other.supported_currencies_) - return false; if (last_four_digits_ != other.last_four_digits_) return false; if (expiration_month_ != other.expiration_month_) diff --git a/components/autofill/content/browser/wallet/wallet_items.h b/components/autofill/content/browser/wallet/wallet_items.h index cd16a73..0220004 100644 --- a/components/autofill/content/browser/wallet/wallet_items.h +++ b/components/autofill/content/browser/wallet/wallet_items.h @@ -104,9 +104,6 @@ class WalletItems { const base::string16& descriptive_name() const { return descriptive_name_; } const Type& type() const { return type_; } - const std::vector<base::string16>& supported_currencies() const { - return supported_currencies_; - } const base::string16& last_four_digits() const { return last_four_digits_; } int expiration_month() const { return expiration_month_; } int expiration_year() const { return expiration_year_; } @@ -130,7 +127,6 @@ class WalletItems { MaskedInstrument(const base::string16& descriptive_name, const Type& type, - const std::vector<base::string16>& supported_currencies, const base::string16& last_four_digits, int expiration_month, int expiration_year, @@ -145,9 +141,6 @@ class WalletItems { // The payment network of the instrument. For example, Visa. Type type_; - // |supported_currencies_| are ISO 4217 currency codes, e.g. USD. - std::vector<base::string16> supported_currencies_; - // The last four digits of the primary account number of the instrument. base::string16 last_four_digits_; diff --git a/components/autofill/content/browser/wallet/wallet_items_unittest.cc b/components/autofill/content/browser/wallet/wallet_items_unittest.cc index 46b056a..734f8dd 100644 --- a/components/autofill/content/browser/wallet/wallet_items_unittest.cc +++ b/components/autofill/content/browser/wallet/wallet_items_unittest.cc @@ -22,10 +22,6 @@ const char kMaskedInstrument[] = "{" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -51,10 +47,6 @@ const char kMaskedInstrumentMissingStatus[] = "{" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -78,10 +70,6 @@ const char kMaskedInstrumentMissingStatus[] = const char kMaskedInstrumentMissingType[] = "{" " \"descriptive_name\":\"descriptive_name\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -106,10 +94,6 @@ const char kMaskedInstrumentMissingLastFourDigits[] = "{" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"expiration_month\":12," " \"expiration_year\":2012," " \"billing_address\":" @@ -133,10 +117,6 @@ const char kMaskedInstrumentMissingAddress[] = "{" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -148,10 +128,6 @@ const char kMaskedInstrumentMalformedAddress[] = "{" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -173,10 +149,6 @@ const char kMaskedInstrumentMissingObjectId[] = "{" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -246,10 +218,6 @@ const char kWalletItemsMissingGoogleTransactionId[] = " {" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -311,10 +279,6 @@ const char kWalletItems[] = " {" " \"descriptive_name\":\"descriptive_name\"," " \"type\":\"VISA\"," - " \"supported_currency\":" - " [" - " \"currency\"" - " ]," " \"last_four_digits\":\"last_four_digits\"," " \"expiration_month\":12," " \"expiration_year\":2012," @@ -467,12 +431,9 @@ TEST_F(WalletItemsTest, CreateMaskedInstrument) { ASCIIToUTF16("sorting_code"), ASCIIToUTF16("phone_number"), std::string())); - std::vector<base::string16> supported_currencies; - supported_currencies.push_back(ASCIIToUTF16("currency")); WalletItems::MaskedInstrument masked_instrument( ASCIIToUTF16("descriptive_name"), WalletItems::MaskedInstrument::VISA, - supported_currencies, ASCIIToUTF16("last_four_digits"), 12, 2012, @@ -596,12 +557,9 @@ TEST_F(WalletItemsTest, CreateWalletItems) { ASCIIToUTF16("sorting_code"), ASCIIToUTF16("phone_number"), std::string())); - std::vector<base::string16> supported_currencies; - supported_currencies.push_back(ASCIIToUTF16("currency")); scoped_ptr<WalletItems::MaskedInstrument> masked_instrument( new WalletItems::MaskedInstrument(ASCIIToUTF16("descriptive_name"), WalletItems::MaskedInstrument::VISA, - supported_currencies, ASCIIToUTF16("last_four_digits"), 12, 2012, diff --git a/components/autofill/content/browser/wallet/wallet_test_util.cc b/components/autofill/content/browser/wallet/wallet_test_util.cc index 5b9b0bb..071fdbc 100644 --- a/components/autofill/content/browser/wallet/wallet_test_util.cc +++ b/components/autofill/content/browser/wallet/wallet_test_util.cc @@ -39,7 +39,6 @@ scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrumentWithDetails( return make_scoped_ptr( new WalletItems::MaskedInstrument(ASCIIToUTF16("descriptive_name"), type, - std::vector<base::string16>(), ASCIIToUTF16("1111"), 12, FutureYear(), |