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 c6345f2642f5bb0831781c1219f84686062edc1e..348a555694e6b0e289d46e5ad2fef5c719b6725c 100644 |
--- a/components/ntp_snippets/content_suggestions_metrics.cc |
+++ b/components/ntp_snippets/content_suggestions_metrics.cc |
@@ -25,6 +25,8 @@ const int kMaxCategories = 10; |
const char kHistogramCountOnNtpOpened[] = |
"NewTabPage.ContentSuggestions.CountOnNtpOpened"; |
+const char kHistogramSectionCountOnNtpOpened[] = |
+ "NewTabPage.ContentSuggestions.SectionCountOnNtpOpened"; |
const char kHistogramShown[] = "NewTabPage.ContentSuggestions.Shown"; |
const char kHistogramShownAge[] = "NewTabPage.ContentSuggestions.ShownAge"; |
const char kHistogramShownScore[] = |
@@ -212,7 +214,8 @@ void RecordContentSuggestionsUsage() { |
} // namespace |
void OnPageShown( |
- const std::vector<std::pair<Category, int>>& suggestions_per_category) { |
+ const std::vector<std::pair<Category, int>>& suggestions_per_category, |
+ int visible_categories_count) { |
int suggestions_total = 0; |
for (const std::pair<Category, int>& item : suggestions_per_category) { |
LogCategoryHistogramPosition(kHistogramCountOnNtpOpened, item.first, |
@@ -221,6 +224,8 @@ void OnPageShown( |
} |
UMA_HISTOGRAM_EXACT_LINEAR(kHistogramCountOnNtpOpened, suggestions_total, |
kMaxSuggestionsTotal); |
+ UMA_HISTOGRAM_EXACT_LINEAR(kHistogramSectionCountOnNtpOpened, |
+ visible_categories_count, kMaxCategories); |
} |
void OnSuggestionShown(int global_position, |