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 486e308e03f624cd9a3e1f60c89a31570b161647..cfbb9aee432f9e590e921762b5d8c97167300dcc 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 |
@@ -207,7 +207,8 @@ void ShippingAddressEditorViewController::UpdateEditorView() { |
if (chosen_country_index_ > 0UL && |
chosen_country_index_ < countries_.size()) { |
views::Combobox* country_combo_box = static_cast<views::Combobox*>( |
- dialog()->GetViewByID(autofill::ADDRESS_HOME_COUNTRY)); |
+ dialog()->GetViewByID(EditorViewController::GetInputFieldViewId( |
+ autofill::ADDRESS_HOME_COUNTRY))); |
DCHECK(country_combo_box); |
DCHECK_EQ(countries_.size(), |
static_cast<size_t>(country_combo_box->GetRowCount())); |
@@ -387,7 +388,8 @@ bool ShippingAddressEditorViewController::SaveFieldsToProfile( |
// The country must be set first, because the profile uses the country to |
// interpret some of the data (e.g., phone numbers) passed to SetInfo. |
views::Combobox* combobox = static_cast<views::Combobox*>( |
- dialog()->GetViewByID(autofill::ADDRESS_HOME_COUNTRY)); |
+ dialog()->GetViewByID(EditorViewController::GetInputFieldViewId( |
+ autofill::ADDRESS_HOME_COUNTRY))); |
// The combobox can be null when saving to temporary profile while updating |
// the view. |
if (combobox) { |
@@ -495,12 +497,13 @@ bool ShippingAddressEditorViewController::ShippingAddressValidationDelegate:: |
value, controller_->countries_[controller_->chosen_country_index_] |
.first)) { |
controller_->DisplayErrorMessageForField( |
- field_, l10n_util::GetStringUTF16( |
- IDS_PAYMENTS_PHONE_INVALID_VALIDATION_MESSAGE)); |
+ field_.type, l10n_util::GetStringUTF16( |
+ IDS_PAYMENTS_PHONE_INVALID_VALIDATION_MESSAGE)); |
return false; |
} |
// As long as other field types are non-empty, they are valid. |
- controller_->DisplayErrorMessageForField(field_, base::ASCIIToUTF16("")); |
+ controller_->DisplayErrorMessageForField(field_.type, |
+ base::ASCIIToUTF16("")); |
return true; |
} |
bool is_required_valid = !field_.required; |
@@ -508,7 +511,7 @@ bool ShippingAddressEditorViewController::ShippingAddressValidationDelegate:: |
is_required_valid ? base::ASCIIToUTF16("") |
: l10n_util::GetStringUTF16( |
IDS_PAYMENTS_FIELD_REQUIRED_VALIDATION_MESSAGE); |
- controller_->DisplayErrorMessageForField(field_, displayed_message); |
+ controller_->DisplayErrorMessageForField(field_.type, displayed_message); |
return is_required_valid; |
} |