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

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: Code review comments addressed. 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..ffa9c40805a8f9c4956c8ba965997fbd4c11572f 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,47 +69,26 @@ 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.
- void HandleGetApps(const base::ListValue* args);
+ // Callback for the "recordAppLaunchByURL" message. Takes an escaped URL and a
+ // launch source (integer), and if the URL represents an app, records the
+ // action for UMA.
+ void HandleRecordAppLaunchByUrl(const base::ListValue* args);
- // Callback for the "launchApp" message.
+ // Other registered message callbacks.
+ void StopShowingAppLauncherPromo(const base::ListValue* args);
+ void OnLearnMore(const base::ListValue* args);
+ void HandleNotificationClose(const base::ListValue* args);
+ void HandleSetNotificationsDisabled(const base::ListValue* args);
+ void HandleGetApps(const base::ListValue* args);
void HandleLaunchApp(const base::ListValue* args);
-
- // Callback for the "setLaunchType" message.
void HandleSetLaunchType(const base::ListValue* args);
-
- // Callback for the "uninstallApp" message.
void HandleUninstallApp(const base::ListValue* args);
-
- // Callback for the "createAppShortcut" message.
void HandleCreateAppShortcut(const base::ListValue* args);
-
- // Callback for the "reorderApps" message.
void HandleReorderApps(const base::ListValue* args);
-
- // Callback for the "setPageIndex" message.
void HandleSetPageIndex(const base::ListValue* args);
-
- // Callback for the "saveAppPageName" message.
void HandleSaveAppPageName(const base::ListValue* args);
-
- // Callback for the "generateAppForLink" message.
void HandleGenerateAppForLink(const base::ListValue* args);
Dan Beam 2013/06/27 00:59:31 nit: in theory these should mention which args wil
MAD 2013/06/27 21:43:35 Done.
- // Callback for the "recordAppLaunchByURL" message. Takes an escaped URL and a
- // launch source (integer), and if the URL represents an app, records the
- // action for UMA.
- void HandleRecordAppLaunchByUrl(const base::ListValue* args);
-
- // Callback for "stopShowingAppLauncherPromo" message.
- 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);
-
// Register app launcher preferences.
static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry);
@@ -122,6 +102,9 @@ class AppLauncherHandler : public content::WebUIMessageHandler,
// Records an app launch from the main view of the app list.
static void RecordAppListMainLaunch(const extensions::Extension* extension);
+ static void RecordAppLauncherPromoHistogram(
+ apps::AppLauncherPromoHistogramValues histogram);
Ilya Sherman 2013/06/26 22:19:49 nit: Docs?
Ilya Sherman 2013/06/26 22:19:49 nit: "histogram" is a misleading variable name her
MAD 2013/06/27 21:43:35 Done.
MAD 2013/06/27 21:43:35 Done.
+
private:
struct AppInstallInfo {
AppInstallInfo();

Powered by Google App Engine
This is Rietveld 408576698