168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved.
268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// found in the LICENSE file.
468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#ifndef CHROME_BROWSER_BOOKMARKS_BOOKMARK_STATS_H_
668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#define CHROME_BROWSER_BOOKMARKS_BOOKMARK_STATS_H_
768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
80f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)class BookmarkNode;
90f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)
1068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// This enum is used for the Bookmarks.EntryPoint histogram.
1168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)enum BookmarkEntryPoint {
1268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_ENTRY_POINT_ACCELERATOR,
1368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_ENTRY_POINT_STAR_GESTURE,
1468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_ENTRY_POINT_STAR_KEY,
1568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_ENTRY_POINT_STAR_MOUSE,
1668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
1768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_ENTRY_POINT_LIMIT // Keep this last.
1868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)};
1968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
2068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// This enum is used for the Bookmarks.LaunchLocation histogram.
2168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)enum BookmarkLaunchLocation {
2268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_NONE,
2368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_ATTACHED_BAR = 0,
2468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_DETACHED_BAR,
2568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // These two are kind of sub-categories of the bookmark bar. Generally
2668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // a launch from a context menu or subfolder could be classified in one of
2768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // the other two bar buckets, but doing so is difficult because the menus
2868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // don't know of their greater place in Chrome.
2968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_BAR_SUBFOLDER,
3068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_CONTEXT_MENU,
3168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
3268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // Bookmarks menu within wrench menu.
3368043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_WRENCH_MENU,
3468043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // Bookmark manager.
3568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_MANAGER,
3668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  // Autocomplete suggestion.
3768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_OMNIBOX,
3868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
3968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)  BOOKMARK_LAUNCH_LOCATION_LIMIT  // Keep this last.
4068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)};
4168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
4268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Records the launch of a bookmark for UMA purposes.
430f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)void RecordBookmarkLaunch(const BookmarkNode* node,
440f1bc08d4cfcc34181b0b5cbf065c40f687bf740Torne (Richard Coles)                          BookmarkLaunchLocation location);
4568043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
4668043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Records the user opening a folder of bookmarks for UMA purposes.
4768043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)void RecordBookmarkFolderOpen(BookmarkLaunchLocation location);
4868043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
4968043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)// Records the user opening the apps page for UMA purposes.
5068043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)void RecordBookmarkAppsPageOpen(BookmarkLaunchLocation location);
5168043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)
5268043e1e95eeb07d5cae7aca370b26518b0867d6Torne (Richard Coles)#endif  // CHROME_BROWSER_BOOKMARKS_BOOKMARK_STATS_H_
53