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

Unified Diff: components/payments/content/payment_request_spec.cc

Issue 2963163002: [Payment Request] Displays accepted card types (credit, debit, etc) in iOS (Closed)
Patch Set: Addressed comment Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/payments/core/payment_request_data_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request_spec.cc
diff --git a/components/payments/content/payment_request_spec.cc b/components/payments/content/payment_request_spec.cc
index fc3f5ca5704c262824843031decc84937fed8932..fce3e298521de982945182147c1f293221e1065a 100644
--- a/components/payments/content/payment_request_spec.cc
+++ b/components/payments/content/payment_request_spec.cc
@@ -186,29 +186,19 @@ void PaymentRequestSpec::PopulateValidatedMethodData(
method_data_entry->supported_types) {
autofill::CreditCard::CardType card_type = GetBasicCardType(type);
method_data.supported_types.insert(card_type);
- supported_card_types_set_.insert(card_type);
}
method_data_vector.push_back(std::move(method_data));
}
- // TODO(rouslan): Parse card types (credit, debit, prepaid) in data_util, so
- // iOS can use it as well. http://crbug.com/602665
data_util::ParseBasicCardSupportedNetworks(method_data_vector,
&supported_card_networks_,
&basic_card_specified_networks_);
supported_card_networks_set_.insert(supported_card_networks_.begin(),
supported_card_networks_.end());
- // Omitting the card types means all 3 card types are supported.
- if (supported_card_types_set_.empty()) {
- supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_CREDIT);
- supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_DEBIT);
- supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_PREPAID);
- }
-
- // Let the user decide whether an unknown card type should be used.
- supported_card_types_set_.insert(autofill::CreditCard::CARD_TYPE_UNKNOWN);
+ data_util::ParseSupportedCardTypes(method_data_vector,
+ &supported_card_types_set_);
}
void PaymentRequestSpec::UpdateSelectedShippingOption(bool after_update) {
« no previous file with comments | « no previous file | components/payments/core/payment_request_data_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698