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

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

Issue 2813203004: [Payments] Show what's missing for incomplete payment methods. (Closed)
Patch Set: addressed comments, now two functions Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_method_view_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
index d0c10544c923c7d38cb9b4ac70d623534cc5e6a3..d857a944f0cceacb3e30223a8ec69131d665b3a4 100644
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
@@ -204,9 +204,11 @@ bool CreditCardEditorViewController::ValidateModelAndSave() {
locale);
}
- // TODO(mathp): Display global error message.
- if (!credit_card.IsValid())
+ // TODO(crbug.com/711365): Display global error message.
+ if (autofill::GetCompletionStatusForCard(credit_card, locale) !=
+ autofill::CREDIT_CARD_COMPLETE) {
return false;
+ }
if (!credit_card_to_edit_) {
// Add the card (will not add a duplicate).
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_method_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698