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

Side by Side Diff: chrome/browser/android/webapk/webapk_metrics.cc

Issue 2301263004: Add WebAPK installation metrics. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/android/webapk/webapk_metrics.h"
6
7 #include "base/metrics/histogram_macros.h"
dominickn 2016/09/05 07:34:31 If you're only using SPARSE_SLOWLY, then I think y
Xi Han 2016/09/07 20:58:52 I change to use UMA_HISTOGRAM_ENUMERATION.
8 #include "base/metrics/sparse_histogram.h"
9
10 namespace webapk {
11
12 const char kDismissEventHistogram[] = "WebApk.Install.DismissEvent";
13 const char kInstallEventHistogram[] = "WebApk.Install.InstallEvent";
14 const char kUserActionHistogram[] = "WebApk.Install.UserAction";
15
16 void TrackDismissEvent(int event) {
dominickn 2016/09/05 07:34:31 You could make these take the enum argument direct
Xi Han 2016/09/07 20:58:52 Done.
17 DCHECK_LT(DISMISS_EVENT_MIN, event);
18 DCHECK_LT(event, DISMISS_EVENT_MAX);
19 UMA_HISTOGRAM_SPARSE_SLOWLY(kDismissEventHistogram, event);
20 }
21
22 void TrackInstallEvent(int event) {
23 DCHECK_LT(INSTALL_EVENT_MIN, event);
24 DCHECK_LT(event, INSTALL_EVENT_MAX);
25 UMA_HISTOGRAM_SPARSE_SLOWLY(kInstallEventHistogram, event);
26 }
27
28 void TrackUserAction(int event) {
29 DCHECK_LT(USER_ACTION_MIN, event);
30 DCHECK_LT(event, USER_ACTION_MAX);
31 UMA_HISTOGRAM_SPARSE_SLOWLY(kUserActionHistogram, event);
32 }
33
34 } // namespace webapk
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698