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

Side by Side Diff: chrome/browser/ui/webui/ntp/ntp_user_data_logger.h

Issue 2117373002: Cleanup: Change LogMostVisitedImpression|Navigation APIs to take an enum (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ntp_uma_cleanup
Patch Set: rebase Created 4 years, 5 months 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
OLDNEW
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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 23 matching lines...) Expand all
34 // Logs a number of statistics regarding the NTP. Called when an NTP tab is 34 // Logs a number of statistics regarding the NTP. Called when an NTP tab is
35 // about to be deactivated (be it by switching tabs, losing focus or closing 35 // about to be deactivated (be it by switching tabs, losing focus or closing
36 // the tab/shutting down Chrome), or when the user navigates to a URL. 36 // the tab/shutting down Chrome), or when the user navigates to a URL.
37 void EmitNtpStatistics(); 37 void EmitNtpStatistics();
38 38
39 // Called when an event occurs on the NTP that requires a counter to be 39 // Called when an event occurs on the NTP that requires a counter to be
40 // incremented. |time| is the delta time in ms from navigation start until 40 // incremented. |time| is the delta time in ms from navigation start until
41 // this event happened. 41 // this event happened.
42 void LogEvent(NTPLoggingEventType event, base::TimeDelta time); 42 void LogEvent(NTPLoggingEventType event, base::TimeDelta time);
43 43
44 // Logs an impression on one of the Most Visited tiles by a given provider. 44 // Logs an impression on one of the NTP tiles by a given source.
45 void LogMostVisitedImpression(int position, const base::string16& provider); 45 void LogMostVisitedImpression(int position, NTPLoggingTileSource tile_source);
46 46
47 // Logs a navigation on one of the Most Visited tiles by a given provider. 47 // Logs a navigation on one of the NTP tiles by a given source.
48 void LogMostVisitedNavigation(int position, const base::string16& provider); 48 void LogMostVisitedNavigation(int position, NTPLoggingTileSource tile_source);
49 49
50 // content::WebContentsObserver override 50 // content::WebContentsObserver override
51 void NavigationEntryCommitted( 51 void NavigationEntryCommitted(
52 const content::LoadCommittedDetails& load_details) override; 52 const content::LoadCommittedDetails& load_details) override;
53 53
54 protected: 54 protected:
55 explicit NTPUserDataLogger(content::WebContents* contents); 55 explicit NTPUserDataLogger(content::WebContents* contents);
56 56
57 private: 57 private:
58 friend class content::WebContentsUserData<NTPUserDataLogger>; 58 friend class content::WebContentsUserData<NTPUserDataLogger>;
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Are stats being logged during Chrome startup? 108 // Are stats being logged during Chrome startup?
109 bool during_startup_; 109 bool during_startup_;
110 110
111 // The URL of this New Tab Page - varies based on NTP version. 111 // The URL of this New Tab Page - varies based on NTP version.
112 GURL ntp_url_; 112 GURL ntp_url_;
113 113
114 DISALLOW_COPY_AND_ASSIGN(NTPUserDataLogger); 114 DISALLOW_COPY_AND_ASSIGN(NTPUserDataLogger);
115 }; 115 };
116 116
117 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_ 117 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NTP_USER_DATA_LOGGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper_unittest.cc ('k') | chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698