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_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 23 matching lines...) Expand all Loading... | |
34 // Returns the name of the histogram that should be logged for a navigation | 34 // Returns the name of the histogram that should be logged for a navigation |
35 // to a specified Most Visited |provider|. | 35 // to a specified Most Visited |provider|. |
36 static std::string GetMostVisitedNavigationHistogramNameForProvider( | 36 static std::string GetMostVisitedNavigationHistogramNameForProvider( |
37 const std::string& provider); | 37 const std::string& provider); |
38 | 38 |
39 // Logs a number of statistics regarding the NTP. Called when an NTP tab is | 39 // Logs a number of statistics regarding the NTP. Called when an NTP tab is |
40 // about to be deactivated (be it by switching tabs, losing focus or closing | 40 // about to be deactivated (be it by switching tabs, losing focus or closing |
41 // the tab/shutting down Chrome), or when the user navigates to a URL. | 41 // the tab/shutting down Chrome), or when the user navigates to a URL. |
42 void EmitNtpStatistics(); | 42 void EmitNtpStatistics(); |
43 | 43 |
44 // Called each time an event occurs on the NTP that requires a counter to be | 44 // Called when an event occurs on the NTP that requires a counter to be |
45 // incremented. | 45 // incremented. The time parameters contains the time when this event occured |
Dan Beam
2015/03/17 17:17:19
occurred
fserb
2015/03/17 17:41:31
Done.
| |
46 void LogEvent(NTPLoggingEventType event); | 46 // since navigation start. |
47 void LogEvent(NTPLoggingEventType event, uint64 time); | |
47 | 48 |
48 // Logs an impression on one of the Most Visited tiles by a given provider. | 49 // Logs an impression on one of the Most Visited tiles by a given provider. |
49 void LogMostVisitedImpression(int position, const base::string16& provider); | 50 void LogMostVisitedImpression(int position, const base::string16& provider); |
50 | 51 |
51 // Logs a navigation on one of the Most Visited tiles by a given provider. | 52 // Logs a navigation on one of the Most Visited tiles by a given provider. |
52 void LogMostVisitedNavigation(int position, const base::string16& provider); | 53 void LogMostVisitedNavigation(int position, const base::string16& provider); |
53 | 54 |
54 // content::WebContentsObserver override | 55 // content::WebContentsObserver override |
55 void NavigationEntryCommitted( | 56 void NavigationEntryCommitted( |
56 const content::LoadCommittedDetails& load_details) override; | 57 const content::LoadCommittedDetails& load_details) override; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 // Total number of mouseovers for this NTP session. | 97 // Total number of mouseovers for this NTP session. |
97 size_t number_of_mouseovers_; | 98 size_t number_of_mouseovers_; |
98 | 99 |
99 // The URL of this New Tab Page - varies based on NTP version. | 100 // The URL of this New Tab Page - varies based on NTP version. |
100 GURL ntp_url_; | 101 GURL ntp_url_; |
101 | 102 |
102 DISALLOW_COPY_AND_ASSIGN(NTPUserDataLogger); | 103 DISALLOW_COPY_AND_ASSIGN(NTPUserDataLogger); |
103 }; | 104 }; |
104 | 105 |
105 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ | 106 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ |
OLD | NEW |