Commit 20db1c79 authored by Dmitry Titov's avatar Dmitry Titov Committed by Commit Bot

Fix histogram ExploreSites.ClickedNTPCategoryIndex bucket count.

Bug: 896481
Change-Id: I6e7d05e5673971d2b132e75dcaf1dfe7a858357a
Reviewed-on: https://chromium-review.googlesource.com/c/1287290Reviewed-by: default avatarJustin DeWitt <dewittj@chromium.org>
Commit-Queue: Dmitry Titov <dimich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600588}
parent 5a8004ef
...@@ -37,9 +37,10 @@ public class ExploreSitesSection { ...@@ -37,9 +37,10 @@ public class ExploreSitesSection {
private static final String TAG = "ExploreSitesSection"; private static final String TAG = "ExploreSitesSection";
private static final int MAX_CATEGORIES = 3; private static final int MAX_CATEGORIES = 3;
// This is a number of UMA histogram buckets that should be an upper bound // This is a number of UMA histogram buckets that should be an upper bound
// of MAX_CATEGORIES over time, plus 1 for "More" button. If MAX_CATEGORIES // of MAX_CATEGORIES over time, plus 1 for "More" button, and plus 1 for
// changes, this value should be updated only upwards. // overflow bucket. If MAX_CATEGORIES changes, this value should be updated
private static final int MAX_CATEGORIES_HISTOGRAM_BUCKETS = 4; // only upwards.
private static final int MAX_CATEGORIES_HISTOGRAM_BUCKETS = 5;
@TileStyle @TileStyle
private int mStyle; private int mStyle;
...@@ -194,7 +195,7 @@ public class ExploreSitesSection { ...@@ -194,7 +195,7 @@ public class ExploreSitesSection {
private void onClicked(int tileIndex, ExploreSitesCategory category, View v) { private void onClicked(int tileIndex, ExploreSitesCategory category, View v) {
RecordHistogram.recordLinearCountHistogram("ExploreSites.ClickedNTPCategoryIndex", RecordHistogram.recordLinearCountHistogram("ExploreSites.ClickedNTPCategoryIndex",
tileIndex, 0, MAX_CATEGORIES_HISTOGRAM_BUCKETS, MAX_CATEGORIES_HISTOGRAM_BUCKETS); tileIndex, 0, MAX_CATEGORIES, MAX_CATEGORIES_HISTOGRAM_BUCKETS);
mNavigationDelegate.openUrl(WindowOpenDisposition.CURRENT_TAB, mNavigationDelegate.openUrl(WindowOpenDisposition.CURRENT_TAB,
new LoadUrlParams(category.getUrl(), PageTransition.AUTO_BOOKMARK)); new LoadUrlParams(category.getUrl(), PageTransition.AUTO_BOOKMARK));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment