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

Unified Diff: components/payments/core/payment_request_data_util.h

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
Index: components/payments/core/payment_request_data_util.h
diff --git a/components/payments/core/payment_request_data_util.h b/components/payments/core/payment_request_data_util.h
index c3c1adb2138bffa3a94bf3f660a6826da708c07f..93b80f1d03f58efe87d9f352d3fc1e31c67eed00 100644
--- a/components/payments/core/payment_request_data_util.h
+++ b/components/payments/core/payment_request_data_util.h
@@ -10,10 +10,10 @@
#include <vector>
#include "base/strings/string16.h"
+#include "components/autofill/core/browser/credit_card.h"
namespace autofill {
class AutofillProfile;
-class CreditCard;
} // namespace autofill
namespace payments {
@@ -52,6 +52,14 @@ void ParseBasicCardSupportedNetworks(
std::vector<std::string>* out_supported_networks,
std::set<std::string>* out_basic_card_supported_networks);
+// Parses the supported card types (e.g., credit, debit, prepaid) from
+// supportedTypes. |out_supported_card_types_set| is expected to be empty. It
+// will always contain autofill::CreditCard::CARD_TYPE_UNKNOWN after the call.
+// Also, it gets filled with all of the card types if supportedTypes is empty.
+void ParseSupportedCardTypes(
+ const std::vector<PaymentMethodData>& method_data,
+ std::set<autofill::CreditCard::CardType>* out_supported_card_types_set);
+
// Returns the phone number from the given |profile| formatted for display.
base::string16 GetFormattedPhoneNumberForDisplay(
const autofill::AutofillProfile& profile,
« no previous file with comments | « components/payments/content/payment_request_spec.cc ('k') | components/payments/core/payment_request_data_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698