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( |