| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_INSTALLER_UTIL_EXPERIMENT_METRICS_H_ | 5 #ifndef CHROME_INSTALLER_UTIL_EXPERIMENT_METRICS_H_ |
| 6 #define CHROME_INSTALLER_UTIL_EXPERIMENT_METRICS_H_ | 6 #define CHROME_INSTALLER_UTIL_EXPERIMENT_METRICS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 namespace installer { | 10 namespace installer { |
| 11 | 11 |
| 12 // The various metrics reported for the status of the inactive user toast. This | 12 // The various metrics reported for the status of the inactive user toast. This |
| 13 // struct contains the information necessary to evaluate the efficacy of the | 13 // struct contains the information necessary to evaluate the efficacy of the |
| 14 // toast on Chrome usage. | 14 // toast on Chrome usage. |
| 15 struct ExperimentMetrics { | 15 struct ExperimentMetrics { |
| 16 public: | 16 public: |
| 17 // The state of this install's participation in the experiment. | 17 // The state of this install's participation in the experiment. |
| 18 enum State { | 18 enum State { |
| 19 kUninitialized = -1, | 19 kUninitialized = -1, |
| 20 | 20 |
| 21 // Relaunching setup.exe for a per-user install failed. Will retry on next | 21 // Relaunching setup.exe for a per-user install failed. Will retry on next |
| 22 // update. | 22 // update. |
| 23 kRelaunchFailed = 0, | 23 kRelaunchFailed = 0, |
| 24 | 24 |
| 25 // No user on console for per-machine install; waiting for invocation at | 25 // No user on console for per-machine install; waiting for invocation at |
| 26 // next logon via Active Setup. | 26 // next logon via Active Setup. |
| 27 kWaitingForUserLogon = 1, | 27 kWaitingForUserLogon = 1, |
| 28 | 28 |
| 29 // Waiting in user context for the setup singleton. | |
| 30 kWaitingForSingleton = 2, | |
| 31 | |
| 32 // Timed out waiting for the setup singleton. Will retry on next update. | 29 // Timed out waiting for the setup singleton. Will retry on next update. |
| 33 kSingletonWaitTimeout = 3, | 30 kSingletonWaitTimeout = 2, |
| 34 | 31 |
| 35 // A group has been assigned. The experiment has moved out of the initial | 32 // A group has been assigned. The experiment has moved out of the initial |
| 36 // state at this point. This state is reached under the setup singleton. | 33 // state at this point. This state is reached under the setup singleton. |
| 37 kGroupAssigned = 4, | 34 kGroupAssigned = 3, |
| 38 | 35 |
| 39 // The user is not participating on account of using a tablet-like device. | 36 // The user is not participating on account of using a tablet-like device. |
| 40 kIsTabletDevice = 5, | 37 kIsTabletDevice = 4, |
| 41 | 38 |
| 42 // Chrome has been run within the last 28 days. | 39 // Chrome has been run within the last 28 days. |
| 43 kIsActive = 6, | 40 kIsActive = 5, |
| 44 | 41 |
| 45 // The user has not been active on the machine much in the last 28 days. | 42 // The user has not been active on the machine much in the last 28 days. |
| 46 kIsDormant = 7, | 43 kIsDormant = 6, |
| 44 |
| 45 // Chrome has received an in-use update for which the rename is pending. |
| 46 // The UX cannot be shown. |
| 47 kIsUpdateRenamePending = 7, |
| 47 | 48 |
| 48 // Deferring presentation until it's okay to show the toast. | 49 // Deferring presentation until it's okay to show the toast. |
| 49 kDeferringPresentation = 8, | 50 kDeferringPresentation = 8, |
| 50 | 51 |
| 51 // Deferral was aborted on account of another process requiring the setup | 52 // Deferral was aborted on account of another process requiring the setup |
| 52 // singleton. | 53 // singleton. |
| 53 kDeferredPresentationAborted = 9, | 54 kDeferredPresentationAborted = 9, |
| 54 | 55 |
| 55 // Launching Chrome for presentation. | 56 // Launching Chrome for presentation. |
| 56 kLaunchingChrome = 10, | 57 kLaunchingChrome = 10, |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 int action_delay_bucket = 0; | 161 int action_delay_bucket = 0; |
| 161 | 162 |
| 162 // Time delta (in minutes) between user session start and presentation in the | 163 // Time delta (in minutes) between user session start and presentation in the |
| 163 // range [1-40320) in a 64-bucket log scale. | 164 // range [1-40320) in a 64-bucket log scale. |
| 164 int session_length_bucket = 0; | 165 int session_length_bucket = 0; |
| 165 }; | 166 }; |
| 166 | 167 |
| 167 } // namespace installer | 168 } // namespace installer |
| 168 | 169 |
| 169 #endif // CHROME_INSTALLER_UTIL_EXPERIMENT_METRICS_H_ | 170 #endif // CHROME_INSTALLER_UTIL_EXPERIMENT_METRICS_H_ |
| OLD | NEW |