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

Unified Diff: ios/chrome/browser/metrics/new_tab_page_uma.h

Issue 2585233003: Upstream Chrome on iOS source code [2/11]. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/metrics/new_tab_page_uma.h
diff --git a/ios/chrome/browser/metrics/new_tab_page_uma.h b/ios/chrome/browser/metrics/new_tab_page_uma.h
new file mode 100644
index 0000000000000000000000000000000000000000..be25dd358029ad214f6d69db2ccb6cffc24566f5
--- /dev/null
+++ b/ios/chrome/browser/metrics/new_tab_page_uma.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef IOS_CHROME_BROWSER_METRICS_NEW_TAB_PAGE_UMA_H_
+#define IOS_CHROME_BROWSER_METRICS_NEW_TAB_PAGE_UMA_H_
+
+#include "ui/base/page_transition_types.h"
+
+namespace ios {
+class ChromeBrowserState;
+} // namespace ios
+
+class GURL;
+
+// This namespace provides various helpers around handling NTP Uma calls.
+namespace new_tab_page_uma {
+
+enum ActionType {
+ ACTION_SEARCHED_USING_OMNIBOX,
+ ACTION_NAVIGATED_TO_GOOGLE_HOMEPAGE,
+ ACTION_NAVIGATED_USING_OMNIBOX,
+ ACTION_OPENED_MOST_VISITED_ENTRY,
+ ACTION_OPENED_RECENTLY_CLOSED_ENTRY,
+ ACTION_OPENED_BOOKMARK,
+ ACTION_OPENED_FOREIGN_SESSION,
+ NUM_ACTION_TYPES,
+};
+
+void RecordAction(ios::ChromeBrowserState* browserState, ActionType action);
+void RecordActionFromOmnibox(ios::ChromeBrowserState* browserState,
+ const GURL& url,
+ ui::PageTransition transition);
+} // namespace new_tab_page_uma
+
+#endif // IOS_CHROME_BROWSER_METRICS_NEW_TAB_PAGE_UMA_H_
« no previous file with comments | « ios/chrome/browser/metrics/first_user_action_recorder_unittest.cc ('k') | ios/chrome/browser/metrics/new_tab_page_uma.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698