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

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

Issue 2742813004: [Payments] Refactor into PaymentRequestState and Spec (Closed)
Patch Set: don't stop rebasin' 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/shipping_option_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
index fdceffe9fe287a0107cc98f4cf7fe991fa1b0847..ad68373102bec45f194f19015df8c45d7fbc07de 100644
--- a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
+++ b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
@@ -42,10 +42,10 @@ ShippingOptionViewController::ShippingOptionViewController(
PaymentRequest* request,
PaymentRequestDialogView* dialog)
: PaymentRequestSheetController(request, dialog) {
- for (const auto& option : request->details()->shipping_options) {
+ for (const auto& option : request->spec()->details().shipping_options) {
shipping_option_list_.AddItem(base::MakeUnique<ShippingOptionItem>(
option.get(), request, &shipping_option_list_,
- option.get() == request->selected_shipping_option()));
+ option.get() == request->state()->selected_shipping_option()));
}
}
@@ -55,10 +55,10 @@ std::unique_ptr<views::View> ShippingOptionViewController::CreateView() {
std::unique_ptr<views::View> list_view =
shipping_option_list_.CreateListView();
return CreatePaymentView(
- CreateSheetHeaderView(
- true,
- GetShippingOptionSectionString(request()->options()->shipping_type),
- this),
+ CreateSheetHeaderView(true,
+ GetShippingOptionSectionString(
+ request()->spec()->options().shipping_type),
+ this),
std::move(list_view));
}
« no previous file with comments | « chrome/browser/ui/views/payments/profile_list_view_controller.cc ('k') | components/payments/content/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698