OLD | NEW |
---|---|
(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 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | |
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | |
7 | |
8 #include "base/macros.h" | |
9 | |
10 namespace webapk { | |
11 | |
12 // This enum backs a UMA histogram, so it should be treated as append-only. | |
13 enum InstallEvent { | |
14 INSTALL_EVENT_MIN = 0, | |
15 INSTALL_EVENT_ADD_FROM_BANNER_STARTED = 1, | |
16 INSTALL_EVENT_ADD_FROM_MENU_STARTED = 2, | |
17 INSTALL_EVENT_COMPLETED = 3, | |
18 INSTALL_EVENT_FAILED = 4, | |
19 INSTALL_EVENT_MAX = 5, | |
20 }; | |
21 | |
22 // This enum backs a UMA histogram, so it should be treated as append-only. | |
23 enum DismissEvent { | |
24 DISMISS_EVENT_MIN = 10, | |
dominickn
2016/09/05 07:34:31
Start these enums from 0. The app banner ones don'
Xi Han
2016/09/07 20:58:52
I see, thanks, updated. Also, since I changed to U
| |
25 DISMISS_EVENT_ADD_TO_HOMESCREEN = 11, | |
26 DISMISS_EVENT_ADDING = 12, | |
27 DISMISS_EVENT_OPEN = 13, | |
28 DISMISS_EVENT_MAX = 14, | |
29 }; | |
30 | |
31 // This enum backs a UMA histogram, so it should be treated as append-only. | |
32 enum UserAction { | |
33 USER_ACTION_MIN = 20, | |
34 USER_ACTION_ADD_FROM_MENU = 21, | |
35 USER_ACTION_ADD_FROM_BANNER_ACCEPTED = 22, | |
36 USER_ACTION_INSTALLED_OPEN = 23, | |
37 // Banner is deleted due to the fact that user closes the associated tab | |
38 // or Chrome. The cases that user closes the banner (clicks | |
39 // the "X" button) are recorded in the |DissmissEvent|. | |
40 USER_ACTION_BANNER_IGNORED = 24, | |
41 USER_ACTION_MAX = 25, | |
42 }; | |
43 | |
44 extern const char kDismissEventHistogram[]; | |
45 extern const char kInstallEventHistogram[]; | |
46 extern const char kUserActionHistogram[]; | |
47 | |
48 void TrackDismissEvent(int event); | |
49 void TrackInstallEvent(int event); | |
50 void TrackUserAction(int event); | |
51 | |
52 }; // namespace webapk | |
53 | |
54 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | |
OLD | NEW |