Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Unified Diff: components/ntp_snippets/content_suggestions_service.cc

Issue 2846233003: 📰 Record user actions on the NTP and Home sheet (Closed)
Patch Set: Address bauerb@'s comment Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/ntp_snippets/content_suggestions_service.cc
diff --git a/components/ntp_snippets/content_suggestions_service.cc b/components/ntp_snippets/content_suggestions_service.cc
index de7ab3ff14f8274a9122e4439543653ddabf87a2..50413da5f72adf5641cc98c87c078b40843a9ed1 100644
--- a/components/ntp_snippets/content_suggestions_service.cc
+++ b/components/ntp_snippets/content_suggestions_service.cc
@@ -20,6 +20,7 @@
#include "components/favicon/core/large_icon_service.h"
#include "components/favicon_base/fallback_icon_style.h"
#include "components/favicon_base/favicon_types.h"
+#include "components/ntp_snippets/content_suggestions_metrics.h"
#include "components/ntp_snippets/pref_names.h"
#include "components/ntp_snippets/remote/remote_suggestions_provider.h"
#include "components/prefs/pref_registry_simple.h"
@@ -324,6 +325,9 @@ void ContentSuggestionsService::DismissSuggestion(
<< " for unavailable category " << suggestion_id.category();
return;
}
+
+ metrics::RecordContentSuggestionDismissed();
+
providers_by_category_[suggestion_id.category()]->DismissSuggestion(
suggestion_id);
@@ -339,6 +343,8 @@ void ContentSuggestionsService::DismissCategory(Category category) {
return;
}
+ metrics::RecordCategoryDismissed();
+
ContentSuggestionsProvider* provider = providers_it->second;
UnregisterCategory(category, provider);
@@ -382,6 +388,8 @@ void ContentSuggestionsService::Fetch(
return;
}
+ metrics::RecordFetchAction();
+
providers_it->second->Fetch(category, known_suggestion_ids, callback);
}

Powered by Google App Engine
This is Rietveld 408576698