| 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 863e4e3be2ddf76027cccafe5da3e3b679f90793..7f20d50a841b7122896ab5946e67eff99a21fde6 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
|
| @@ -63,6 +63,10 @@ class CreditCardEditorViewController : public EditorViewController {
|
| std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType(
|
| const autofill::ServerFieldType& type) override;
|
|
|
| + // Exposed for validation delegate.
|
| + bool IsValidCreditCardNumber(const base::string16& card_number,
|
| + base::string16* error_message);
|
| +
|
| protected:
|
| // PaymentRequestSheetController:
|
| void FillContentView(views::View* content_view) override;
|
| @@ -73,12 +77,9 @@ class CreditCardEditorViewController : public EditorViewController {
|
| class CreditCardValidationDelegate : public ValidationDelegate {
|
| public:
|
| // 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);
|
| + // outlive this delegate.
|
| + CreditCardValidationDelegate(const EditorField& field,
|
| + CreditCardEditorViewController* controller);
|
| ~CreditCardValidationDelegate() override;
|
|
|
| // ValidationDelegate:
|
| @@ -97,9 +98,7 @@ 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_;
|
| + CreditCardEditorViewController* controller_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
|
| };
|
| @@ -124,6 +123,9 @@ class CreditCardEditorViewController : public EditorViewController {
|
| // The value to use for the add billing address button tag.
|
| int add_billing_address_button_tag_;
|
|
|
| + // The list of supported basic card networks.
|
| + std::set<std::string> supported_card_networks_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController);
|
| };
|
|
|
|
|