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

Unified Diff: ios/chrome/browser/payments/payment_request.h

Issue 2803543005: [Payments] iOS: Support basic-card (Closed)
Patch Set: addressed comments Created 3 years, 8 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 | ios/chrome/browser/payments/payment_request.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c044f42937fa76781f448d4036274a7e1ddf778e..a0d32d00a2f6d6472a64a052a5ffa031cd012c0a 100644
--- a/ios/chrome/browser/payments/payment_request.h
+++ b/ios/chrome/browser/payments/payment_request.h
@@ -5,6 +5,7 @@
#ifndef IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_H_
#define IOS_CHROME_BROWSER_PAYMENTS_PAYMENT_REQUEST_H_
+#include <set>
#include <vector>
#include "base/macros.h"
@@ -100,6 +101,10 @@ class PaymentRequest {
return supported_card_networks_;
}
+ const std::set<std::string>& basic_card_specified_networks() const {
+ return basic_card_specified_networks_;
+ }
+
// Adds |credit_card| to the list of cached credit cards and returns a pointer
// to the cached copy.
virtual autofill::CreditCard* AddCreditCard(
@@ -178,8 +183,13 @@ class PaymentRequest {
std::vector<autofill::CreditCard*> credit_cards_;
autofill::CreditCard* selected_credit_card_;
- // A vector of supported basic card networks.
+ // A vector of supported basic card networks. This encompasses everything that
+ // the merchant supports and should be used for support checks.
std::vector<std::string> supported_card_networks_;
+ // A subset of |supported_card_networks_| which is only the networks that have
+ // been specified as part of the "basic-card" supported method. Callers should
+ // use |supported_card_networks_| for merchant support checks.
+ std::set<std::string> basic_card_specified_networks_;
// A vector of pointers to the shipping options in |web_payment_request_|.
std::vector<web::PaymentShippingOption*> shipping_options_;
« no previous file with comments | « no previous file | ios/chrome/browser/payments/payment_request.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698