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

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

Issue 2429283003: Desktop NTP metrics: Use ntp_tiles::metrics:: functions (Closed)
Patch Set: review 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
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10 matching lines...) Expand all
21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp 21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.ntp
22 enum MostVisitedTileType { 22 enum MostVisitedTileType {
23 // The icon or thumbnail hasn't loaded yet. 23 // The icon or thumbnail hasn't loaded yet.
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 // The number of different tile types that get recorded. Entries below this
32 // are not recorded in UMA.
33 NUM_RECORDED_TILE_TYPES,
34 // The item displays a thumbnail of the page. Used on desktop.
35 THUMBNAIL,
32 }; 36 };
33 37
34 // TODO(treib): Split into individual impressions for desktop. 38 // Records an impression of an individual tile.
35 void RecordImpressions(const NTPTilesVector& tiles); 39 void RecordTileImpression(int index, NTPTileSource source);
36 40
41 // Records an impression of the page itself, after all tiles have loaded.
42 void RecordPageImpression(int number_of_tiles);
43
44 // Records the visual types (see above) of all visible tiles.
45 // TODO(treib): Merge this with RecordPageImpression.
37 void RecordImpressionTileTypes( 46 void RecordImpressionTileTypes(
38 const std::vector<MostVisitedTileType>& tile_types, 47 const std::vector<MostVisitedTileType>& tile_types,
39 const std::vector<NTPTileSource>& sources); 48 const std::vector<NTPTileSource>& sources);
40 49
41 // TODO(treib): Split into "base" click and tile type for desktop. 50 // Records a click on a tile.
42 void RecordClick(int index, 51 void RecordTileClick(int index,
43 MostVisitedTileType tile_type, 52 NTPTileSource source,
44 NTPTileSource source); 53 MostVisitedTileType tile_type);
45 54
46 } // namespace metrics 55 } // namespace metrics
47 } // namespace ntp_tiles 56 } // namespace ntp_tiles
48 57
49 #endif 58 #endif
OLDNEW
« 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