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