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

Unified Diff: chrome/browser/ui/webui/app_launcher_page_ui.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/app_launcher_page_ui.cc
diff --git a/chrome/browser/ui/webui/app_launcher_page_ui.cc b/chrome/browser/ui/webui/app_launcher_page_ui.cc
index f8cc98e006e172b248ead8b6d1f9c426302f3da2..65c8a489ae1ec2312bfa372345bb55e8841e85cd 100644
--- a/chrome/browser/ui/webui/app_launcher_page_ui.cc
+++ b/chrome/browser/ui/webui/app_launcher_page_ui.cc
@@ -4,7 +4,10 @@
#include "chrome/browser/ui/webui/app_launcher_page_ui.h"
+#include "apps/app_launcher.h"
+#include "apps/metrics_names.h"
#include "base/memory/ref_counted_memory.h"
+#include "base/metrics/histogram.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
#include "chrome/browser/ui/webui/ntp/app_resource_cache_factory.h"
@@ -109,6 +112,19 @@ void AppLauncherPageUI::HTMLSource::StartDataRequest(
scoped_refptr<base::RefCountedMemory> html_bytes(
resource->GetNewTabHTML(is_incognito));
+ if (!is_incognito && apps::ShouldShowAppLauncherPromo()) {
+ if (apps::IsAppLauncherEnabled()) {
+ UMA_HISTOGRAM_ENUMERATION(apps::kAppLauncherPromoHistogram,
+ apps::APP_LAUNCHER_PROMO_ALREADY_INSTALLED,
+ apps::APP_LAUNCHER_PROMO_MAX);
+ } else {
+ UMA_HISTOGRAM_ENUMERATION(apps::kAppLauncherPromoHistogram,
+ apps::APP_LAUNCHER_PROMO_SHOWN,
+ apps::APP_LAUNCHER_PROMO_MAX);
+ }
+ }
+
miket_OOO 2013/06/25 15:57:25 Extra whitespace not needed.
MAD 2013/06/26 03:33:40 Done.
+
callback.Run(html_bytes.get());
}

Powered by Google App Engine
This is Rietveld 408576698