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

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

Issue 2694693003: [Payments] Add support for required fields in editor validation (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
Index: chrome/browser/ui/views/payments/editor_view_controller.h
diff --git a/chrome/browser/ui/views/payments/editor_view_controller.h b/chrome/browser/ui/views/payments/editor_view_controller.h
index 14a521aef415a60f42c6b2d8ac79c84baac6cb5b..512fb272d0c51c9cae72770d68917a8723957e25 100644
--- a/chrome/browser/ui/views/payments/editor_view_controller.h
+++ b/chrome/browser/ui/views/payments/editor_view_controller.h
@@ -34,12 +34,21 @@ struct EditorField {
EditorField(autofill::ServerFieldType type,
const base::string16& label,
- LengthHint length_hint)
- : type(type), label(label), length_hint(length_hint) {}
-
+ LengthHint length_hint,
+ bool required)
+ : type(type),
+ label(label),
+ length_hint(length_hint),
+ required(required) {}
+
+ // Data type in the field.
const autofill::ServerFieldType type;
+ // Label to be shown alongside the field.
const base::string16 label;
+ // Hint about the length of this field's contents.
LengthHint length_hint;
+ // Whether the field is required.
+ bool required;
};
// The PaymentRequestSheetController subtype for the editor screens of the

Powered by Google App Engine
This is Rietveld 408576698