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 namespace webapk { | |
9 | |
10 // Keep these enums up to date with tools/metrics/histograms/histograms.xml. | |
11 // Events for WebAPKs installation flow. The sum of |InstalllEvent| histogram | |
12 // is the total number of times that a WebAPK infobar was triggered. | |
13 enum InstallEvent { | |
14 // The user did not interact with the banner. | |
15 BANNER_IGNORED, | |
16 // The banner with the "Add-to-Homescreen" button is dismissed before the | |
17 // installation started. "Dismiss" means the user closes the banner by | |
18 // clicking the "X" button. | |
19 BANNER_DISMISSED_BEFORE_INSTALLATION, | |
20 // The banner with the "Adding" button is dismissed during installation. | |
21 BANNER_DISMISSED_DURING_INSTALLATION, | |
22 INSTALL_COMPLETED, | |
23 INSTALL_FAILED, | |
24 INSTALL_EVENT_MAX, | |
25 }; | |
26 | |
27 // The ways in which WebAPK instllation can be started. | |
dominickn
2016/09/21 06:54:27
Nit: "installation"
Xi Han
2016/09/21 14:22:08
Sorry for the typo.
| |
28 enum InstallStartType { | |
29 STARTED_FROM_BANNER, | |
30 STARTED_FROM_ADD_TO_HOME_SCREEN_MENU, | |
dominickn
2016/09/21 06:54:28
General nit: change ADD_TO_HOME_SCREEN_MENU to jus
Xi Han
2016/09/21 14:22:08
Done.
| |
31 START_TYPE_MAX, | |
32 }; | |
33 | |
34 // The ways in which WebApk installation can be triggered. | |
dominickn
2016/09/21 06:54:28
Splitting these histograms is the right move, but
Xi Han
2016/09/21 14:22:08
That is correct.
| |
35 enum InstallTriggeredType { | |
36 TRIGGERED_FROM_BANNER, | |
37 TRIGGERED_FROM_ADD_TO_HOME_SCREEN_MENU, | |
38 TRIGGERED_TYPE_MAX, | |
39 }; | |
40 | |
41 // User actions after a WebAPK is installed. | |
42 enum UserAction { | |
43 // TODO(hanxi|zpeng): Records the first two user actions after | |
44 // crbug.com/638614 is fixed. | |
45 // Launch a previously installed WebAPK since the WebAPK has been installed on | |
46 // the device before. | |
47 USER_ACTION_OPEN, | |
48 USER_ACTION_OPEN_DISMISS, | |
49 // Open a newly installed WebAPK via a successful installation. | |
50 USER_ACTION_INSTALLED_OPEN, | |
51 USER_ACTION_INSTALLED_OPEN_DISMISS, | |
52 USER_ACTION_MAX, | |
53 }; | |
54 | |
55 void TrackInstallEvent(InstallEvent event); | |
56 void TrackInstallStartType(InstallStartType event); | |
57 void TrackInstallTriggeredType(InstallTriggeredType event); | |
58 void TrackUserAction(UserAction event); | |
59 | |
60 }; // namespace webapk | |
61 | |
62 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | |
OLD | NEW |