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

Side by Side Diff: chrome/browser/ui/views/payments/contact_info_editor_view_controller.cc

Issue 2896263002: [Payments] Changes to validation in the Credit Card editor (Closed)
Patch Set: Initial Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/payments/contact_info_editor_view_controller.h " 5 #include "chrome/browser/ui/views/payments/contact_info_editor_view_controller.h "
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/views/payments/validating_textfield.h" 10 #include "chrome/browser/ui/views/payments/validating_textfield.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 ContactInfoEditorViewController::ContactInfoValidationDelegate:: 152 ContactInfoEditorViewController::ContactInfoValidationDelegate::
153 ~ContactInfoValidationDelegate() {} 153 ~ContactInfoValidationDelegate() {}
154 154
155 bool ContactInfoEditorViewController::ContactInfoValidationDelegate:: 155 bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
156 IsValidTextfield(views::Textfield* textfield) { 156 IsValidTextfield(views::Textfield* textfield) {
157 return ValidateTextfield(textfield, nullptr); 157 return ValidateTextfield(textfield, nullptr);
158 } 158 }
159 159
160 bool ContactInfoEditorViewController::ContactInfoValidationDelegate:: 160 bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
161 TextfieldValueChanged(views::Textfield* textfield) { 161 TextfieldValueChanged(views::Textfield* textfield, bool was_blurred) {
162 if (!was_blurred)
163 return true;
164
162 base::string16 error_message; 165 base::string16 error_message;
163 bool is_valid = ValidateTextfield(textfield, &error_message); 166 bool is_valid = ValidateTextfield(textfield, &error_message);
164 controller_->DisplayErrorMessageForField(field_.type, error_message); 167 controller_->DisplayErrorMessageForField(field_.type, error_message);
165 return is_valid; 168 return is_valid;
166 } 169 }
167 170
168 bool ContactInfoEditorViewController::ContactInfoValidationDelegate:: 171 bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
169 ValidateTextfield(views::Textfield* textfield, 172 ValidateTextfield(views::Textfield* textfield,
170 base::string16* error_message) { 173 base::string16* error_message) {
171 bool is_valid = true; 174 bool is_valid = true;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 230 }
228 231
229 bool ContactInfoEditorViewController::ContactInfoValidationDelegate:: 232 bool ContactInfoEditorViewController::ContactInfoValidationDelegate::
230 ComboboxValueChanged(views::Combobox* combobox) { 233 ComboboxValueChanged(views::Combobox* combobox) {
231 // This UI doesn't contain any comboboxes. 234 // This UI doesn't contain any comboboxes.
232 NOTREACHED(); 235 NOTREACHED();
233 return true; 236 return true;
234 } 237 }
235 238
236 } // namespace payments 239 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698