treib | b5f7233d | 2016-10-18 09:14:32 | [diff] [blame] | 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 |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef COMPONENTS_NTP_TILES_METRICS_H_ |
| 6 | #define COMPONENTS_NTP_TILES_METRICS_H_ |
| 7 | |
Mikel Astiz | bc131d8 | 2017-10-09 06:16:41 | [diff] [blame] | 8 | #include "components/ntp_tiles/ntp_tile_impression.h" |
mastiz | 9677e78 | 2016-12-12 09:55:48 | [diff] [blame] | 9 | |
treib | b5f7233d | 2016-10-18 09:14:32 | [diff] [blame] | 10 | namespace ntp_tiles { |
| 11 | namespace metrics { |
| 12 | |
treib | e3ca5da | 2016-11-24 17:26:55 | [diff] [blame] | 13 | // Records an NTP impression, after all tiles have loaded. |
Jan Krcal | 437702b | 2017-06-23 07:22:38 | [diff] [blame] | 14 | void RecordPageImpression(int number_of_tiles); |
| 15 | |
Mikel Astiz | bc131d8 | 2017-10-09 06:16:41 | [diff] [blame] | 16 | // Records an individual tile impression, which should be called only after the |
Justin DeWitt | 7aca2b1 | 2019-11-06 17:12:01 | [diff] [blame] | 17 | // visual type of the tile has been determined. |
| 18 | void RecordTileImpression(const NTPTileImpression& impression); |
treib | b5f7233d | 2016-10-18 09:14:32 | [diff] [blame] | 19 | |
treib | 6e3618a | 2016-10-25 14:07:28 | [diff] [blame] | 20 | // Records a click on a tile. |
Mikel Astiz | bc131d8 | 2017-10-09 06:16:41 | [diff] [blame] | 21 | void RecordTileClick(const NTPTileImpression& impression); |
treib | b5f7233d | 2016-10-18 09:14:32 | [diff] [blame] | 22 | |
| 23 | } // namespace metrics |
| 24 | } // namespace ntp_tiles |
| 25 | |
Mikel Astiz | bc131d8 | 2017-10-09 06:16:41 | [diff] [blame] | 26 | #endif // COMPONENTS_NTP_TILES_METRICS_H_ |