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

Unified Diff: chrome/browser/ui/app_list/app_list_service.h

Issue 143683004: Add UMA to track app launcher discoverability. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix official build Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/app_list_service.h
diff --git a/chrome/browser/ui/app_list/app_list_service.h b/chrome/browser/ui/app_list/app_list_service.h
index 7205ad8f4aa5b7b01cfca6a49cf435281b530650..18fada2fd369503ae18820c6a45805794ecb21b8 100644
--- a/chrome/browser/ui/app_list/app_list_service.h
+++ b/chrome/browser/ui/app_list/app_list_service.h
@@ -27,6 +27,20 @@ class ImageSkia;
class AppListService {
public:
+ // Source that triggers the app launcher being enabled. This is used for UMA
+ // to track discoverability of the app lancher shortcut after install.
+ enum AppListEnableSource {
+ ENABLE_NOT_RECORDED, // Indicates app launcher not recently enabled.
+ ENABLE_FOR_APP_INSTALL, // Triggered by a webstore packaged app install.
+ ENABLE_VIA_WEBSTORE_LINK, // Triggered by webstore explicitly via API.
+ ENABLE_VIA_COMMAND_LINE, // Triggered by --enable-app-list.
+ ENABLE_ON_REINSTALL, // Triggered by Chrome reinstall finding pref.
+ ENABLE_SHOWN_UNDISCOVERED, // This overrides a prior ENABLE_FOR_APP_INSTALL
+ // when the launcher is auto-shown without
+ // being "discovered" beforehand.
+ ENABLE_NUM_ENABLE_SOURCES
+ };
+
// Get the AppListService for the current platform and specified
// |desktop_type|.
static AppListService* Get(chrome::HostDesktopType desktop_type);
@@ -62,6 +76,12 @@ class AppListService {
// profile to local prefs as the default app list profile.
virtual void ShowForProfile(Profile* requested_profile) = 0;
+ // Show the app list due to a trigger which was not an explicit user action
+ // to show the app list. E.g. the auto-show when installing an app. This
+ // permits UMA to distinguish between a user discovering the app list shortcut
+ // themselves versus having it shown for them automatically.
+ virtual void AutoShowForProfile(Profile* requested_profile) = 0;
+
// Dismiss the app list.
virtual void DismissAppList() = 0;
@@ -73,7 +93,8 @@ class AppListService {
// Enable the app list. What this does specifically will depend on the host
// operating system and shell.
- virtual void EnableAppList(Profile* initial_profile) = 0;
+ virtual void EnableAppList(Profile* initial_profile,
+ AppListEnableSource enable_source) = 0;
// Get the window the app list is in, or NULL if the app list isn't visible.
virtual gfx::NativeWindow GetAppListWindow() = 0;
« no previous file with comments | « chrome/browser/extensions/api/webstore_private/webstore_private_api.cc ('k') | chrome/browser/ui/app_list/app_list_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698