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

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: Components Unittests fix 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 1249aaa40b60ba57daeb47487300933d076f9ebf..1976bc5efd2fcd5ef454ae6386e26d0fd4b2c799 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
@@ -490,6 +491,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,
@@ -505,6 +507,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,
@@ -520,7 +524,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