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

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

Issue 2715533002: [Payments] Add error messages to credit card editor. (Closed)
Patch Set: tests 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: 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 4ea2ef71990b2bf50ccd40f986b9e5916aa95b8e..a13067d9f47236e3e108433bebdb9e115126a947 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
@@ -28,14 +28,16 @@ class CreditCardEditorViewController : public EditorViewController {
std::vector<EditorField> GetFieldDefinitions() override;
bool ValidateModelAndSave() override;
std::unique_ptr<ValidationDelegate> CreateValidationDelegate(
- const EditorField& field) override;
+ const EditorField& field,
+ EditorViewController* controller) override;
std::unique_ptr<ui::ComboboxModel> GetComboboxModelForType(
const autofill::ServerFieldType& type) override;
private:
class CreditCardValidationDelegate : public ValidationDelegate {
public:
- explicit CreditCardValidationDelegate(const EditorField& field);
+ explicit CreditCardValidationDelegate(const EditorField& field,
+ EditorViewController* controller);
~CreditCardValidationDelegate() override;
// ValidationDelegate:
@@ -47,6 +49,8 @@ class CreditCardEditorViewController : public EditorViewController {
bool ValidateValue(const base::string16& value);
EditorField field_;
+ // Outlives this class.
+ EditorViewController* controller_;
DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698