OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_ | 5 #ifndef CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_ |
6 #define CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_ | 6 #define CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_ |
7 | 7 |
8 // The different types of events that are logged from the NTP. This enum is used | 8 // The different types of events that are logged from the NTP. This enum is used |
9 // to transfer information from the NTP javascript to the renderer and is not | 9 // to transfer information from the NTP javascript to the renderer and is not |
10 // used as a UMA enum histogram's logged value. | 10 // used as a UMA enum histogram's logged value. |
11 // Note: Keep in sync with browser/resources/local_ntp/most_visited_util.js | 11 // Note: Keep in sync with browser/resources/local_ntp/most_visited_single.js |
12 // and browser/resources/local_ntp/most_visited_single.js | |
13 enum NTPLoggingEventType { | 12 enum NTPLoggingEventType { |
14 // The suggestion is coming from the server. | 13 // A suggestion coming from the server was rendered. |
15 NTP_SERVER_SIDE_SUGGESTION = 0, | 14 NTP_SERVER_SIDE_SUGGESTION = 0, |
16 | 15 |
17 // The suggestion is coming from the client. | 16 // A suggestion coming from the client was rendered. |
18 NTP_CLIENT_SIDE_SUGGESTION = 1, | 17 NTP_CLIENT_SIDE_SUGGESTION = 1, |
19 | 18 |
20 // Indicates a tile was rendered, no matter if it's a thumbnail, a gray tile | 19 // Indicates a tile was rendered, no matter if it's a thumbnail, a gray tile |
21 // or an external tile. | 20 // or an external tile. |
22 NTP_TILE = 2, | 21 // Deleted: NTP_TILE = 2, |
23 | 22 |
24 // The tile uses a local thumbnail image. | 23 // The tile uses a local thumbnail image. |
25 // Deleted: NTP_THUMBNAIL_TILE = 3, | 24 // Deleted: NTP_THUMBNAIL_TILE = 3, |
26 | 25 |
27 // Used when no thumbnail is specified and a gray tile with the domain is used | 26 // Used when no thumbnail is specified and a gray tile with the domain is used |
28 // as the main tile. | 27 // as the main tile. |
29 // Deleted: NTP_GRAY_TILE = 4, | 28 // Deleted: NTP_GRAY_TILE = 4, |
30 | 29 |
31 // The visuals of that tile are handled externally by the page itself. | 30 // The visuals of that tile are handled externally by the page itself. |
32 // Deleted: NTP_EXTERNAL_TILE = 5, | 31 // Deleted: NTP_EXTERNAL_TILE = 5, |
33 | 32 |
34 // There was an error in loading both the thumbnail image and the fallback | 33 // There was an error in loading both the thumbnail image and the fallback |
35 // (if it was provided), resulting in a grey tile. | 34 // (if it was provided), resulting in a grey tile. |
36 // Deleted: NTP_THUMBNAIL_ERROR = 6, | 35 // Deleted: NTP_THUMBNAIL_ERROR = 6, |
37 | 36 |
38 // Used a gray tile with the domain as the fallback for a failed thumbnail. | 37 // Used a gray tile with the domain as the fallback for a failed thumbnail. |
39 // Deleted: NTP_GRAY_TILE_FALLBACK = 7, | 38 // Deleted: NTP_GRAY_TILE_FALLBACK = 7, |
40 | 39 |
41 // The visuals of that tile's fallback are handled externally. | 40 // The visuals of that tile's fallback are handled externally. |
42 // Deleted: NTP_EXTERNAL_TILE_FALLBACK = 8, | 41 // Deleted: NTP_EXTERNAL_TILE_FALLBACK = 8, |
43 | 42 |
44 // Deleted: NTP_MOUSEOVER = 9 | 43 // Deleted: NTP_MOUSEOVER = 9 |
45 | 44 |
46 // A NTP Tile has finished loading (successfully or failing). Logged only by | 45 // A NTP Tile has finished loading (successfully or failing). Logged only by |
47 // the multi-iframe version of the NTP. | 46 // the multi-iframe version of the NTP. |
48 NTP_TILE_LOADED = 10, | 47 // Deleted: NTP_TILE_LOADED = 10, |
49 | 48 |
50 // All NTP tiles have finished loading (successfully or failing). Logged only | 49 // All NTP tiles have finished loading (successfully or failing). Logged only |
51 // by the single-iframe version of the NTP. | 50 // by the single-iframe version of the NTP. |
52 NTP_ALL_TILES_LOADED = 11, | 51 NTP_ALL_TILES_LOADED = 11, |
53 | 52 |
54 NTP_EVENT_TYPE_LAST = NTP_ALL_TILES_LOADED | 53 NTP_EVENT_TYPE_LAST = NTP_ALL_TILES_LOADED |
55 }; | 54 }; |
56 | 55 |
57 // The source of an NTP tile. | 56 // The source of an NTP tile. |
58 // Note: Keep in sync with browser/resources/local_ntp/most_visited_util.js and | 57 // Note: Keep in sync with browser/resources/local_ntp/most_visited_single.js. |
59 // browser/resources/local_ntp/most_visited_single.js. | |
60 // TODO(treib): Merge this into MostVisitedSource from components/ntp_tiles. | 58 // TODO(treib): Merge this into MostVisitedSource from components/ntp_tiles. |
61 enum class NTPLoggingTileSource { | 59 enum class NTPLoggingTileSource { |
62 CLIENT = 0, | 60 CLIENT = 0, |
63 SERVER = 1, | 61 SERVER = 1, |
64 LAST = SERVER | 62 LAST = SERVER |
65 }; | 63 }; |
66 | 64 |
67 #endif // CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_ | 65 #endif // CHROME_COMMON_SEARCH_NTP_LOGGING_EVENTS_H_ |
OLD | NEW |