[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"; |
| 24 | const char kMetricsInitialLogsOld[] = |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 25 | "user_experience_metrics.initial_logs_as_protobufs"; |
| 26 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 27 | // The metrics entropy source. |
| 28 | // Note: The name low_entropy_source2 is a result of creating |
| 29 | // new prefs to do a one-time reset of the previous values. |
| 30 | const char kMetricsLowEntropySource[] = |
| 31 | "user_experience_metrics.low_entropy_source2"; |
| 32 | |
[email protected] | 66d176a | 2014-05-22 13:49:39 | [diff] [blame] | 33 | // A machine ID used to detect when underlying hardware changes. It is only |
| 34 | // stored locally and never transmitted in metrics reports. |
| 35 | const char kMetricsMachineId[] = "user_experience_metrics.machine_id"; |
| 36 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 37 | // Old client id and low entropy source values, cleared the first time this |
| 38 | // version is launched. |
| 39 | // TODO(asvitkine): Delete these after a few releases have gone by and old |
| 40 | // values have been cleaned up. http://crbug.com/357704 |
| 41 | const char kMetricsOldClientID[] = "user_experience_metrics.client_id"; |
| 42 | const char kMetricsOldLowEntropySource[] = |
| 43 | "user_experience_metrics.low_entropy_source"; |
| 44 | |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 45 | // Array of strings that are each UMA logs that were not sent because the |
| 46 | // browser terminated before these accumulated metrics could be sent. These |
| 47 | // logs typically include histograms and memory reports, as well as ongoing |
| 48 | // user activities. |
| 49 | const char kMetricsOngoingLogs[] = |
[email protected] | 9706e1b | 2014-06-11 16:31:24 | [diff] [blame] | 50 | "user_experience_metrics.ongoing_logs_list"; |
| 51 | const char kMetricsOngoingLogsOld[] = |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 52 | "user_experience_metrics.ongoing_logs_as_protobufs"; |
| 53 | |
[email protected] | 66d176a | 2014-05-22 13:49:39 | [diff] [blame] | 54 | // Boolean that indicates a cloned install has been detected and the metrics |
| 55 | // client id and low entropy source should be reset. |
| 56 | const char kMetricsResetIds[] = "user_experience_metrics.reset_metrics_ids"; |
| 57 | |
[email protected] | 16a3091 | 2014-06-04 00:20:04 | [diff] [blame] | 58 | // Date/time when the user opted in to UMA and generated the client id for the |
| 59 | // very first time (local machine time, stored as a 64-bit time_t value). |
| 60 | const char kMetricsReportingEnabledTimestamp[] = |
| 61 | "user_experience_metrics.client_id_timestamp"; |
| 62 | |
| 63 | // The metrics client session ID. |
| 64 | const char kMetricsSessionID[] = "user_experience_metrics.session_id"; |
| 65 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 66 | // Number of times the browser has been able to register crash reporting. |
| 67 | const char kStabilityBreakpadRegistrationSuccess[] = |
| 68 | "user_experience_metrics.stability.breakpad_registration_ok"; |
| 69 | |
| 70 | // Number of times the browser has failed to register crash reporting. |
| 71 | const char kStabilityBreakpadRegistrationFail[] = |
| 72 | "user_experience_metrics.stability.breakpad_registration_fail"; |
| 73 | |
| 74 | // Number of times the application exited uncleanly since the last report. |
| 75 | const char kStabilityCrashCount[] = |
| 76 | "user_experience_metrics.stability.crash_count"; |
| 77 | |
| 78 | // Number of times the browser has been run under a debugger. |
| 79 | const char kStabilityDebuggerPresent[] = |
| 80 | "user_experience_metrics.stability.debugger_present"; |
| 81 | |
| 82 | // Number of times the browser has not been run under a debugger. |
| 83 | const char kStabilityDebuggerNotPresent[] = |
| 84 | "user_experience_metrics.stability.debugger_not_present"; |
| 85 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 86 | // An enum value to indicate the execution phase the browser was in. |
| 87 | const char kStabilityExecutionPhase[] = |
| 88 | "user_experience_metrics.stability.execution_phase"; |
| 89 | |
| 90 | // True if the previous run of the program exited cleanly. |
| 91 | const char kStabilityExitedCleanly[] = |
| 92 | "user_experience_metrics.stability.exited_cleanly"; |
| 93 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 94 | // Number of times the session end did not complete. |
| 95 | const char kStabilityIncompleteSessionEndCount[] = |
| 96 | "user_experience_metrics.stability.incomplete_session_end_count"; |
| 97 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 98 | // Time when the app was last known to be running, in seconds since |
| 99 | // the epoch. |
| 100 | const char kStabilityLastTimestampSec[] = |
| 101 | "user_experience_metrics.stability.last_timestamp_sec"; |
| 102 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 103 | // Number of times the application was launched since last report. |
| 104 | const char kStabilityLaunchCount[] = |
| 105 | "user_experience_metrics.stability.launch_count"; |
| 106 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 107 | // Time when the app was last launched, in seconds since the epoch. |
| 108 | const char kStabilityLaunchTimeSec[] = |
| 109 | "user_experience_metrics.stability.launch_time_sec"; |
| 110 | |
[email protected] | 91b1d91 | 2014-06-05 10:52:08 | [diff] [blame] | 111 | // Base64 encoded serialized UMA system profile proto from the previous session. |
| 112 | const char kStabilitySavedSystemProfile[] = |
| 113 | "user_experience_metrics.stability.saved_system_profile"; |
| 114 | |
| 115 | // SHA-1 hash of the serialized UMA system profile proto (hex encoded). |
| 116 | const char kStabilitySavedSystemProfileHash[] = |
| 117 | "user_experience_metrics.stability.saved_system_profile_hash"; |
| 118 | |
[email protected] | d6147bd | 2014-06-11 01:58:19 | [diff] [blame] | 119 | // False if we received a session end and either we crashed during processing |
| 120 | // the session end or ran out of time and windows terminated us. |
| 121 | const char kStabilitySessionEndCompleted[] = |
| 122 | "user_experience_metrics.stability.session_end_completed"; |
| 123 | |
| 124 | // Build time, in seconds since an epoch, which is used to assure that stability |
| 125 | // metrics reported reflect stability of the same build. |
| 126 | const char kStabilityStatsBuildTime[] = |
| 127 | "user_experience_metrics.stability.stats_buildtime"; |
| 128 | |
| 129 | // Version string of previous run, which is used to assure that stability |
| 130 | // metrics reported under current version reflect stability of the same version. |
| 131 | const char kStabilityStatsVersion[] = |
| 132 | "user_experience_metrics.stability.stats_version"; |
| 133 | |
| 134 | // The keys below are strictly increasing counters over the lifetime of |
| 135 | // a chrome installation. They are (optionally) sent up to the uninstall |
| 136 | // survey in the event of uninstallation. |
| 137 | const char kUninstallLaunchCount[] = "uninstall_metrics.launch_count"; |
| 138 | const char kUninstallMetricsUptimeSec[] = "uninstall_metrics.uptime_sec"; |
| 139 | |
[email protected] | 7f07db6 | 2014-05-15 01:12:45 | [diff] [blame] | 140 | } // namespace prefs |
| 141 | } // namespace metrics |