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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 15961007: Highlight fields we know to be invalid but have no way of locally checking. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 2944948d36920770d1b097e3b2d1002e7e6072e9..ed9c07d90411f63b1f0b6c632147fa1bdd060913 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -1249,7 +1249,7 @@ void AutofillDialogViews::OnDidChangeFocus(
if (focused_before) {
DetailsGroup* group = GroupForView(focused_before);
if (group && group->container->visible())
- ValidateGroup(*group, AutofillDialogController::VALIDATE_EDIT);
+ ValidateGroup(*group, VALIDATE_EDIT);
}
// Show an error bubble when the user focuses the input.
@@ -1270,7 +1270,7 @@ void AutofillDialogViews::LinkClicked(views::Link* source, int event_flags) {
void AutofillDialogViews::OnSelectedIndexChanged(views::Combobox* combobox) {
DetailsGroup* group = GroupForView(combobox);
- ValidateGroup(*group, AutofillDialogController::VALIDATE_EDIT);
+ ValidateGroup(*group, VALIDATE_EDIT);
}
void AutofillDialogViews::StyledLabelLinkClicked(const ui::Range& range,
@@ -1564,7 +1564,7 @@ void AutofillDialogViews::UpdateDetailsGroupState(const DetailsGroup& group) {
group.container->SetForwardMouseEvents(has_menu && show_suggestions);
group.container->SetVisible(controller_->SectionIsActive(group.section));
if (group.container->visible())
- ValidateGroup(group, AutofillDialogController::VALIDATE_EDIT);
+ ValidateGroup(group, VALIDATE_EDIT);
}
ContentsPreferredSizeChanged();
@@ -1607,9 +1607,8 @@ void AutofillDialogViews::ShowErrorBubbleForViewIfNecessary(views::View* view) {
error_bubble_.reset(new ErrorBubble(input, error_message->second));
}
-bool AutofillDialogViews::ValidateGroup(
- const DetailsGroup& group,
- AutofillDialogController::ValidationType validation_type) {
+bool AutofillDialogViews::ValidateGroup(const DetailsGroup& group,
+ ValidationType validation_type) {
DCHECK(group.container->visible());
scoped_ptr<DetailInput> cvc_input;
@@ -1683,7 +1682,7 @@ bool AutofillDialogViews::ValidateForm() {
if (!group.container->visible())
continue;
- if (!ValidateGroup(group, AutofillDialogController::VALIDATE_FINAL))
+ if (!ValidateGroup(group, VALIDATE_FINAL))
all_valid = false;
}
@@ -1737,7 +1736,7 @@ void AutofillDialogViews::TextfieldEditedOrActivated(
// If the field transitioned from invalid to valid, re-validate the group,
// since inter-field checks become meaningful with valid fields.
if (!decorated->invalid())
- ValidateGroup(*group, AutofillDialogController::VALIDATE_EDIT);
+ ValidateGroup(*group, VALIDATE_EDIT);
}
gfx::Image icon = controller_->IconForField(type, textfield->text());

Powered by Google App Engine
This is Rietveld 408576698