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

Unified Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller.h

Issue 2713873002: [Payments] Add validation for unsupported credit card types in editor. (Closed)
Patch Set: addressed comments 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
index c13e8f7a6000940311b250c3f85c510cf4794744..ecebd721368753ea6503cd64b16a4accd34fef14 100644
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_
#define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_
+#include <set>
+
#include "base/macros.h"
#include "chrome/browser/ui/views/payments/editor_view_controller.h"
#include "chrome/browser/ui/views/payments/validation_delegate.h"
@@ -35,8 +37,13 @@ class CreditCardEditorViewController : public EditorViewController {
private:
class CreditCardValidationDelegate : public ValidationDelegate {
public:
- CreditCardValidationDelegate(const EditorField& field,
- EditorViewController* controller);
+ // Used to validate |field| type. A reference to the |controller| should
+ // outlive this delegate, and a list of |supported_card_networks| can be
+ // passed in to validate |field| (the data will be copied to the delegate).
+ CreditCardValidationDelegate(
+ const EditorField& field,
+ EditorViewController* controller,
+ const std::vector<std::string>& supported_card_networks);
~CreditCardValidationDelegate() override;
// ValidationDelegate:
@@ -50,6 +57,8 @@ class CreditCardEditorViewController : public EditorViewController {
EditorField field_;
// Outlives this class.
EditorViewController* controller_;
+ // The list of supported basic card networks.
+ std::set<std::string> supported_card_networks_;
DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698