From 39a6d385c65f66a56b242a7a62c5ce3d034dae25 Mon Sep 17 00:00:00 2001 From: Claudio DeSouza Date: Thu, 19 Dec 2024 00:28:43 +0100 Subject: [PATCH] [cr133] `GetOfferForUrl` returning a `const T*` As `BraveIsOfferValid` was taking a multable pointer, the change to a const pointer caused a build breakage. Chromium change: https://chromium.googlesource.com/chromium/src/+/4ee9d87d53be7f3423cc433f769f09f9b33c62af commit 4ee9d87d53be7f3423cc433f769f09f9b33c62af Author: Jan Keitel Date: Tue Dec 17 01:19:36 2024 -0800 Let PayDM::GetAutofillOffers return vector of const pointers. As a drive-by, only pass PayDM to the AutofillOfferManager. It does not need the full PersonalDataManager. Bug: 40100455 --- .../core/browser/payments/offer_notification_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromium_src/components/autofill/core/browser/payments/offer_notification_handler.cc b/chromium_src/components/autofill/core/browser/payments/offer_notification_handler.cc index d25901178856..71479cedbeea 100644 --- a/chromium_src/components/autofill/core/browser/payments/offer_notification_handler.cc +++ b/chromium_src/components/autofill/core/browser/payments/offer_notification_handler.cc @@ -14,7 +14,7 @@ namespace { // This replicates the functionality that the removed upstream flag // kAutofillEnableOfferNotificationForPromoCodes used to have. -bool BraveIsOfferValid(AutofillOfferData* offer) { +bool BraveIsOfferValid(const AutofillOfferData* offer) { if (!offer) { return false; }