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

Unified Diff: ios/chrome/browser/payments/payment_request.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: ios/chrome/browser/payments/payment_request.h
diff --git a/ios/chrome/browser/payments/payment_request.h b/ios/chrome/browser/payments/payment_request.h
index b91b47a75569d713fc9ae123b2c881af1f9b8130..31cb1d7657a196671e9d70132cdd5ec609dc47e2 100644
--- a/ios/chrome/browser/payments/payment_request.h
+++ b/ios/chrome/browser/payments/payment_request.h
@@ -12,6 +12,7 @@
#include <vector>
#include "base/macros.h"
+#include "components/autofill/core/browser/credit_card.h"
#include "components/payments/core/payment_options_provider.h"
#include "components/payments/core/payment_request_base_delegate.h"
#include "components/payments/core/payments_profile_comparator.h"
@@ -19,7 +20,6 @@
namespace autofill {
class AutofillProfile;
-class CreditCard;
class PersonalDataManager;
class RegionDataLoader;
} // namespace autofill
@@ -160,6 +160,11 @@ class PaymentRequest : public payments::PaymentOptionsProvider,
return stringified_method_data_;
}
+ const std::set<autofill::CreditCard::CardType>& supported_card_types_set()
+ const {
+ return supported_card_types_set_;
+ }
+
// Adds |credit_card| to the list of cached credit cards, updates the list of
// available credit cards, and returns a reference to the cached copy of
// |credit_card|.
@@ -277,6 +282,9 @@ class PaymentRequest : public payments::PaymentOptionsProvider,
// payment method specific data.
std::map<std::string, std::set<std::string>> stringified_method_data_;
+ // The set of supported card types (e.g., credit, debit, prepaid).
+ std::set<autofill::CreditCard::CardType> supported_card_types_set_;
+
// A vector of pointers to the shipping options in |web_payment_request_|.
std::vector<web::PaymentShippingOption*> shipping_options_;
web::PaymentShippingOption* selected_shipping_option_;
« no previous file with comments | « components/payments/core/payment_request_data_util.cc ('k') | ios/chrome/browser/payments/payment_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698