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

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

Issue 2841643002: When a new Payments address is created from the editor, use it as the chosen address (Closed)
Patch Set: And yet another small goof fix... :-( Created 3 years, 8 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/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 5fe018fd43039567cf72089fbb3f42e5b1da5b50..4ff1043c45bdb0e6bf5fdfcbf0e32de94fead136 100644
--- a/chrome/browser/ui/views/payments/profile_list_view_controller.cc
+++ b/chrome/browser/ui/views/payments/profile_list_view_controller.cc
@@ -116,7 +116,14 @@ class ShippingProfileViewController : public ProfileListViewController {
}
void ShowEditor(autofill::AutofillProfile* profile) override {
- dialog()->ShowShippingAddressEditor(profile);
+ dialog()->ShowShippingAddressEditor(
+ /*on_edited=*/base::BindOnce(
+ &PaymentRequestState::SetSelectedShippingProfile,
+ base::Unretained(state()), profile),
+ /*on_added=*/
+ base::BindOnce(&PaymentRequestState::AddAutofillShippingProfile,
+ base::Unretained(state()), /*selected=*/true),
+ profile);
}
autofill::AutofillProfile* GetSelectedProfile() override {

Powered by Google App Engine
This is Rietveld 408576698