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

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

Issue 2905283002: [Payments] Allow international phone from different country in shipping editor. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
index 0a0b9fd4af5b36292e5d807ca2520a6568e94313..09a92fa937d5f6bc8904e2da8031797310ac26a2 100644
--- a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.cc
@@ -379,8 +379,10 @@ bool ShippingAddressEditorViewController::SaveFieldsToProfile(
country, locale);
LOG_IF(ERROR, !success && !ignore_errors)
<< "Can't set profile country to: " << country;
- if (!success && !ignore_errors)
+ if (!success && !ignore_errors) {
+ dialog()->OnEditorValidationError();
return false;
+ }
} else {
DCHECK_EQ(temporary_profile_.get(), profile);
}
@@ -396,8 +398,10 @@ bool ShippingAddressEditorViewController::SaveFieldsToProfile(
}
LOG_IF(ERROR, !success && !ignore_errors)
<< "Can't setinfo(" << field.second.type << ", " << field.first->text();
- if (!success && !ignore_errors)
+ if (!success && !ignore_errors) {
+ dialog()->OnEditorValidationError();
return false;
+ }
}
for (const auto& field : comboboxes()) {
// ValidatingCombobox* is the key, EditorField is the value.
@@ -415,8 +419,10 @@ bool ShippingAddressEditorViewController::SaveFieldsToProfile(
LOG_IF(ERROR, !success && !ignore_errors)
<< "Can't setinfo(" << field.second.type << ", "
<< combobox->GetTextForRow(combobox->selected_index());
- if (!success && !ignore_errors)
+ if (!success && !ignore_errors) {
+ dialog()->OnEditorValidationError();
return false;
+ }
}
return success;
}

Powered by Google App Engine
This is Rietveld 408576698