From 5b393c3e2549c8d3461fc6dac3f19538544eee31 Mon Sep 17 00:00:00 2001 From: Darnell Andries Date: Mon, 4 Nov 2024 17:11:56 -0800 Subject: [PATCH] Fix News channel count metric --- 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 e1a7fd039ee3..fd70dc80d277 100644 --- a/components/brave_news/browser/brave_news_p3a.cc +++ b/components/brave_news/browser/brave_news_p3a.cc @@ -335,8 +335,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,