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

Unified Diff: components/ntp_tiles/metrics.h

Issue 2429283003: Desktop NTP metrics: Use ntp_tiles::metrics:: functions (Closed)
Patch Set: review Created 4 years, 2 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 | « chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc ('k') | components/ntp_tiles/metrics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/metrics.h
diff --git a/components/ntp_tiles/metrics.h b/components/ntp_tiles/metrics.h
index e38dcc8de25a9eaa592b673b72df1058d7bc4936..a7b5c0b98a511d1feff150cd316a15dfb86737f4 100644
--- a/components/ntp_tiles/metrics.h
+++ b/components/ntp_tiles/metrics.h
@@ -28,20 +28,29 @@ enum MostVisitedTileType {
ICON_COLOR,
// The item displays a default gray box in place of an icon.
ICON_DEFAULT,
- NUM_TILE_TYPES,
+ // The number of different tile types that get recorded. Entries below this
+ // are not recorded in UMA.
+ NUM_RECORDED_TILE_TYPES,
+ // The item displays a thumbnail of the page. Used on desktop.
+ THUMBNAIL,
};
-// TODO(treib): Split into individual impressions for desktop.
-void RecordImpressions(const NTPTilesVector& tiles);
+// Records an impression of an individual tile.
+void RecordTileImpression(int index, NTPTileSource source);
+// Records an impression of the page itself, after all tiles have loaded.
+void RecordPageImpression(int number_of_tiles);
+
+// Records the visual types (see above) of all visible tiles.
+// TODO(treib): Merge this with RecordPageImpression.
void RecordImpressionTileTypes(
const std::vector<MostVisitedTileType>& tile_types,
const std::vector<NTPTileSource>& sources);
-// TODO(treib): Split into "base" click and tile type for desktop.
-void RecordClick(int index,
- MostVisitedTileType tile_type,
- NTPTileSource source);
+// Records a click on a tile.
+void RecordTileClick(int index,
+ NTPTileSource source,
+ MostVisitedTileType tile_type);
} // namespace metrics
} // namespace ntp_tiles
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc ('k') | components/ntp_tiles/metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698