| Index: chrome/browser/ui/views/payments/payment_request_views_util.cc
|
| diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc
|
| index 405c62b5d4df07b05b64293b55473ebafbd11d42..2d3b335dd23a1621448f004292277f34aee5fcc3 100644
|
| --- a/chrome/browser/ui/views/payments/payment_request_views_util.cc
|
| +++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
|
| @@ -305,9 +305,10 @@ std::unique_ptr<views::View> GetShippingAddressLabelWithMissingInfo(
|
| std::unique_ptr<views::View> base_label =
|
| GetShippingAddressLabel(type, locale, profile, /*disabled_state=*/false);
|
|
|
| - base_label->AddChildView(GetLabelForMissingInformation(
|
| - comp.GetStringForMissingShippingFields(profile))
|
| - .release());
|
| + base::string16 missing = comp.GetStringForMissingShippingFields(profile);
|
| + if (!missing.empty()) {
|
| + base_label->AddChildView(GetLabelForMissingInformation(missing).release());
|
| + }
|
| return base_label;
|
| }
|
|
|
| @@ -339,9 +340,10 @@ std::unique_ptr<views::View> GetContactInfoLabel(
|
| std::unique_ptr<views::View> base_label =
|
| GetBaseProfileLabel(type, name, phone, email);
|
|
|
| - base_label->AddChildView(GetLabelForMissingInformation(
|
| - comp.GetStringForMissingContactFields(profile))
|
| - .release());
|
| + base::string16 missing = comp.GetStringForMissingContactFields(profile);
|
| + if (!missing.empty()) {
|
| + base_label->AddChildView(GetLabelForMissingInformation(missing).release());
|
| + }
|
| return base_label;
|
| }
|
|
|
|
|