| Index: chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h
|
| diff --git a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h
|
| index 05018d49716fd1518a13bf14ce6a3a6176319b92..3a2f8a92d6ab449277be9adf6c0a9afb412e1768 100644
|
| --- a/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h
|
| +++ b/chrome/browser/ui/views/payments/shipping_address_editor_view_controller.h
|
| @@ -27,11 +27,18 @@ class PaymentRequestDialogView;
|
| // Shipping Address editor screen of the Payment Request flow.
|
| class ShippingAddressEditorViewController : public EditorViewController {
|
| public:
|
| - // Does not take ownership of the arguments, which should outlive this object.
|
| - ShippingAddressEditorViewController(PaymentRequestSpec* spec,
|
| - PaymentRequestState* state,
|
| - PaymentRequestDialogView* dialog,
|
| - autofill::AutofillProfile* profile);
|
| + // Does not take ownership of the arguments (except for the |on_edited| and
|
| + // |on_added| callbacks), which should outlive this object. Additionally,
|
| + // |profile| could be nullptr if we are adding a new shipping address. Else,
|
| + // it's a valid pointer to a card that needs to be updated, and which will
|
| + // outlive this controller.
|
| + ShippingAddressEditorViewController(
|
| + PaymentRequestSpec* spec,
|
| + PaymentRequestState* state,
|
| + PaymentRequestDialogView* dialog,
|
| + base::OnceClosure on_edited,
|
| + base::OnceCallback<void(const autofill::AutofillProfile&)> on_added,
|
| + autofill::AutofillProfile* profile);
|
| ~ShippingAddressEditorViewController() override;
|
|
|
| // EditorViewController:
|
| @@ -75,6 +82,12 @@ class ShippingAddressEditorViewController : public EditorViewController {
|
| };
|
| friend class ShippingAddressValidationDelegate;
|
|
|
| + // Called when |profile_to_edit_| was successfully edited.
|
| + base::OnceClosure on_edited_;
|
| + // Called when a new profile was added. The const reference is short-lived,
|
| + // and the callee should make a copy.
|
| + base::OnceCallback<void(const autofill::AutofillProfile&)> on_added_;
|
| +
|
| // If non-nullptr, a point to an object to be edited, which should outlive
|
| // this controller.
|
| autofill::AutofillProfile* profile_to_edit_;
|
|
|