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

Unified Diff: ios/chrome/browser/ui/payments/address_edit_coordinator.mm

Issue 2929673003: [Payment Request] Invalidates cached autofill profile after it is updated. (Closed)
Patch Set: Addressed comment Created 3 years, 6 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: ios/chrome/browser/ui/payments/address_edit_coordinator.mm
diff --git a/ios/chrome/browser/ui/payments/address_edit_coordinator.mm b/ios/chrome/browser/ui/payments/address_edit_coordinator.mm
index 8e06e948225d90e4ef754d278425ffb98bf5c7d2..9ac39762d4b0aa3c179bbd4406fe9d9a3723258e 100644
--- a/ios/chrome/browser/ui/payments/address_edit_coordinator.mm
+++ b/ios/chrome/browser/ui/payments/address_edit_coordinator.mm
@@ -10,6 +10,7 @@
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/common/autofill_constants.h"
+#include "components/payments/core/payments_profile_comparator.h"
#include "components/strings/grit/components_strings.h"
#include "ios/chrome/browser/payments/payment_request.h"
#import "ios/chrome/browser/ui/autofill/autofill_ui_type_util.h"
@@ -129,6 +130,9 @@ using ::AutofillTypeFromAutofillUIType;
address.set_origin(autofill::kSettingsOrigin);
self.paymentRequest->GetPersonalDataManager()->UpdateProfile(address);
+ // Cached profile must be invalidated once the profile is modified.
+ _paymentRequest->profile_comparator()->Invalidate(address);
+
// Update the original profile instance that is being edited.
*self.address = address;
}

Powered by Google App Engine
This is Rietveld 408576698