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

Unified Diff: components/ntp_tiles/most_visited_sites.cc

Issue 2131133003: Add NewTabPage.TileType and .TileTypeClicked on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_race_condition
Patch Set: rebase Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/most_visited_sites.cc
diff --git a/components/ntp_tiles/most_visited_sites.cc b/components/ntp_tiles/most_visited_sites.cc
index 55c2edc6b9609baf7ec030ef0ee5bacd1e5a6279..dcc1daee3c5cb50f9155865725b5ec5d53ca0503 100644
--- a/components/ntp_tiles/most_visited_sites.cc
+++ b/components/ntp_tiles/most_visited_sites.cc
@@ -233,6 +233,9 @@ void MostVisitedSites::RecordTileTypeMetrics(
for (size_t i = 0; i < tile_types.size(); ++i) {
int tile_type = tile_types[i];
++counts_per_type[tile_type];
+
+ UMA_HISTOGRAM_ENUMERATION("NewTabPage.TileType", tile_type, NUM_TILE_TYPES);
+
std::string histogram = base::StringPrintf(
"NewTabPage.TileType.%s",
GetSourceHistogramName(sources[i]).c_str());
@@ -256,6 +259,9 @@ void MostVisitedSites::RecordOpenedMostVisitedItem(int index,
"NewTabPage.MostVisited.%s", GetSourceHistogramName(source).c_str());
LogHistogramEvent(histogram, index, num_sites_);
+ UMA_HISTOGRAM_ENUMERATION(
+ "NewTabPage.TileTypeClicked", tile_type, NUM_TILE_TYPES);
+
histogram = base::StringPrintf("NewTabPage.TileTypeClicked.%s",
GetSourceHistogramName(source).c_str());
LogHistogramEvent(histogram, tile_type, NUM_TILE_TYPES);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698