From 8e31ee7e86beff1be5be87c1d3b975521bfb6255 Mon Sep 17 00:00:00 2001 From: Terry Mancey Date: Wed, 27 May 2026 14:31:01 -0500 Subject: [PATCH] [ads][CodeHealth] Remove stale kMaximumNotificationAdsPerHour pref migration (#36768) The migration that cleared kMaximumNotificationAdsPerHour and opted the user out of notification ads when the value was zero was added in 08/2023. The migration has been in place long enough that all affected users have upgraded, so remove it. --- components/brave_ads/browser/ads_service_impl.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/components/brave_ads/browser/ads_service_impl.cc b/components/brave_ads/browser/ads_service_impl.cc index 26f6d8376b8..d1538cfca62 100644 --- a/components/brave_ads/browser/ads_service_impl.cc +++ b/components/brave_ads/browser/ads_service_impl.cc @@ -220,14 +220,6 @@ void AdsServiceImpl::RegisterResourceComponents() { } void AdsServiceImpl::Migrate() { - // Added 08/2023. - const int64_t ads_per_hour = - prefs_->GetInt64(prefs::kMaximumNotificationAdsPerHour); - if (ads_per_hour == 0) { - prefs_->ClearPref(prefs::kMaximumNotificationAdsPerHour); - prefs_->SetBoolean(prefs::kOptedInToNotificationAds, false); - } - // Added 10/2025. if (!local_state_->HasPrefPath(prefs::kFirstRunAt)) { base::Time first_run_at =