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

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

Issue 2779453002: [Payments] Return the preferred payment method name to the merchant (Closed)
Patch Set: compile fix Created 3 years, 9 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/content/payment_request_spec.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/payments/content/payment_request_spec.h
diff --git a/components/payments/content/payment_request_spec.h b/components/payments/content/payment_request_spec.h
index 729d7ca87e978d8aee6d3adf6884425654b254db..dd7cb30d1397df9b0a7f0b4a523312ac4b39f861 100644
--- a/components/payments/content/payment_request_spec.h
+++ b/components/payments/content/payment_request_spec.h
@@ -16,6 +16,9 @@
namespace payments {
+// Identifier for the basic card payment method in the PaymentMethodData.
+extern const char kBasicCardMethodName[];
+
// The spec contains all the options that the merchant has specified about this
// Payment Request. It's a (mostly) read-only view, which can be updated in
// certain occasions by the merchant (see API).
@@ -53,6 +56,10 @@ class PaymentRequestSpec {
const std::set<std::string>& supported_card_networks_set() const {
return supported_card_networks_set_;
}
+ // Returns whether the |method_name| was specified as supported through the
+ // "basic-card" payment method. If false, it means either the |method_name| is
+ // not supported at all, or specified directly in supportedMethods.
+ bool IsMethodSupportedThroughBasicCard(const std::string& method_name);
// Uses CurrencyFormatter to format |amount| with the currency symbol for this
// request's currency. Will use currency of the "total" display item, because
@@ -95,6 +102,10 @@ class PaymentRequestSpec {
std::vector<std::string> supported_card_networks_;
std::set<std::string> supported_card_networks_set_;
+ // Only the set of basic-card specified networks. NOTE: callers should use
+ // |supported_card_networks_set_| to check merchant support.
+ std::set<std::string> basic_card_specified_networks_;
+
base::ObserverList<Observer> observers_;
DISALLOW_COPY_AND_ASSIGN(PaymentRequestSpec);
« no previous file with comments | « no previous file | components/payments/content/payment_request_spec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698