| Index: components/ntp_tiles/metrics.h
|
| diff --git a/components/ntp_tiles/metrics.h b/components/ntp_tiles/metrics.h
|
| index c32dbf258df3a21c54958841bd61274cf2120c98..009c4942b8be62d4b58e6d3aff742e6ad66a26f2 100644
|
| --- a/components/ntp_tiles/metrics.h
|
| +++ b/components/ntp_tiles/metrics.h
|
| @@ -9,6 +9,11 @@
|
| #include <vector>
|
|
|
| #include "components/ntp_tiles/ntp_tile.h"
|
| +#include "url/gurl.h"
|
| +
|
| +namespace rappor {
|
| +class RapporService;
|
| +} // namespace rappor
|
|
|
| namespace ntp_tiles {
|
| namespace metrics {
|
| @@ -39,10 +44,22 @@ enum MostVisitedTileType {
|
| UNKNOWN_TILE_TYPE,
|
| };
|
|
|
| +struct TileImpression {
|
| + TileImpression(NTPTileSource source,
|
| + MostVisitedTileType type,
|
| + const GURL& url)
|
| + : source(source), type(type), url(url) {}
|
| +
|
| + NTPTileSource source;
|
| + MostVisitedTileType type;
|
| + GURL url;
|
| +};
|
| +
|
| // Records an NTP impression, after all tiles have loaded.
|
| -// Includes the visual types (see above) of all visible tiles.
|
| -void RecordPageImpression(
|
| - const std::vector<std::pair<NTPTileSource, MostVisitedTileType>>& tiles);
|
| +// Includes the visual types (see above) of all visible tiles. If
|
| +// |rappor_service| is null, no rappor metrics will be reported.
|
| +void RecordPageImpression(const std::vector<TileImpression>& tiles,
|
| + rappor::RapporService* rappor_service);
|
|
|
| // Records a click on a tile.
|
| void RecordTileClick(int index,
|
|
|