| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ |
| 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | 6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ |
| 7 | 7 |
| 8 namespace base { | 8 namespace base { |
| 9 class TimeDelta; | 9 class TimeDelta; |
| 10 } | 10 } |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 // The ways in which the WebAPK infobar can be shown. | 40 // The ways in which the WebAPK infobar can be shown. |
| 41 enum InfoBarShown { | 41 enum InfoBarShown { |
| 42 WEBAPK_INFOBAR_SHOWN_FROM_BANNER, | 42 WEBAPK_INFOBAR_SHOWN_FROM_BANNER, |
| 43 WEBAPK_INFOBAR_SHOWN_FROM_MENU, | 43 WEBAPK_INFOBAR_SHOWN_FROM_MENU, |
| 44 WEBAPK_INFOBAR_SHOWN_MAX, | 44 WEBAPK_INFOBAR_SHOWN_MAX, |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 // User actions after a WebAPK is installed. | 47 // User actions after a WebAPK is installed. |
| 48 enum UserAction { | 48 enum UserAction { |
| 49 // TODO(hanxi|zpeng): Records the first two user actions after | |
| 50 // crbug.com/638614 is fixed. | |
| 51 // Launch a previously installed WebAPK since the WebAPK has been installed on | 49 // Launch a previously installed WebAPK since the WebAPK has been installed on |
| 52 // the device before. | 50 // the device before. |
| 53 USER_ACTION_OPEN, | 51 USER_ACTION_OPEN, // Obsolete |
| 54 USER_ACTION_OPEN_DISMISS, | 52 USER_ACTION_OPEN_DISMISS, // Obsolete |
| 55 // Open a newly installed WebAPK via a successful installation. | 53 // Open a newly installed WebAPK via a successful installation. |
| 56 USER_ACTION_INSTALLED_OPEN, | 54 USER_ACTION_INSTALLED_OPEN, |
| 57 USER_ACTION_INSTALLED_OPEN_DISMISS, | 55 USER_ACTION_INSTALLED_OPEN_DISMISS, |
| 58 USER_ACTION_MAX, | 56 USER_ACTION_MAX, |
| 59 }; | 57 }; |
| 60 | 58 |
| 61 void TrackInstallDuration(base::TimeDelta delta); | 59 void TrackInstallDuration(base::TimeDelta delta); |
| 62 void TrackInstallEvent(InstallEvent event); | 60 void TrackInstallEvent(InstallEvent event); |
| 63 void TrackInstallSource(InstallSource event); | 61 void TrackInstallSource(InstallSource event); |
| 64 void TrackInstallInfoBarShown(InfoBarShown event); | 62 void TrackInstallInfoBarShown(InfoBarShown event); |
| 65 void TrackUserAction(UserAction event); | 63 void TrackUserAction(UserAction event); |
| 66 | 64 |
| 67 // On web app and WebAPK installation records whether a WebAPK could be | 65 // On web app and WebAPK installation records whether a WebAPK could be |
| 68 // installed via the Google Play flow. If not, records why the WebAPK could not | 66 // installed via the Google Play flow. If not, records why the WebAPK could not |
| 69 // be installed via the Google Play flow (and a web app was added to the | 67 // be installed via the Google Play flow (and a web app was added to the |
| 70 // homescreen instead). | 68 // homescreen instead). |
| 71 // Warning: This metric is recorded whenever a site is added to the homescreeen | 69 // Warning: This metric is recorded whenever a site is added to the homescreeen |
| 72 // as a web app, not just for sites with a WebAPK compatible Web Manifest. | 70 // as a web app, not just for sites with a WebAPK compatible Web Manifest. |
| 73 void TrackGooglePlayInstallState(GooglePlayInstallState state); | 71 void TrackGooglePlayInstallState(GooglePlayInstallState state); |
| 74 | 72 |
| 75 }; // namespace webapk | 73 }; // namespace webapk |
| 76 | 74 |
| 77 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ | 75 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_ |
| OLD | NEW |