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

Unified Diff: components/ntp_snippets/content_suggestions_metrics.cc

Issue 2279123002: [Sync] Initial implementation of foreign sessions suggestions provider. (Closed)
Patch Set: Adding sessions deps to BUILD.gn Created 4 years, 3 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_metrics.cc
diff --git a/components/ntp_snippets/content_suggestions_metrics.cc b/components/ntp_snippets/content_suggestions_metrics.cc
index 5d4fbe169ad5a462da482bcc432b02bbbaa3b785..dfe86a9e658720dbc4998e082945e81378aefcc6 100644
--- a/components/ntp_snippets/content_suggestions_metrics.cc
+++ b/components/ntp_snippets/content_suggestions_metrics.cc
@@ -43,6 +43,8 @@ const char kHistogramMoreButtonClicked[] =
const char kPerCategoryHistogramFormat[] = "%s.%s";
+// Each suffix here should correspond to an entry under histogram suffix
+// ContentSuggestionCategory in histograms.xml.
std::string GetCategorySuffix(Category category) {
// TODO(treib): Find a way to produce a compile error if a known category
// isn't listed here.
@@ -52,6 +54,8 @@ std::string GetCategorySuffix(Category category) {
return "Downloads";
if (category.IsKnownCategory(KnownCategories::BOOKMARKS))
return "Bookmarks";
+ if (category.IsKnownCategory(KnownCategories::FOREIGN_TABS))
+ return "ForeignTabs";
if (category.IsKnownCategory(KnownCategories::ARTICLES))
return "Articles";
// All other categories go into a single "Experimental" bucket.

Powered by Google App Engine
This is Rietveld 408576698