[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 | |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 19 | // Array of strings that are each UMA logs that were supposed to be sent in the |
| 20 | // first minute of a browser session. These logs include things like crash count |
| 21 | // info, etc. |
| 22 | const char kMetricsInitialLogs[] = |
[email protected] | 9706e1b | 2014-06-11 16:31:24 | [diff] [blame] | 23 | "user_experience_metrics.initial_logs_list"; |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 24 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 25 | // The metrics entropy source. |
| 26 | // Note: The name low_entropy_source2 is a result of creating |
| 27 | // new prefs to do a one-time reset of the previous values. |
| 28 | const char kMetricsLowEntropySource[] = |
| 29 | "user_experience_metrics.low_entropy_source2"; |
| 30 | |
[email protected] | 66d176a | 2014-05-22 13:49:39 | [diff] [blame] | 31 | // A machine ID used to detect when underlying hardware changes. It is only |
| 32 | // stored locally and never transmitted in metrics reports. |
| 33 | const char kMetricsMachineId[] = "user_experience_metrics.machine_id"; |
| 34 | |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 35 | // Array of strings that are each UMA logs that were not sent because the |
| 36 | // browser terminated before these accumulated metrics could be sent. These |
| 37 | // logs typically include histograms and memory reports, as well as ongoing |
| 38 | // user activities. |
| 39 | const char kMetricsOngoingLogs[] = |
[email protected] | 9706e1b | 2014-06-11 16:31:24 | [diff] [blame] | 40 | "user_experience_metrics.ongoing_logs_list"; |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 41 | |
[email protected] | 66d176a | 2014-05-22 13:49:39 | [diff] [blame] | 42 | // Boolean that indicates a cloned install has been detected and the metrics |
| 43 | // client id and low entropy source should be reset. |
| 44 | const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids"; |
| 45 | |
blundell | 6e85b7c | 2015-09-29 12:33:35 | [diff] [blame] | 46 | // Boolean that specifies whether or not crash reporting and metrics reporting |
| 47 | // are sent over the network for analysis. |
| 48 | const char kMetricsReportingEnabled[] = |
| 49 | "user_experience_metrics.reporting_enabled"; |
| 50 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 51 | // Date/time when the user opted in to UMA and generated the client id for the |
| 52 | // very first time (local machine time, stored as a 64-bit time_t value). |
| 53 | const char kMetricsReportingEnabledTimestamp[] = |
| 54 | "user_experience_metrics.client_id_timestamp"; |
| 55 | |
| 56 | // The metrics client session ID. |
| 57 | const char kMetricsSessionID[] = "user_experience_metrics.session_id"; |
| 58 | |
bcwhite | 34c6bbf | 2016-02-19 22:14:46 | [diff] [blame] | 59 | // The prefix of the last-seen timestamp for persistent histogram files. |
| 60 | // Values are named for the files themselves. |
| 61 | const char kMetricsLastSeenPrefix[] = |
| 62 | "user_experience_metrics.last_seen."; |
| 63 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 64 | // Number of times the browser has been able to register crash reporting. |
| 65 | const char kStabilityBreakpadRegistrationSuccess[] = |
| 66 | "user_experience_metrics.stability.breakpad_registration_ok"; |
| 67 | |
| 68 | // Number of times the browser has failed to register crash reporting. |
| 69 | const char kStabilityBreakpadRegistrationFail[] = |
| 70 | "user_experience_metrics.stability.breakpad_registration_fail"; |
| 71 | |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 72 | // Total number of child process crashes (other than renderer / extension |
| 73 | // renderer ones, and plugin children, which are counted separately) since the |
| 74 | // last report. |
| 75 | const char kStabilityChildProcessCrashCount[] = |
| 76 | "user_experience_metrics.stability.child_process_crash_count"; |
| 77 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 78 | // Number of times the application exited uncleanly since the last report. |
| 79 | const char kStabilityCrashCount[] = |
| 80 | "user_experience_metrics.stability.crash_count"; |
| 81 | |
| 82 | // Number of times the browser has been run under a debugger. |
| 83 | const char kStabilityDebuggerPresent[] = |
| 84 | "user_experience_metrics.stability.debugger_present"; |
| 85 | |
| 86 | // Number of times the browser has not been run under a debugger. |
| 87 | const char kStabilityDebuggerNotPresent[] = |
| 88 | "user_experience_metrics.stability.debugger_not_present"; |
| 89 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 90 | // An enum value to indicate the execution phase the browser was in. |
| 91 | const char kStabilityExecutionPhase[] = |
| 92 | "user_experience_metrics.stability.execution_phase"; |
| 93 | |
| 94 | // True if the previous run of the program exited cleanly. |
| 95 | const char kStabilityExitedCleanly[] = |
| 96 | "user_experience_metrics.stability.exited_cleanly"; |
| 97 | |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 98 | // Number of times an extension renderer process crashed since the last report. |
| 99 | const char kStabilityExtensionRendererCrashCount[] = |
| 100 | "user_experience_metrics.stability.extension_renderer_crash_count"; |
| 101 | |
| 102 | // Number of times an extension renderer process failed to launch since the last |
| 103 | // report. |
| 104 | const char kStabilityExtensionRendererFailedLaunchCount[] = |
| 105 | "user_experience_metrics.stability.extension_renderer_failed_launch_count"; |
| 106 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 107 | // Number of times the session end did not complete. |
| 108 | const char kStabilityIncompleteSessionEndCount[] = |
| 109 | "user_experience_metrics.stability.incomplete_session_end_count"; |
| 110 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 111 | // Time when the app was last known to be running, in seconds since |
| 112 | // the epoch. |
| 113 | const char kStabilityLastTimestampSec[] = |
| 114 | "user_experience_metrics.stability.last_timestamp_sec"; |
| 115 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 116 | // Number of times the application was launched since last report. |
| 117 | const char kStabilityLaunchCount[] = |
| 118 | "user_experience_metrics.stability.launch_count"; |
| 119 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 120 | // Time when the app was last launched, in seconds since the epoch. |
| 121 | const char kStabilityLaunchTimeSec[] = |
| 122 | "user_experience_metrics.stability.launch_time_sec"; |
| 123 | |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 124 | // Number of times a page load event occurred since the last report. |
| 125 | const char kStabilityPageLoadCount[] = |
| 126 | "user_experience_metrics.stability.page_load_count"; |
| 127 | |
| 128 | // Number of times a renderer process crashed since the last report. |
| 129 | const char kStabilityRendererCrashCount[] = |
| 130 | "user_experience_metrics.stability.renderer_crash_count"; |
| 131 | |
| 132 | // Number of times a renderer process failed to launch since the last report. |
| 133 | const char kStabilityRendererFailedLaunchCount[] = |
| 134 | "user_experience_metrics.stability.renderer_failed_launch_count"; |
| 135 | |
| 136 | // Number of times the renderer has become non-responsive since the last |
| 137 | // report. |
| 138 | const char kStabilityRendererHangCount[] = |
| 139 | "user_experience_metrics.stability.renderer_hang_count"; |
| 140 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 141 | // Base64 encoded serialized UMA system profile proto from the previous session. |
| 142 | const char kStabilitySavedSystemProfile[] = |
| 143 | "user_experience_metrics.stability.saved_system_profile"; |
| 144 | |
| 145 | // SHA-1 hash of the serialized UMA system profile proto (hex encoded). |
| 146 | const char kStabilitySavedSystemProfileHash[] = |
| 147 | "user_experience_metrics.stability.saved_system_profile_hash"; |
| 148 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 149 | // False if we received a session end and either we crashed during processing |
| 150 | // the session end or ran out of time and windows terminated us. |
| 151 | const char kStabilitySessionEndCompleted[] = |
| 152 | "user_experience_metrics.stability.session_end_completed"; |
| 153 | |
| 154 | // Build time, in seconds since an epoch, which is used to assure that stability |
| 155 | // metrics reported reflect stability of the same build. |
| 156 | const char kStabilityStatsBuildTime[] = |
| 157 | "user_experience_metrics.stability.stats_buildtime"; |
| 158 | |
| 159 | // Version string of previous run, which is used to assure that stability |
| 160 | // metrics reported under current version reflect stability of the same version. |
| 161 | const char kStabilityStatsVersion[] = |
| 162 | "user_experience_metrics.stability.stats_version"; |
| 163 | |
| 164 | // The keys below are strictly increasing counters over the lifetime of |
| 165 | // a chrome installation. They are (optionally) sent up to the uninstall |
| 166 | // survey in the event of uninstallation. |
| 167 | const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count"; |
blundell | 8ae1562 | 2015-09-28 08:34:16 | [diff] [blame] | 168 | const char kUninstallMetricsPageLoadCount[] = |
| 169 | "uninstall_metrics.page_load_count"; |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 170 | const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec"; |
| 171 | |
gayane | 0b46091c | 2016-04-07 21:01:05 | [diff] [blame^] | 172 | // Dictionary for measuring cellular data used by UMA service during last 7 |
| 173 | // days. |
| 174 | const char kUmaCellDataUse[] = "user_experience_metrics.uma_cell_datause"; |
| 175 | |
| 176 | // Dictionary for measuring cellular data used by user including chrome services |
| 177 | // per day. |
| 178 | const char kUserCellDataUse[] = "user_experience_metrics.user_call_datause"; |
| 179 | |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 180 | } // namespace prefs |
| 181 | } // namespace metrics |