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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.h

Issue 17226003: Add metrics for interactions with the Apps Launcher promo dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed gyp file. :-/ Created 7 years, 6 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/webui/ntp/app_launcher_handler.h
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.h b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
index 986d055b0cc7f35068c6fb3ca19ccd69bcd64755..7a5dc0f7ebd36c287606a32086a960e6e2f5dad3 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.h
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.h
@@ -8,6 +8,7 @@
#include <set>
#include <string>
+#include "apps/metrics_names.h"
#include "base/memory/scoped_ptr.h"
#include "base/prefs/pref_change_registrar.h"
#include "chrome/browser/extensions/extension_uninstall_dialog.h"
@@ -68,31 +69,41 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// Populate the given dictionary with the web store promo content.
void FillPromoDictionary(base::DictionaryValue* value);
- // Callback for the "getApps" message.
+ // Handles the "launchApp" message with unused |args|.
void HandleGetApps(const base::ListValue* args);
- // Callback for the "launchApp" message.
+ // Handles the "launchApp" message with |args| containing [extension_id,
+ // source] with optional [url, disposition], |disposition| defaulting to
+ // CURRENT_TAB.
void HandleLaunchApp(const base::ListValue* args);
- // Callback for the "setLaunchType" message.
+ // Handles the "setLaunchType" message with args containing [extension_id,
+ // launch_type].
void HandleSetLaunchType(const base::ListValue* args);
- // Callback for the "uninstallApp" message.
+ // Handles the "uninstallApp" message with |args| containing [extension_id]
+ // and an optional bool to not confirm the uninstall when true, defaults to
+ // false.
void HandleUninstallApp(const base::ListValue* args);
- // Callback for the "createAppShortcut" message.
+ // Handles the "createAppShortcut" message with |args| containing
+ // [extension_id].
void HandleCreateAppShortcut(const base::ListValue* args);
- // Callback for the "reorderApps" message.
+ // Handles the "reorderApps" message with |args| containing [dragged_app_id,
+ // app_order].
void HandleReorderApps(const base::ListValue* args);
- // Callback for the "setPageIndex" message.
+ // Handles the "setPageIndex" message with |args| containing [extension_id,
+ // page_index].
void HandleSetPageIndex(const base::ListValue* args);
- // Callback for the "saveAppPageName" message.
+ // Handles "saveAppPageName" message with |args| containing [name,
+ // page_index].
void HandleSaveAppPageName(const base::ListValue* args);
- // Callback for the "generateAppForLink" message.
+ // Handles "generateAppForLink" message with |args| containing [url, title,
+ // page_index].
void HandleGenerateAppForLink(const base::ListValue* args);
// Callback for the "recordAppLaunchByURL" message. Takes an escaped URL and a
@@ -100,14 +111,9 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// action for UMA.
void HandleRecordAppLaunchByUrl(const base::ListValue* args);
- // Callback for "stopShowingAppLauncherPromo" message.
+ // Other registered message callbacks with unused |args|.
void StopShowingAppLauncherPromo(const base::ListValue* args);
-
- // Callback for "closeNotification" message.
- void HandleNotificationClose(const base::ListValue* args);
-
- // Callback for "setNotificationsDisabled" message.
- void HandleSetNotificationsDisabled(const base::ListValue* args);
+ void OnLearnMore(const base::ListValue* args);
// Register app launcher preferences.
static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -122,6 +128,10 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// Records an app launch from the main view of the app list.
static void RecordAppListMainLaunch(const extensions::Extension* extension);
+ // Records the given |value| in the apps::kAppLauncherPromoHistogram.
+ static void RecordAppLauncherPromoHistogram(
+ apps::AppLauncherPromoHistogramValues value);
+
private:
struct AppInstallInfo {
AppInstallInfo();
« no previous file with comments | « chrome/browser/ui/webui/app_launcher_page_ui.cc ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698