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

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

Issue 2757523002: [Payments] Use PaymentInstrument/AutofillPaymentInstrument throughout. (Closed)
Patch Set: Initial 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
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 d205a1bb4abaa69943b93f04c2b67a8eb0f9a344..819ecfb92e59d76142d7845f43870494e9ec270f 100644
--- a/components/payments/content/payment_request_spec.h
+++ b/components/payments/content/payment_request_spec.h
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_SPEC_H_
#define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_SPEC_H_
+#include <set>
#include <string>
#include <vector>
@@ -49,6 +50,9 @@ class PaymentRequestSpec {
const std::vector<std::string>& supported_card_networks() {
return supported_card_networks_;
}
+ const std::set<std::string>& supported_card_networks_set() {
+ return supported_card_networks_set_;
+ }
// Uses CurrencyFormatter to format |amount| with the currency symbol for this
// request's currency. Will use currency of the "total" display item, because
@@ -85,9 +89,11 @@ class PaymentRequestSpec {
const std::string app_locale_;
std::unique_ptr<CurrencyFormatter> currency_formatter_;
- // A list of supported basic card networks, in order that they were specified
- // by the merchant.
+ // A list/set of supported basic card networks. The list is used to keep the
+ // order in which they were specified by the merchant. The set is used for
+ // fast lookup of supported methods.
std::vector<std::string> supported_card_networks_;
+ std::set<std::string> supported_card_networks_set_;
Mathieu 2017/03/16 02:50:03 this I'm not sure about. It's used in PaymentReque
please use gerrit instead 2017/03/16 14:27:02 This is OK.
base::ObserverList<Observer> observers_;
« no previous file with comments | « chrome/browser/ui/views/payments/payment_sheet_view_controller.cc ('k') | components/payments/content/payment_request_spec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698