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

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

Issue 2301263004: Add WebAPK installation metrics. (Closed)
Patch Set: Rebase. 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
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..2d592cfb8d1c8decb425fd7bbf897201672d8e69
--- /dev/null
+++ b/chrome/browser/android/webapk/webapk_metrics.cc
@@ -0,0 +1,27 @@
+// 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 kStartTypeHistogram[] = "WebApk.Install.StartType";
+const char kUserActionHistogram[] = "WebApk.Install.UserAction";
+
+void TrackInstallEvent(InstallEvent event) {
+ UMA_HISTOGRAM_ENUMERATION(kInstallEventHistogram, event, INSTALL_EVENT_MAX);
+}
+
+void TrackStartType(StartType event) {
+ UMA_HISTOGRAM_ENUMERATION(kStartTypeHistogram, event, START_TYPE_MAX);
+}
+
+void TrackUserAction(UserAction event) {
+ UMA_HISTOGRAM_ENUMERATION(kUserActionHistogram, event, USER_ACTION_MAX);
+}
+
+} // namespace webapk

Powered by Google App Engine
This is Rietveld 408576698