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