summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/new_tab_ui.h
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-29 23:43:30 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-29 23:43:30 +0000
commit6749c68237fcc188dac3520527d5d5210f6147fc (patch)
treed97e0a9d38d68a969bbfe45a55d7b56c8745737b /chrome/browser/dom_ui/new_tab_ui.h
parent7f856bee73ffdccdbbbbbab4cb79185290d38359 (diff)
downloadchromium_src-6749c68237fcc188dac3520527d5d5210f6147fc.zip
chromium_src-6749c68237fcc188dac3520527d5d5210f6147fc.tar.gz
chromium_src-6749c68237fcc188dac3520527d5d5210f6147fc.tar.bz2
Add more UMA collection to the New Tab Page
BUG=1450986 Review URL: http://codereview.chromium.org/8686 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4192 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/new_tab_ui.h')
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index 9c18a60..aab91f2 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -268,6 +268,24 @@ class HistoryHandler : public DOMMessageHandler {
DISALLOW_EVIL_CONSTRUCTORS(HistoryHandler);
};
+// Let the page contents record UMA actions. Only use when you can't do it from
+// C++. For example, we currently use it to let the NTP log the postion of the
+// Most Visited or Bookmark the user clicked on, as we don't get that
+// information through RequestOpenURL. You will need to update the metrics
+// dashboard with the action names you use, as our processor won't catch that
+// information (treat it as RecordComputedMetrics)
+class MetricsHandler : public DOMMessageHandler {
+ public:
+ explicit MetricsHandler(DOMUIHost* dom_ui_host);
+
+ // Callback which records a user action.
+ void HandleMetrics(const Value* content);
+
+ private:
+ DOMUIHost* dom_ui_host_;
+ DISALLOW_EVIL_CONSTRUCTORS(MetricsHandler);
+};
+
// The TabContents used for the New Tab page.
class NewTabUIContents : public DOMUIHost {
public: