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

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

Issue 2849523003: Add billing address as a mandatory field of Payments credit cards. (Closed)
Patch Set: Merge branch 'master' into billing Created 3 years, 7 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 5caf7e9944c541099fc9d1d633856c499bc8d3bf..fae08bfabedcd4115185890a196f201dab1c6141 100644
--- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -65,7 +65,8 @@ enum class PaymentSheetViewControllerTags {
SHOW_CONTACT_INFO_BUTTON, // Navigate to the contact info screen
ADD_CONTACT_INFO_BUTTON, // Navigate to the contact info editor
SHOW_SHIPPING_OPTION_BUTTON, // Navigate to the shipping options screen
- PAY_BUTTON
+ PAY_BUTTON,
+ MAX_TAG, // Always keep last.
};
// A class that ensures proper elision of labels in the form
@@ -485,6 +486,7 @@ void PaymentSheetViewController::ButtonPressed(
case static_cast<int>(PaymentSheetViewControllerTags::ADD_SHIPPING_BUTTON):
dialog()->ShowShippingAddressEditor(
+ BackNavigationType::kPaymentSheet,
/*on_edited=*/base::OnceClosure(), // This is always an add.
/*on_added=*/
base::BindOnce(&PaymentRequestState::AddAutofillShippingProfile,
@@ -500,6 +502,8 @@ void PaymentSheetViewController::ButtonPressed(
case static_cast<int>(
PaymentSheetViewControllerTags::ADD_PAYMENT_METHOD_BUTTON):
dialog()->ShowCreditCardEditor(
+ BackNavigationType::kPaymentSheet,
+ static_cast<int>(PaymentSheetViewControllerTags::MAX_TAG),
/*on_edited=*/base::OnceClosure(), // This is always an add.
/*on_added=*/
base::BindOnce(&PaymentRequestState::AddAutofillPaymentInstrument,
@@ -515,7 +519,7 @@ void PaymentSheetViewController::ButtonPressed(
case static_cast<int>(
PaymentSheetViewControllerTags::ADD_CONTACT_INFO_BUTTON):
- dialog()->ShowContactInfoEditor();
+ dialog()->ShowContactInfoEditor(BackNavigationType::kPaymentSheet);
break;
case static_cast<int>(

Powered by Google App Engine
This is Rietveld 408576698