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

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

Issue 2774233005: Creating PaymentOptionsProvider interface (Closed)
Patch Set: rouslan comments Created 3 years, 9 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 b6d15fd4d6bd360765f6d9672e25c347b2484271..2ac48b747aae3d1c95bd4b0cbcb154b228bfbe55 100644
--- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -419,7 +419,7 @@ PaymentSheetViewController::CreateShippingSectionContent() {
// +----------------------------------------------+
std::unique_ptr<views::Button> PaymentSheetViewController::CreateShippingRow() {
std::unique_ptr<views::Button> section = CreatePaymentSheetRow(
- this, GetShippingAddressSectionString(spec()->options().shipping_type),
+ this, GetShippingAddressSectionString(spec()->shipping_type()),
CreateShippingSectionContent(), std::unique_ptr<views::View>(nullptr),
widest_name_column_view_width_);
section->set_tag(
@@ -478,12 +478,10 @@ 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()->request_payer_name(),
- spec()->request_payer_phone(), spec()->request_payer_email())
- : base::MakeUnique<views::Label>(base::string16());
+ return profile ? payments::GetContactInfoLabel(
+ AddressStyleType::SUMMARY,
+ state()->GetApplicationLocale(), *profile, *spec())
+ : base::MakeUnique<views::Label>(base::string16());
}
// Creates the Contact Info row, which contains a "Contact info" label; the
@@ -516,7 +514,7 @@ PaymentSheetViewController::CreateShippingOptionRow() {
selected_option->amount->value)
: base::ASCIIToUTF16(""));
std::unique_ptr<views::Button> section = CreatePaymentSheetRow(
- this, GetShippingOptionSectionString(spec()->options().shipping_type),
+ this, GetShippingOptionSectionString(spec()->shipping_type()),
std::move(option_label), std::unique_ptr<views::View>(nullptr),
widest_name_column_view_width_);
section->set_tag(static_cast<int>(

Powered by Google App Engine
This is Rietveld 408576698