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

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: 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
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1a2b32edb9537e21bcf7e3e77b54e2291ba6be46 100644
--- a/chrome/browser/ui/webui/app_launcher_page_ui.cc
+++ b/chrome/browser/ui/webui/app_launcher_page_ui.cc
@@ -4,7 +4,9 @@
#include "chrome/browser/ui/webui/app_launcher_page_ui.h"
+#include "apps/app_launcher.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 +111,16 @@ void AppLauncherPageUI::HTMLSource::StartDataRequest(
scoped_refptr<base::RefCountedMemory> html_bytes(
resource->GetNewTabHTML(is_incognito));
+ if (!is_incognito) {
+ if (apps::IsAppLauncherEnabled()) {
+ AppLauncherHandler::RecordAppLauncherPromoHistogram(
+ apps::APP_LAUNCHER_PROMO_ALREADY_INSTALLED);
+ } else if (apps::ShouldShowAppLauncherPromo()){
+ AppLauncherHandler::RecordAppLauncherPromoHistogram(
+ apps::APP_LAUNCHER_PROMO_SHOWN);
+ }
+ }
+
callback.Run(html_bytes.get());
}
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.js ('k') | chrome/browser/ui/webui/ntp/app_launcher_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698