[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 1 | // Copyright 2014 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 | #include "components/metrics/metrics_pref_names.h" |
| 6 | |
| 7 | namespace metrics { |
| 8 | namespace prefs { |
| 9 | |
[email protected] | 6580145 | 2014-07-09 05:42:41 | [diff] [blame] | 10 | // Set once, to the current epoch time, on the first run of chrome on this |
| 11 | // machine. Attached to metrics reports forever thereafter. |
| 12 | const char kInstallDate[] = "uninstall_metrics.installation_date2"; |
| 13 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 14 | // The metrics client GUID. |
| 15 | // Note: The name client_id2 is a result of creating |
| 16 | // new prefs to do a one-time reset of the previous values. |
| 17 | const char kMetricsClientID[] = "user_experience_metrics.client_id2"; |
| 18 | |
gayane | 06e66ef3 | 2016-06-06 20:39:14 | [diff] [blame] | 19 | // An enum value indicating the default value of the enable metrics reporting |
| 20 | // checkbox shown during first-run. If it's opt-in, then the checkbox defaulted |
| 21 | // to unchecked, if it's opt-out, then it defaulted to checked. This value is |
| 22 | // only recorded during first-run, so older clients will not set it. The enum |
| 23 | // used for the value is metrics::MetricsServiceClient::EnableMetricsDefault. |
| 24 | const char kMetricsDefaultOptIn[] = "user_experience_metrics.default_opt_in"; |
| 25 | |
gayane | 8b523b87 | 2016-09-30 21:43:59 | [diff] [blame] | 26 | // Array of dictionaries that are each UMA logs that were supposed to be sent in |
| 27 | // the first minute of a browser session. These logs include things like crash |
| 28 | // count info, etc. |
| 29 | const char kMetricsInitialLogs[] = "user_experience_metrics.initial_logs2"; |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 30 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 31 | // The metrics entropy source. |
| 32 | // Note: The name low_entropy_source2 is a result of creating |
| 33 | // new prefs to do a one-time reset of the previous values. |
| 34 | const char kMetricsLowEntropySource[] = |
| 35 | "user_experience_metrics.low_entropy_source2"; |
| 36 | |
[email protected] | 66d176a | 2014-05-22 13:49:39 | [diff] [blame] | 37 | // A machine ID used to detect when underlying hardware changes. It is only |
| 38 | // stored locally and never transmitted in metrics reports. |
| 39 | const char kMetricsMachineId[] = "user_experience_metrics.machine_id"; |
| 40 | |
gayane | 8b523b87 | 2016-09-30 21:43:59 | [diff] [blame] | 41 | // Array of dictionaries that are each UMA logs that were not sent because the |
| 42 | // browser terminated before these accumulated metrics could be sent. These |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 43 | // logs typically include histograms and memory reports, as well as ongoing |
| 44 | // user activities. |
gayane | 8b523b87 | 2016-09-30 21:43:59 | [diff] [blame] | 45 | const char kMetricsOngoingLogs[] = "user_experience_metrics.ongoing_logs2"; |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 46 | |
[email protected] | 66d176a | 2014-05-22 13:49:39 | [diff] [blame] | 47 | // Boolean that indicates a cloned install has been detected and the metrics |
| 48 | // client id and low entropy source should be reset. |
| 49 | const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids"; |
| 50 | |
blundell | 6e85b7c | 2015-09-29 12:33:35 | [diff] [blame] | 51 | // Boolean that specifies whether or not crash reporting and metrics reporting |
| 52 | // are sent over the network for analysis. |
| 53 | const char kMetricsReportingEnabled[] = |
| 54 | "user_experience_metrics.reporting_enabled"; |
| 55 | |
asvitkine | 2b53ee0 | 2016-08-15 17:36:24 | [diff] [blame] | 56 | // Date/time when the user opted in to UMA and generated the client id most |
| 57 | // recently (local machine time, stored as a 64-bit time_t value). |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 58 | const char kMetricsReportingEnabledTimestamp[] = |
| 59 | "user_experience_metrics.client_id_timestamp"; |
| 60 | |
| 61 | // The metrics client session ID. |
| 62 | const char kMetricsSessionID[] = "user_experience_metrics.session_id"; |
| 63 | |
bcwhite | 34c6bbf | 2016-02-19 22:14:46 | [diff] [blame] | 64 | // The prefix of the last-seen timestamp for persistent histogram files. |
| 65 | // Values are named for the files themselves. |
| 66 | const char kMetricsLastSeenPrefix[] = |
| 67 | "user_experience_metrics.last_seen."; |
| 68 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 69 | // Number of times the browser has been able to register crash reporting. |
| 70 | const char kStabilityBreakpadRegistrationSuccess[] = |
| 71 | "user_experience_metrics.stability.breakpad_registration_ok"; |
| 72 | |
| 73 | // Number of times the browser has failed to register crash reporting. |
| 74 | const char kStabilityBreakpadRegistrationFail[] = |
| 75 | "user_experience_metrics.stability.breakpad_registration_fail"; |
| 76 | |
Sigurdur Asgeirsson | 5795250 | 2018-01-29 16:15:08 | [diff] [blame] | 77 | // A time stamp at which time the browser was known to be alive. Used to |
| 78 | // evaluate whether the browser crash was due to a whole system crash. |
| 79 | // At minimum this is updated each time the "exited_cleanly" preference is |
| 80 | // modified, but can also be optionally updated on a slow schedule. |
| 81 | const char kStabilityBrowserLastLiveTimeStamp[] = |
| 82 | "user_experience_metrics.stability.browser_last_live_timestamp"; |
| 83 | |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 84 | // Total number of child process crashes (other than renderer / extension |
| 85 | // renderer ones, and plugin children, which are counted separately) since the |
| 86 | // last report. |
| 87 | const char kStabilityChildProcessCrashCount[] = |
| 88 | "user_experience_metrics.stability.child_process_crash_count"; |
| 89 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 90 | // Number of times the application exited uncleanly since the last report. |
Peter Wen | 45025ea | 2018-09-17 15:16:27 | [diff] [blame] | 91 | // On Android this does not count the ones due to Gms Core updates (below). |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 92 | const char kStabilityCrashCount[] = |
| 93 | "user_experience_metrics.stability.crash_count"; |
| 94 | |
Ran Ji | 988b5be | 2018-01-17 19:24:50 | [diff] [blame] | 95 | // Number of times the application exited uncleanly since the last report |
Peter Wen | 45025ea | 2018-09-17 15:16:27 | [diff] [blame] | 96 | // due to a gms core update. |
| 97 | const char kStabilityCrashCountDueToGmsCoreUpdate[] = |
| 98 | "user_experience_metrics.stability.crash_count_due_to_gms_core_update"; |
| 99 | |
| 100 | // Number of times the application exited uncleanly since the last report |
| 101 | // without gms core update (Deprecated 2018-09). |
| 102 | // TODO(wnwen): Remove this after 2019-09. |
| 103 | const char kStabilityCrashCountWithoutGmsCoreUpdateObsolete[] = |
Ran Ji | 988b5be | 2018-01-17 19:24:50 | [diff] [blame] | 104 | "user_experience_metrics.stability.crash_count_without_gms_core_update"; |
| 105 | |
manzagop | ea99d195 | 2016-09-08 23:40:05 | [diff] [blame] | 106 | // Number of times the initial stability log upload was deferred to the next |
| 107 | // startup. |
| 108 | const char kStabilityDeferredCount[] = |
| 109 | "user_experience_metrics.stability.deferred_count"; |
| 110 | |
| 111 | // Number of times stability data was discarded. This is accumulated since the |
| 112 | // last report, even across versions. |
| 113 | const char kStabilityDiscardCount[] = |
| 114 | "user_experience_metrics.stability.discard_count"; |
| 115 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 116 | // Number of times the browser has been run under a debugger. |
| 117 | const char kStabilityDebuggerPresent[] = |
| 118 | "user_experience_metrics.stability.debugger_present"; |
| 119 | |
| 120 | // Number of times the browser has not been run under a debugger. |
| 121 | const char kStabilityDebuggerNotPresent[] = |
| 122 | "user_experience_metrics.stability.debugger_not_present"; |
| 123 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 124 | // An enum value to indicate the execution phase the browser was in. |
| 125 | const char kStabilityExecutionPhase[] = |
| 126 | "user_experience_metrics.stability.execution_phase"; |
| 127 | |
| 128 | // True if the previous run of the program exited cleanly. |
| 129 | const char kStabilityExitedCleanly[] = |
| 130 | "user_experience_metrics.stability.exited_cleanly"; |
| 131 | |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 132 | // Number of times an extension renderer process crashed since the last report. |
| 133 | const char kStabilityExtensionRendererCrashCount[] = |
| 134 | "user_experience_metrics.stability.extension_renderer_crash_count"; |
| 135 | |
| 136 | // Number of times an extension renderer process failed to launch since the last |
| 137 | // report. |
| 138 | const char kStabilityExtensionRendererFailedLaunchCount[] = |
| 139 | "user_experience_metrics.stability.extension_renderer_failed_launch_count"; |
| 140 | |
wfh | 86b6c8c | 2016-07-15 20:48:35 | [diff] [blame] | 141 | // Number of times an extension renderer process successfully launched since the |
| 142 | // last report. |
| 143 | const char kStabilityExtensionRendererLaunchCount[] = |
| 144 | "user_experience_metrics.stability.extension_renderer_launch_count"; |
| 145 | |
Ran Ji | 988b5be | 2018-01-17 19:24:50 | [diff] [blame] | 146 | // The GMS core version used in Chrome. |
| 147 | const char kStabilityGmsCoreVersion[] = |
| 148 | "user_experience_metrics.stability.gms_core_version"; |
| 149 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 150 | // Number of times the session end did not complete. |
| 151 | const char kStabilityIncompleteSessionEndCount[] = |
| 152 | "user_experience_metrics.stability.incomplete_session_end_count"; |
| 153 | |
| 154 | // Number of times the application was launched since last report. |
| 155 | const char kStabilityLaunchCount[] = |
| 156 | "user_experience_metrics.stability.launch_count"; |
| 157 | |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 158 | // Number of times a page load event occurred since the last report. |
| 159 | const char kStabilityPageLoadCount[] = |
| 160 | "user_experience_metrics.stability.page_load_count"; |
| 161 | |
| 162 | // Number of times a renderer process crashed since the last report. |
| 163 | const char kStabilityRendererCrashCount[] = |
| 164 | "user_experience_metrics.stability.renderer_crash_count"; |
| 165 | |
| 166 | // Number of times a renderer process failed to launch since the last report. |
| 167 | const char kStabilityRendererFailedLaunchCount[] = |
| 168 | "user_experience_metrics.stability.renderer_failed_launch_count"; |
| 169 | |
| 170 | // Number of times the renderer has become non-responsive since the last |
| 171 | // report. |
| 172 | const char kStabilityRendererHangCount[] = |
| 173 | "user_experience_metrics.stability.renderer_hang_count"; |
| 174 | |
wfh | 86b6c8c | 2016-07-15 20:48:35 | [diff] [blame] | 175 | // Number of times a renderer process successfully launched since the last |
| 176 | // report. |
| 177 | const char kStabilityRendererLaunchCount[] = |
| 178 | "user_experience_metrics.stability.renderer_launch_count"; |
| 179 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 180 | // Base64 encoded serialized UMA system profile proto from the previous session. |
| 181 | const char kStabilitySavedSystemProfile[] = |
| 182 | "user_experience_metrics.stability.saved_system_profile"; |
| 183 | |
| 184 | // SHA-1 hash of the serialized UMA system profile proto (hex encoded). |
| 185 | const char kStabilitySavedSystemProfileHash[] = |
| 186 | "user_experience_metrics.stability.saved_system_profile_hash"; |
| 187 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 188 | // False if we received a session end and either we crashed during processing |
| 189 | // the session end or ran out of time and windows terminated us. |
| 190 | const char kStabilitySessionEndCompleted[] = |
| 191 | "user_experience_metrics.stability.session_end_completed"; |
| 192 | |
| 193 | // Build time, in seconds since an epoch, which is used to assure that stability |
| 194 | // metrics reported reflect stability of the same build. |
| 195 | const char kStabilityStatsBuildTime[] = |
| 196 | "user_experience_metrics.stability.stats_buildtime"; |
| 197 | |
| 198 | // Version string of previous run, which is used to assure that stability |
| 199 | // metrics reported under current version reflect stability of the same version. |
| 200 | const char kStabilityStatsVersion[] = |
| 201 | "user_experience_metrics.stability.stats_version"; |
| 202 | |
Sigurdur Asgeirsson | 8c67a59 | 2018-02-02 21:10:33 | [diff] [blame] | 203 | // Number of times the application exited uncleanly and the system session |
| 204 | // embedding the browser session ended abnormally since the last report. |
| 205 | // Windows only. |
| 206 | const char kStabilitySystemCrashCount[] = |
| 207 | "user_experience_metrics.stability.system_crash_count"; |
| 208 | |
manzagop | ea99d195 | 2016-09-08 23:40:05 | [diff] [blame] | 209 | // Number of times the version number stored in prefs did not match the |
| 210 | // serialized system profile version number. |
| 211 | const char kStabilityVersionMismatchCount[] = |
| 212 | "user_experience_metrics.stability.version_mismatch_count"; |
| 213 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 214 | // The keys below are strictly increasing counters over the lifetime of |
| 215 | // a chrome installation. They are (optionally) sent up to the uninstall |
| 216 | // survey in the event of uninstallation. |
| 217 | const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count"; |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 218 | const char kUninstallMetricsPageLoadCount[] = |
| 219 | "uninstall_metrics.page_load_count"; |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 220 | const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec"; |
| 221 | |
holte | 77d815b | 2017-03-27 21:27:37 | [diff] [blame] | 222 | // Dictionary for measuring cellular data used by UKM service during last 7 |
| 223 | // days. |
| 224 | const char kUkmCellDataUse[] = "user_experience_metrics.ukm_cell_datause"; |
| 225 | |
gayane | 0b46091c | 2016-04-07 21:01:05 | [diff] [blame] | 226 | // Dictionary for measuring cellular data used by UMA service during last 7 |
| 227 | // days. |
| 228 | const char kUmaCellDataUse[] = "user_experience_metrics.uma_cell_datause"; |
| 229 | |
| 230 | // Dictionary for measuring cellular data used by user including chrome services |
| 231 | // per day. |
| 232 | const char kUserCellDataUse[] = "user_experience_metrics.user_call_datause"; |
| 233 | |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 234 | } // namespace prefs |
| 235 | } // namespace metrics |