blob: 2bf002fe87e4bd645707c9146454e694f19d6b2a [file] [log] [blame]
[email protected]7f07db62014-05-15 01:12:451// 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
7namespace metrics {
8namespace prefs {
9
[email protected]65801452014-07-09 05:42:4110// Set once, to the current epoch time, on the first run of chrome on this
11// machine. Attached to metrics reports forever thereafter.
12const char kInstallDate[] = "uninstall_metrics.installation_date2";
13
[email protected]16a30912014-06-04 00:20:0414// 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.
17const char kMetricsClientID[] = "user_experience_metrics.client_id2";
18
gayane06e66ef32016-06-06 20:39:1419// 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.
24const char kMetricsDefaultOptIn[] = "user_experience_metrics.default_opt_in";
25
gayane8b523b872016-09-30 21:43:5926// 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.
29const char kMetricsInitialLogs[] = "user_experience_metrics.initial_logs2";
[email protected]7f07db62014-05-15 01:12:4530
[email protected]16a30912014-06-04 00:20:0431// 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.
34const char kMetricsLowEntropySource[] =
35 "user_experience_metrics.low_entropy_source2";
36
[email protected]66d176a2014-05-22 13:49:3937// A machine ID used to detect when underlying hardware changes. It is only
38// stored locally and never transmitted in metrics reports.
39const char kMetricsMachineId[] = "user_experience_metrics.machine_id";
40
gayane8b523b872016-09-30 21:43:5941// 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]7f07db62014-05-15 01:12:4543// logs typically include histograms and memory reports, as well as ongoing
44// user activities.
gayane8b523b872016-09-30 21:43:5945const char kMetricsOngoingLogs[] = "user_experience_metrics.ongoing_logs2";
[email protected]7f07db62014-05-15 01:12:4546
[email protected]66d176a2014-05-22 13:49:3947// Boolean that indicates a cloned install has been detected and the metrics
48// client id and low entropy source should be reset.
49const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids";
50
blundell6e85b7c2015-09-29 12:33:3551// Boolean that specifies whether or not crash reporting and metrics reporting
52// are sent over the network for analysis.
53const char kMetricsReportingEnabled[] =
54 "user_experience_metrics.reporting_enabled";
55
asvitkine2b53ee02016-08-15 17:36:2456// 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]16a30912014-06-04 00:20:0458const char kMetricsReportingEnabledTimestamp[] =
59 "user_experience_metrics.client_id_timestamp";
60
61// The metrics client session ID.
62const char kMetricsSessionID[] = "user_experience_metrics.session_id";
63
bcwhite34c6bbf2016-02-19 22:14:4664// The prefix of the last-seen timestamp for persistent histogram files.
65// Values are named for the files themselves.
66const char kMetricsLastSeenPrefix[] =
67 "user_experience_metrics.last_seen.";
68
[email protected]91b1d912014-06-05 10:52:0869// Number of times the browser has been able to register crash reporting.
70const char kStabilityBreakpadRegistrationSuccess[] =
71 "user_experience_metrics.stability.breakpad_registration_ok";
72
73// Number of times the browser has failed to register crash reporting.
74const char kStabilityBreakpadRegistrationFail[] =
75 "user_experience_metrics.stability.breakpad_registration_fail";
76
Sigurdur Asgeirsson57952502018-01-29 16:15:0877// 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.
81const char kStabilityBrowserLastLiveTimeStamp[] =
82 "user_experience_metrics.stability.browser_last_live_timestamp";
83
blundell8ae15622015-09-28 08:34:1684// 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.
87const char kStabilityChildProcessCrashCount[] =
88 "user_experience_metrics.stability.child_process_crash_count";
89
[email protected]91b1d912014-06-05 10:52:0890// Number of times the application exited uncleanly since the last report.
Peter Wen45025ea2018-09-17 15:16:2791// On Android this does not count the ones due to Gms Core updates (below).
[email protected]91b1d912014-06-05 10:52:0892const char kStabilityCrashCount[] =
93 "user_experience_metrics.stability.crash_count";
94
Ran Ji988b5be2018-01-17 19:24:5095// Number of times the application exited uncleanly since the last report
Peter Wen45025ea2018-09-17 15:16:2796// due to a gms core update.
97const 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.
103const char kStabilityCrashCountWithoutGmsCoreUpdateObsolete[] =
Ran Ji988b5be2018-01-17 19:24:50104 "user_experience_metrics.stability.crash_count_without_gms_core_update";
105
manzagopea99d1952016-09-08 23:40:05106// Number of times the initial stability log upload was deferred to the next
107// startup.
108const 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.
113const char kStabilityDiscardCount[] =
114 "user_experience_metrics.stability.discard_count";
115
[email protected]91b1d912014-06-05 10:52:08116// Number of times the browser has been run under a debugger.
117const char kStabilityDebuggerPresent[] =
118 "user_experience_metrics.stability.debugger_present";
119
120// Number of times the browser has not been run under a debugger.
121const char kStabilityDebuggerNotPresent[] =
122 "user_experience_metrics.stability.debugger_not_present";
123
[email protected]d6147bd2014-06-11 01:58:19124// An enum value to indicate the execution phase the browser was in.
125const char kStabilityExecutionPhase[] =
126 "user_experience_metrics.stability.execution_phase";
127
128// True if the previous run of the program exited cleanly.
129const char kStabilityExitedCleanly[] =
130 "user_experience_metrics.stability.exited_cleanly";
131
blundell8ae15622015-09-28 08:34:16132// Number of times an extension renderer process crashed since the last report.
133const 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.
138const char kStabilityExtensionRendererFailedLaunchCount[] =
139 "user_experience_metrics.stability.extension_renderer_failed_launch_count";
140
wfh86b6c8c2016-07-15 20:48:35141// Number of times an extension renderer process successfully launched since the
142// last report.
143const char kStabilityExtensionRendererLaunchCount[] =
144 "user_experience_metrics.stability.extension_renderer_launch_count";
145
Ran Ji988b5be2018-01-17 19:24:50146// The GMS core version used in Chrome.
147const char kStabilityGmsCoreVersion[] =
148 "user_experience_metrics.stability.gms_core_version";
149
[email protected]91b1d912014-06-05 10:52:08150// Number of times the session end did not complete.
151const char kStabilityIncompleteSessionEndCount[] =
152 "user_experience_metrics.stability.incomplete_session_end_count";
153
154// Number of times the application was launched since last report.
155const char kStabilityLaunchCount[] =
156 "user_experience_metrics.stability.launch_count";
157
blundell8ae15622015-09-28 08:34:16158// Number of times a page load event occurred since the last report.
159const char kStabilityPageLoadCount[] =
160 "user_experience_metrics.stability.page_load_count";
161
162// Number of times a renderer process crashed since the last report.
163const 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.
167const 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.
172const char kStabilityRendererHangCount[] =
173 "user_experience_metrics.stability.renderer_hang_count";
174
wfh86b6c8c2016-07-15 20:48:35175// Number of times a renderer process successfully launched since the last
176// report.
177const char kStabilityRendererLaunchCount[] =
178 "user_experience_metrics.stability.renderer_launch_count";
179
[email protected]91b1d912014-06-05 10:52:08180// Base64 encoded serialized UMA system profile proto from the previous session.
181const char kStabilitySavedSystemProfile[] =
182 "user_experience_metrics.stability.saved_system_profile";
183
184// SHA-1 hash of the serialized UMA system profile proto (hex encoded).
185const char kStabilitySavedSystemProfileHash[] =
186 "user_experience_metrics.stability.saved_system_profile_hash";
187
[email protected]d6147bd2014-06-11 01:58:19188// 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.
190const 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.
195const 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.
200const char kStabilityStatsVersion[] =
201 "user_experience_metrics.stability.stats_version";
202
Sigurdur Asgeirsson8c67a592018-02-02 21:10:33203// 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.
206const char kStabilitySystemCrashCount[] =
207 "user_experience_metrics.stability.system_crash_count";
208
manzagopea99d1952016-09-08 23:40:05209// Number of times the version number stored in prefs did not match the
210// serialized system profile version number.
211const char kStabilityVersionMismatchCount[] =
212 "user_experience_metrics.stability.version_mismatch_count";
213
[email protected]d6147bd2014-06-11 01:58:19214// 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.
217const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count";
blundell8ae15622015-09-28 08:34:16218const char kUninstallMetricsPageLoadCount[] =
219 "uninstall_metrics.page_load_count";
[email protected]d6147bd2014-06-11 01:58:19220const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec";
221
holte77d815b2017-03-27 21:27:37222// Dictionary for measuring cellular data used by UKM service during last 7
223// days.
224const char kUkmCellDataUse[] = "user_experience_metrics.ukm_cell_datause";
225
gayane0b46091c2016-04-07 21:01:05226// Dictionary for measuring cellular data used by UMA service during last 7
227// days.
228const char kUmaCellDataUse[] = "user_experience_metrics.uma_cell_datause";
229
230// Dictionary for measuring cellular data used by user including chrome services
231// per day.
232const char kUserCellDataUse[] = "user_experience_metrics.user_call_datause";
233
[email protected]7f07db62014-05-15 01:12:45234} // namespace prefs
235} // namespace metrics