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

Unified Diff: chrome/browser/android/webapk/webapk_metrics.cc

Issue 2301263004: Add WebAPK installation metrics. (Closed)
Patch Set: pkotwicz@'s comments. Created 4 years, 3 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/android/webapk/webapk_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/webapk/webapk_metrics.cc
diff --git a/chrome/browser/android/webapk/webapk_metrics.cc b/chrome/browser/android/webapk/webapk_metrics.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5abd6a7b8c2b86e551aa41709b06b5b3334a7ca1
--- /dev/null
+++ b/chrome/browser/android/webapk/webapk_metrics.cc
@@ -0,0 +1,33 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/android/webapk/webapk_metrics.h"
+
+#include "base/metrics/histogram_macros.h"
+
+namespace webapk {
+
+const char kInstallEventHistogram[] = "WebApk.Install.InstallEvent";
+const char kInstallSourceHistogram[] = "WebApk.Install.InstallSource";
+const char kInfoBarShownHistogram[] = "WebApk.Install.InfoBarShown";
+const char kUserActionHistogram[] = "WebApk.Install.UserAction";
+
+void TrackInstallEvent(InstallEvent event) {
+ UMA_HISTOGRAM_ENUMERATION(kInstallEventHistogram, event, INSTALL_EVENT_MAX);
+}
+
+void TrackInstallSource(InstallSource event) {
+ UMA_HISTOGRAM_ENUMERATION(kInstallSourceHistogram, event, INSTALL_SOURCE_MAX);
+}
+
+void TrackInstallInfoBarShown(InfoBarShown event) {
+ UMA_HISTOGRAM_ENUMERATION(kInfoBarShownHistogram, event,
+ WEBAPK_INFOBAR_SHOWN_MAX);
+}
+
+void TrackUserAction(UserAction event) {
+ UMA_HISTOGRAM_ENUMERATION(kUserActionHistogram, event, USER_ACTION_MAX);
+}
+
+} // namespace webapk
« no previous file with comments | « chrome/browser/android/webapk/webapk_metrics.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698