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

Side by Side Diff: components/ntp_tiles/metrics.h

Issue 2429283003: Desktop NTP metrics: Use ntp_tiles::metrics:: functions (Closed)
Patch Set: . Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_NTP_TILES_METRICS_H_ 5 #ifndef COMPONENTS_NTP_TILES_METRICS_H_
6 #define COMPONENTS_NTP_TILES_METRICS_H_ 6 #define COMPONENTS_NTP_TILES_METRICS_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/ntp_tiles/ntp_tile.h" 10 #include "components/ntp_tiles/ntp_tile.h"
(...skipping 13 matching lines...) Expand all
24 NONE, 24 NONE,
25 // The item displays a site's actual favicon or touch icon. 25 // The item displays a site's actual favicon or touch icon.
26 ICON_REAL, 26 ICON_REAL,
27 // The item displays a color derived from the site's favicon or touch icon. 27 // The item displays a color derived from the site's favicon or touch icon.
28 ICON_COLOR, 28 ICON_COLOR,
29 // The item displays a default gray box in place of an icon. 29 // The item displays a default gray box in place of an icon.
30 ICON_DEFAULT, 30 ICON_DEFAULT,
31 NUM_TILE_TYPES, 31 NUM_TILE_TYPES,
32 }; 32 };
33 33
34 // TODO(treib): Split into individual impressions for desktop. 34 // Records an impression of an individual tile.
35 void RecordImpressions(const NTPTilesVector& tiles); 35 void RecordTileImpression(int index, NTPTileSource source);
36 36
37 // Records an impression of the page itself, after all tiles have loaded.
38 void RecordPageImpression(int number_of_tiles);
39
40 // Records the visual types (see above) of all visible tiles.
37 void RecordImpressionTileTypes( 41 void RecordImpressionTileTypes(
38 const std::vector<MostVisitedTileType>& tile_types, 42 const std::vector<MostVisitedTileType>& tile_types,
39 const std::vector<NTPTileSource>& sources); 43 const std::vector<NTPTileSource>& sources);
40 44
41 // TODO(treib): Split into "base" click and tile type for desktop. 45 // Records a click on a tile.
42 void RecordClick(int index, 46 void RecordTileClick(int index, NTPTileSource source);
43 MostVisitedTileType tile_type, 47
44 NTPTileSource source); 48 // Records a click on a tile, and also the type of the tile that was clicked.
49 void RecordTileClickWithTileType(int index,
50 NTPTileSource source,
51 MostVisitedTileType tile_type);
sfiera 2016/10/25 12:12:11 Rather than splitting out a separate function for
Marc Treib 2016/10/25 12:23:39 Hm. We could add it to the enum, but actually reco
sfiera 2016/10/25 12:42:45 I think I'd go for it. Personally, I think touch i
Marc Treib 2016/10/25 13:26:51 Fun fact: A desktop icon NTP is actually mostly im
45 52
46 } // namespace metrics 53 } // namespace metrics
47 } // namespace ntp_tiles 54 } // namespace ntp_tiles
48 55
49 #endif 56 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698