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

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

Issue 2789093002: [Payments] Desktop: implement shipping address/option change (Closed)
Patch Set: compile fix 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
« no previous file with comments | « chrome/browser/ui/views/payments/profile_list_view_controller.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e38be790107e70fb544abc6823a63a1b15acba05..4ae31ed4a40a95528d846c0f5c42e9f448a93412 100644
--- a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
+++ b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
@@ -16,7 +16,7 @@ namespace {
class ShippingOptionItem : public PaymentRequestItemList::Item {
public:
- ShippingOptionItem(payments::mojom::PaymentShippingOption* shipping_option,
+ ShippingOptionItem(mojom::PaymentShippingOption* shipping_option,
PaymentRequestSpec* spec,
PaymentRequestState* state,
PaymentRequestItemList* parent_list,
@@ -37,7 +37,7 @@ class ShippingOptionItem : public PaymentRequestItemList::Item {
void SelectedStateChanged() override {
if (selected()) {
- state()->SetSelectedShippingOption(shipping_option_);
+ state()->SetSelectedShippingOption(shipping_option_->id);
dialog_->GoBack();
}
}
@@ -68,7 +68,7 @@ ShippingOptionViewController::ShippingOptionViewController(
for (const auto& option : spec->details().shipping_options) {
shipping_option_list_.AddItem(base::MakeUnique<ShippingOptionItem>(
option.get(), spec, state, &shipping_option_list_, dialog,
- option.get() == state->selected_shipping_option()));
+ option.get() == spec->selected_shipping_option()));
}
}
« no previous file with comments | « chrome/browser/ui/views/payments/profile_list_view_controller.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698