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

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

Issue 2301263004: Add WebAPK installation metrics. (Closed)
Patch Set: domnickn@'s comments. 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 #ifndef CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_
6 #define CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_
7
8 namespace webapk {
9
10 // The states of WebAPK installation process. These states are tracked to
11 // record dismiss events for WebAPK installation.
12 enum InstallState {
13 WAIT_FOR_START,
14 INSTALLING,
15 INSTALLED,
16 };
17
18 // Keep these enums up to date with tools/metrics/histograms/histograms.xml.
19 // Events for WebAPKs installation flow. The sum of |InstalllEvent| histogram
20 // is the total number of times that a WebAPK infobar was triggered.
21 enum InstallEvent {
dominickn 2016/09/19 01:38:39 I think if you get rid of the INSTALL_EVENT prefix
Xi Han 2016/09/20 18:25:18 Done.
22 // Banner is deleted due to the closing of Chrome or the associated tab.
dominickn 2016/09/19 01:38:39 Nit: change comment to "The user did not interact
Xi Han 2016/09/20 18:25:18 Acknowledged.
23 INSTALL_EVENT_BANNER_IGNORED,
24 // The banner with the "Add-to-Homescreen" button is dismissed before the
25 // installation started. "Dismiss" means the user closes the banner by
26 // clicking the "X" button.
27 INSTALL_EVENT_ADD_TO_HOME_SCREEN_DISMISS,
dominickn 2016/09/19 01:38:39 Call this BANNER_DISMISSED_BEFORE_INSTALLATION.
Xi Han 2016/09/20 18:25:19 Done.
28 // The banner with the "Adding" button is dismissed during installation.
29 INSTALL_EVENT_ADDING_DISMISS,
dominickn 2016/09/19 01:38:39 Call this DISMISSED_DURING_INSTALLATION
Xi Han 2016/09/20 18:25:19 Done.
30 INSTALL_EVENT_COMPLETED,
31 INSTALL_EVENT_FAILED,
32 INSTALL_EVENT_MAX,
33 };
34
35 // The ways of how WebAPK instllation is triggered / started.
dominickn 2016/09/19 01:38:39 Nit: "The ways in which WebAPK installation can be
Xi Han 2016/09/20 18:25:19 Done.
36 enum StartType {
37 TRIGGERED_FROM_BANNER,
dominickn 2016/09/19 01:38:39 TRIGGERED and STARTED are pretty difficult to tell
Xi Han 2016/09/20 18:25:19 Hmm, how about introduce a "InstallTriggeredType"
38 STARTED_FROM_BANNER,
39 STARTED_FROM_ADD_TO_HOME_SCREEN_MENU,
40 START_TYPE_MAX,
41 };
42
43 // User actions after a WebAPK is installed.
44 enum UserAction {
45 USER_ACTION_INSTALLED_OPEN,
46 USER_ACTION_INSTALLED_OPEN_DISMISS,
47 USER_ACTION_MAX,
48 };
49
50 void TrackInstallEvent(InstallEvent event);
51 void TrackStartType(StartType event);
52 void TrackUserAction(UserAction event);
53
54 }; // namespace webapk
55
56 #endif // CHROME_BROWSER_ANDROID_WEBAPK_WEBAPK_METRICS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698