| Index: chrome/browser/ui/views/payments/profile_list_view_controller.cc
|
| diff --git a/chrome/browser/ui/views/payments/profile_list_view_controller.cc b/chrome/browser/ui/views/payments/profile_list_view_controller.cc
|
| index 419b51e4fc07ec05fb7e9b87d7a7c7c1bd70c037..5fe018fd43039567cf72089fbb3f42e5b1da5b50 100644
|
| --- a/chrome/browser/ui/views/payments/profile_list_view_controller.cc
|
| +++ b/chrome/browser/ui/views/payments/profile_list_view_controller.cc
|
| @@ -81,7 +81,7 @@ class ProfileItem : public PaymentRequestItemList::Item {
|
| }
|
|
|
| void PerformSelectionFallback() override {
|
| - dialog_->ShowShippingAddressEditor(profile_);
|
| + parent_view_->ShowEditor(profile_);
|
| }
|
|
|
| ProfileListViewController* parent_view_;
|
| @@ -115,6 +115,10 @@ class ShippingProfileViewController : public ProfileListViewController {
|
| state()->SetSelectedShippingProfile(profile);
|
| }
|
|
|
| + void ShowEditor(autofill::AutofillProfile* profile) override {
|
| + dialog()->ShowShippingAddressEditor(profile);
|
| + }
|
| +
|
| autofill::AutofillProfile* GetSelectedProfile() override {
|
| return state()->selected_shipping_profile();
|
| }
|
| @@ -144,10 +148,6 @@ class ShippingProfileViewController : public ProfileListViewController {
|
| return static_cast<int>(DialogViewID::PAYMENT_METHOD_ADD_SHIPPING_BUTTON);
|
| }
|
|
|
| - void OnSecondaryButtonPressed() override {
|
| - dialog()->ShowShippingAddressEditor();
|
| - }
|
| -
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ShippingProfileViewController);
|
| };
|
| @@ -175,6 +175,10 @@ class ContactProfileViewController : public ProfileListViewController {
|
| state()->SetSelectedContactProfile(profile);
|
| }
|
|
|
| + void ShowEditor(autofill::AutofillProfile* profile) override {
|
| + dialog()->ShowContactInfoEditor(profile);
|
| + }
|
| +
|
| autofill::AutofillProfile* GetSelectedProfile() override {
|
| return state()->selected_contact_profile();
|
| }
|
| @@ -205,10 +209,6 @@ class ContactProfileViewController : public ProfileListViewController {
|
| return static_cast<int>(DialogViewID::PAYMENT_METHOD_ADD_CONTACT_BUTTON);
|
| }
|
|
|
| - void OnSecondaryButtonPressed() override {
|
| - // TODO(crbug.com/704263): Add Contact Editor.
|
| - }
|
| -
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ContactProfileViewController);
|
| };
|
| @@ -279,7 +279,7 @@ ProfileListViewController::CreateExtraFooterView() {
|
| void ProfileListViewController::ButtonPressed(views::Button* sender,
|
| const ui::Event& event) {
|
| if (sender->tag() == GetSecondaryButtonTag())
|
| - OnSecondaryButtonPressed();
|
| + ShowEditor(nullptr);
|
| else
|
| PaymentRequestSheetController::ButtonPressed(sender, event);
|
| }
|
|
|