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

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

Issue 17226003: Add metrics for interactions with the Apps Launcher promo dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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.cc
diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
index 88bff10639a3216ebdf90b828ba72f740a440b0c..e3c4e42472b2de8d799751fc395f7944379d66bf 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -6,6 +6,7 @@
#include <vector>
+#include "apps/metrics_names.h"
#include "apps/pref_names.h"
#include "base/auto_reset.h"
#include "base/bind.h"
@@ -212,6 +213,9 @@ void AppLauncherHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback("stopShowingAppLauncherPromo",
base::Bind(&AppLauncherHandler::StopShowingAppLauncherPromo,
base::Unretained(this)));
+ web_ui()->RegisterMessageCallback("onLearnMore",
+ base::Bind(&AppLauncherHandler::OnLearnMore,
+ base::Unretained(this)));
}
void AppLauncherHandler::Observe(int type,
@@ -694,6 +698,18 @@ void AppLauncherHandler::StopShowingAppLauncherPromo(
const base::ListValue* args) {
g_browser_process->local_state()->SetBoolean(
apps::prefs::kShowAppLauncherPromo, false);
+ UMA_HISTOGRAM_ENUMERATION(apps::kAppLauncherPromoHistogram,
+ apps::APP_LAUNCHER_PROMO_DISMISSED,
+ apps::APP_LAUNCHER_PROMO_MAX);
Ilya Sherman 2013/06/25 21:35:15 I'd strongly recommend creating a method like apps
MAD 2013/06/26 03:33:40 Done.
+
+}
+
+void AppLauncherHandler::OnLearnMore(
+ const base::ListValue* args) {
+ UMA_HISTOGRAM_ENUMERATION(apps::kAppLauncherPromoHistogram,
+ apps::APP_LAUNCHER_PROMO_LEARN_MORE,
+ apps::APP_LAUNCHER_PROMO_MAX);
+
}
void AppLauncherHandler::OnFaviconForApp(

Powered by Google App Engine
This is Rietveld 408576698