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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_STATS_H_ 6 #define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STATS_H_ 7 8 class BookmarkNode; 9 10 // This enum is used for the Bookmarks.EntryPoint histogram. 11 enum BookmarkEntryPoint { 12 BOOKMARK_ENTRY_POINT_ACCELERATOR, 13 BOOKMARK_ENTRY_POINT_STAR_GESTURE, 14 BOOKMARK_ENTRY_POINT_STAR_KEY, 15 BOOKMARK_ENTRY_POINT_STAR_MOUSE, 16 17 BOOKMARK_ENTRY_POINT_LIMIT // Keep this last. 18 }; 19 20 // This enum is used for the Bookmarks.LaunchLocation histogram. 21 enum BookmarkLaunchLocation { 22 BOOKMARK_LAUNCH_LOCATION_NONE, 23 BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR = 0, 24 BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR, 25 // These two are kind of sub-categories of the bookmark bar. Generally 26 // a launch from a context menu or subfolder could be classified in one of 27 // the other two bar buckets, but doing so is difficult because the menus 28 // don't know of their greater place in Chrome. 29 BOOKMARK_LAUNCH_LOCATION_BAR_SUBFOLDER, 30 BOOKMARK_LAUNCH_LOCATION_CONTEXT_MENU, 31 32 // Bookmarks menu within wrench menu. 33 BOOKMARK_LAUNCH_LOCATION_WRENCH_MENU, 34 // Bookmark manager. 35 BOOKMARK_LAUNCH_LOCATION_MANAGER, 36 // Autocomplete suggestion. 37 BOOKMARK_LAUNCH_LOCATION_OMNIBOX, 38 39 BOOKMARK_LAUNCH_LOCATION_LIMIT // Keep this last. 40 }; 41 42 // Records the launch of a bookmark for UMA purposes. 43 void RecordBookmarkLaunch(const BookmarkNode* node, 44 BookmarkLaunchLocation location); 45 46 // Records the user opening a folder of bookmarks for UMA purposes. 47 void RecordBookmarkFolderOpen(BookmarkLaunchLocation location); 48 49 // Records the user opening the apps page for UMA purposes. 50 void RecordBookmarkAppsPageOpen(BookmarkLaunchLocation location); 51 52 #endif // CHROME_BROWSER_BOOKMARKS_BOOKMARK_STATS_H_ 53