From aaaf123272e0db375228bb50a5233aef486c66aa Mon Sep 17 00:00:00 2001 From: brave-builds Date: Tue, 5 Nov 2024 19:05:59 +0000 Subject: [PATCH] Uplift of #26367 (squashed) to beta --- components/brave_news/browser/brave_news_p3a.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/brave_news/browser/brave_news_p3a.cc b/components/brave_news/browser/brave_news_p3a.cc index c23daa3e0a48..91e45ffd45b3 100644 --- a/components/brave_news/browser/brave_news_p3a.cc +++ b/components/brave_news/browser/brave_news_p3a.cc @@ -341,8 +341,8 @@ void NewsMetrics::OnPublishersChanged() { void NewsMetrics::OnChannelsChanged() { DVLOG(1) << __FUNCTION__; base::flat_set distinct_channels; - for (const auto& [locale, channels] : - pref_manager_->GetSubscriptions().channels()) { + auto channels_map = pref_manager_->GetSubscriptions().channels(); + for (const auto& [locale, channels] : channels_map) { distinct_channels.insert(channels.begin(), channels.end()); } RecordTotalSubscribedCount(SubscribeType::kChannels,