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

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

Issue 2847503002: [WebPayments] Show labels on incomplete profiles (Closed)
Patch Set: test fix 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
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 32a1d226d8dd0ca9d64a628418f7d71896ac6780..e413ea99d97e6ed0a127fb2d019dc89afb57e809 100644
--- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -600,10 +600,11 @@ PaymentSheetViewController::CreateShippingSectionContent() {
} else {
auto* profile = state()->selected_shipping_profile();
- return profile ? GetShippingAddressLabel(AddressStyleType::SUMMARY,
- state()->GetApplicationLocale(),
- *profile)
- : base::MakeUnique<views::Label>(base::string16());
+ return profile
+ ? GetShippingAddressLabel(
+ AddressStyleType::SUMMARY, state()->GetApplicationLocale(),
+ *profile, *spec(), *(state()->profile_comparator()))
+ : base::MakeUnique<views::Label>(base::string16());
}
}
@@ -736,10 +737,11 @@ PaymentSheetViewController::CreatePaymentMethodRow() {
std::unique_ptr<views::View>
PaymentSheetViewController::CreateContactInfoSectionContent() {
autofill::AutofillProfile* profile = state()->selected_contact_profile();
- return profile ? payments::GetContactInfoLabel(
- AddressStyleType::SUMMARY,
- state()->GetApplicationLocale(), *profile, *spec())
- : base::MakeUnique<views::Label>(base::string16());
+ return profile
+ ? payments::GetContactInfoLabel(
+ AddressStyleType::SUMMARY, state()->GetApplicationLocale(),
+ *profile, *spec(), *(state()->profile_comparator()))
+ : base::MakeUnique<views::Label>(base::string16());
}
// Creates the Contact Info row, which contains a "Contact info" label; the

Powered by Google App Engine
This is Rietveld 408576698