[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.
This commit is contained in:
Terry Mancey
2026-05-27 14:31:01 -05:00
committed by GitHub
parent 22bb9b9634
commit 8e31ee7e86
@@ -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 =