| Index: chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
|
| diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
|
| index e413ea99d97e6ed0a127fb2d019dc89afb57e809..5224278b7f3d2bfc4c5a8cf23364ed9cf3d6112e 100644
|
| --- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
|
| +++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
|
| @@ -597,14 +597,24 @@ PaymentSheetViewController::CreateShippingSectionContent() {
|
| if (current_update_reason_ ==
|
| PaymentRequestSpec::UpdateReason::SHIPPING_ADDRESS) {
|
| return CreateCheckingSpinnerView();
|
| - } else {
|
| - auto* profile = state()->selected_shipping_profile();
|
| + }
|
|
|
| - return profile
|
| - ? GetShippingAddressLabel(
|
| - AddressStyleType::SUMMARY, state()->GetApplicationLocale(),
|
| - *profile, *spec(), *(state()->profile_comparator()))
|
| - : base::MakeUnique<views::Label>(base::string16());
|
| + autofill::AutofillProfile* profile = state()->selected_shipping_profile();
|
| + if (!profile)
|
| + return base::MakeUnique<views::Label>(base::string16());
|
| +
|
| + // If there is a shipping option error related to the selected address,
|
| + // display it (without disabling the row because the user should feel like
|
| + // they can click on it to correct the problem). Otherwise, display the
|
| + // address possibly with the missing information to make it complete.
|
| + if (!spec()->selected_shipping_option_error().empty()) {
|
| + return GetShippingAddressLabelWithError(
|
| + AddressStyleType::SUMMARY, state()->GetApplicationLocale(), *profile,
|
| + spec()->selected_shipping_option_error(), /*disabled_state=*/false);
|
| + } else {
|
| + return GetShippingAddressLabelWithMissingInfo(
|
| + AddressStyleType::SUMMARY, state()->GetApplicationLocale(), *profile,
|
| + *(state()->profile_comparator()));
|
| }
|
| }
|
|
|
|
|