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

Unified Diff: components/payments/payment_request.h

Issue 2698353002: [Payments] Add the "Cards accepted" row at the top of CC editor. (Closed)
Patch Set: Initial Created 3 years, 10 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/payment_request.h
diff --git a/components/payments/payment_request.h b/components/payments/payment_request.h
index cd54b7cbcebac0e7c0f69c4430af6aa567740a0c..72e334de5df571f3098a46bdb3f2aac4791da155 100644
--- a/components/payments/payment_request.h
+++ b/components/payments/payment_request.h
@@ -39,7 +39,7 @@ class PaymentRequest : payments::mojom::PaymentRequest {
// payments::mojom::PaymentRequest "stub"
void Init(payments::mojom::PaymentRequestClientPtr client,
- std::vector<payments::mojom::PaymentMethodDataPtr> methodData,
+ std::vector<payments::mojom::PaymentMethodDataPtr> method_data,
payments::mojom::PaymentDetailsPtr details,
payments::mojom::PaymentOptionsPtr options) override;
void Show() override;
@@ -96,11 +96,18 @@ class PaymentRequest : payments::mojom::PaymentRequest {
// card.
autofill::CreditCard* GetCurrentlySelectedCreditCard();
+ // Validates the |method_data| and fills |supported_card_networks_|.
+ void PopulateValidatedMethodData(
+ const std::vector<payments::mojom::PaymentMethodDataPtr>& method_data);
+
autofill::PersonalDataManager* personal_data_manager() {
return delegate_->GetPersonalDataManager();
}
payments::mojom::PaymentDetails* details() { return details_.get(); }
+ const std::set<std::string>& supported_card_networks() {
please use gerrit instead 2017/02/16 22:16:11 Let's use a vector, because order carries meaning
Mathieu 2017/02/17 15:06:47 Done
+ return supported_card_networks_;
+ }
content::WebContents* web_contents() { return web_contents_; }
private:
@@ -119,6 +126,8 @@ class PaymentRequest : payments::mojom::PaymentRequest {
payments::mojom::PaymentRequestClientPtr client_;
payments::mojom::PaymentDetailsPtr details_;
std::unique_ptr<CurrencyFormatter> currency_formatter_;
+ // A set of supported basic card networks.
+ std::set<std::string> supported_card_networks_;
// Profiles may change due to (e.g.) sync events, so profiles are cached after
// loading and owned here. They are populated once only, and ordered by

Powered by Google App Engine
This is Rietveld 408576698