<!--
Copyright 2020 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<!--
This file is used to generate a comprehensive list of Variations histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<variants name="SeedFile">
  <variant name="Latest" summary="latest seed file"/>
  <variant name="Safe" summary="safe seed file"/>
</variants>

<histogram name="Variations.AppliedSeed.Size" units="bytes"
    expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The size (up to 1M bytes) of the variations seed (serialized uncompressed
    proto) that is loaded on startup and used. Note that not all loaded seeds
    are used; for example, expired seeds are not used. The seed could be a
    regular seed or a safe seed. Recorded after setting up field trials with the
    seed.
  </summary>
</histogram>

<histogram name="Variations.AppliedSeed.Size.V2" units="bytes"
    expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The size (up to 10M bytes) of the variations seed (serialized uncompressed
    proto) that is loaded on startup and used. Note that not all loaded seeds
    are used; for example, expired seeds are not used. The seed could be a
    regular seed or a safe seed. Recorded after setting up field trials with the
    seed. Windows only.
  </summary>
</histogram>

<histogram name="Variations.AppliedSeed.StudyCount" units="studies"
    expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The number of studies contained in the seed that is being used. Note that
    the client may not participate in all studies due to study filtering. The
    seed could be a regular seed or a safe seed. Recorded before setting up
    field trials with the seed.
  </summary>
</histogram>

<histogram name="Variations.ApplyRuntimeMutableChanges.Result"
    enum="VariationsApplyRuntimeMutableChangesResult"
    expires_after="2027-06-11">
  <owner>lucnguyen@google.com</owner>
  <owner>rogerm@google.com</owner>
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of attempting to apply a runtime mutable study from a new
    variations seed. Recorded for each runtime mutable study in the seed
    whenever a new seed is successfully stored.
  </summary>
</histogram>

<histogram name="Variations.AppSeedFreshness" units="minutes"
    expires_after="2027-02-14">
  <owner>ntfschr@chromium.org</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    The time interval between when a WebView-using app's copy of the variations
    seed was written to its local app storage and when it was loaded for use.
    This is different from Variations.SeedFreshness because it measures
    freshness from when the app received its copy of the seed, not when the seed
    was originally downloaded. Written every time the browser process
    initializes, but not if there was an error reading the seed, or no seed
    existed.
  </summary>
</histogram>

<histogram name="Variations.CreateTrial.SimulationMatches" enum="Boolean"
    expires_after="2027-07-17">
  <owner>lucnguyen@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Whether creating a simulated field trial for a variations study results in
    the same assigned group and nullability state as creating the actual field
    trial for the study. Recorded for approximately 1% of studies when creating
    trials from a variations seed at startup, excluding studies that already
    exist or have feature conflicts.
  </summary>
</histogram>

<histogram name="Variations.ExtendedSafeMode.BeaconFileDeserializationError"
    enum="JsonDeserializationError" expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <component>1456342</component>
  <summary>
    The error code given by JSONFileValueDeserializer::Deserialize(). Emitted
    during CleanExitBeacon initialization when the beacon file cannot be
    deserialized. In other words, it is emitted whenever the &quot;Not
    deserializable&quot; bucket of the BeaconFileStateAtStartup histogram is
    emitted.

    As of M102 for desktop and iOS and M103 for Android Chrome, any client may
    emit this metric. Prior to this, the metric was emitted by only clients in
    an enabled group that used the beacon file.
  </summary>
</histogram>

<histogram name="Variations.ExtendedSafeMode.BeaconFileStateAtStartup"
    enum="BeaconFileState" expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <component>1456342</component>
  <summary>
    The state of the beacon file and its contents, e.g. readable or not
    deserializable. See the BeaconFileDeserializationError histogram for more
    details on why the file was not deserializable. Emitted when the
    CleanExitBeacon is initialized.

    As of M102 for desktop and iOS and M103 for Android Chrome, any client may
    emit this metric. Prior to this, the metric was emitted by only clients in
    an enabled group that used the beacon file.
  </summary>
</histogram>

<histogram name="Variations.ExtendedSafeMode.BeaconFileWrite"
    enum="BooleanSuccess" expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <component>1456342</component>
  <summary>
    Denotes whether the beacon file was successfully written. Recorded
    immediately after Chrome tries to write the file.

    As of M102 for desktop and iOS and M103 for Android Chrome, any client may
    emit this metric. Prior to this, the metric was emitted by only clients in
    an enabled group that used the beacon file.

    Expired 02/2025. Revived M139.
  </summary>
</histogram>

<histogram name="Variations.FeatureAccess" enum="FeatureNameHash"
    expires_after="2027-02-07">
  <owner>artomczak@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the hash of the feature name for every feature accessed via
    base::FeatureList::IsEnabled(). This is recorded once per feature per
    session to avoid performance overhead.
  </summary>
</histogram>

<histogram name="Variations.FeatureAccessEarly" enum="FeatureNameHash"
    expires_after="2027-02-07">
  <owner>artomczak@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the hash of the feature name for every feature accessed via
    base::FeatureList::IsEnabled() *before* the FeatureList has been
    initialized. This is recorded once per feature per session.
  </summary>
</histogram>

<histogram name="Variations.FieldTriamParamsLogInvalidValue"
    enum="FieldTrialNameHash" expires_after="2026-11-01">
  <owner>thiabaud@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Logged whenever |base::LogInvalidValue| is called, i.e. whenever an invalid
    value is used with a FeatureParam. This is normally due to a bad config
    file. The logged value of this histogram is a hash of the study name
    associated with the aforementioned feature.
  </summary>
</histogram>

<histogram name="Variations.FirstRun.DeltaCompression"
    enum="VariationsDeltaCompression" expires_after="2023-08-08">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>swestphal@chromium.org</owner>
  <owner>src/android_webview/OWNERS</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The state of the delta-compression when attempting to fetch a variations
    seed via the java-based fetcher on Android. Records both the requested and
    received delta compression values in one enumeration.
  </summary>
</histogram>

<histogram name="Variations.FirstRun.SeedConnectTime" units="ms"
    expires_after="2026-11-01">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The latency of connection to the variations server when fetching an initial
    variations seed during Android Chrome first run. This is included in the
    Variations.FirstRun.SeedFetchTime measurement. Only considers cases where an
    HTTP 200 result was received.

    Note: This expired in January 2025 and was revived in M143.
  </summary>
</histogram>

<histogram name="Variations.FirstRun.SeedFetchResult"
    enum="VariationsSeedFetchResult" expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of attempting to fetch an initial variations seed during Android
    Chrome first run. Records both the HTTP code and various error values in one
    enumeration. Prior to M95, non-200 HTTP codes were counted as IOException.
    Starting with M95, these codes are logged separately.
  </summary>
</histogram>

<histogram name="Variations.FirstRun.SeedFetchTime" units="ms"
    expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The latency of fetching an initial variations seed during Android Chrome
    first run. Only considers cases where an HTTP 200 result was received.
  </summary>
</histogram>

<histogram name="Variations.FirstRunResult" enum="VariationsFirstRunResult"
    expires_after="2026-03-22">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of attempting to import an initial variations seed during Android
    and iOS Chrome first run. Logged from VariationsSeedStore::LoadSeed when
    seed prefs do not exist. For non-first run launches, this value is expected
    to be &quot;failed - no first run seed.&quot;

    Supported for iOS Chrome since M135.
  </summary>
</histogram>

<histogram name="Variations.ForcedFieldTrialsAtStartupForInternalsPage"
    enum="Boolean" expires_after="2026-11-01">
  <owner>harringtond@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Reports whether any field trials were overridden with the metrics-internals
    field trials tab. This is recorded once at startup.
  </summary>
</histogram>

<histogram name="Variations.Headers.DomainOwner" enum="VariationsHeadersOwner"
    expires_after="2027-01-03">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The owner of the top-level domain from which certain subframe-initiated HTTP
    requests are made. It's logged after determining that (i) the request should
    include variations headers, (ii) the request is from a subframe, and (iii)
    TrustedParams are not present. It's logged before adding headers. It allows
    us to verify whether non-render-thread-initiated requests, if any, lack
    TrustedParams.
  </summary>
</histogram>

<histogram name="Variations.Headers.ExperimentCount" units="units"
    expires_after="2027-01-17">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records number of experiment ids in the X-Client-Data header at the time the
    header is constructed.
  </summary>
</histogram>

<histogram name="Variations.Headers.RequestContextCategory"
    enum="VariationsHeadersRequestContextCategory" expires_after="2026-11-01">
  <owner>asvitkine@chromium.org</owner>
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Details about the request context in which an HTTP request is made. Logged
    after determining that the request should include variations headers but
    before adding the headers.
  </summary>
</histogram>

<histogram name="Variations.Headers.TimeSource" enum="VariationsTimeSource"
    expires_after="2027-01-03">
  <owner>rogerm@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The time source used by the variations service to get the current time.
  </summary>
</histogram>

<histogram name="Variations.InvalidLayerReason"
    enum="VariationsInvalidLayerReason" expires_after="2026-09-10">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the reason for rejecting an invalid layer. Recorded when processing
    the variations seed at startup and when simulating a new seed.
  </summary>
</histogram>

<histogram name="Variations.InvalidStudyReason"
    enum="VariationsInvalidStudyReason" expires_after="2027-01-17">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the reason for rejecting an invalid study. Recorded when processing
    the variations seed at startup and when simulating a new seed.
  </summary>
</histogram>

<histogram name="Variations.LimitedEntropy.SeedRejectionReason"
    enum="VariationsLimitedEntropySeedRejectionReason"
    expires_after="2027-01-17">
  <owner>yulunz@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the reason for rejecting a variations seed that contains a layer
    with LIMITED entropy mode. This is recorded when calculating the entropy
    usage for the studies constrained to the layer with LIMITED entropy mode.
  </summary>
</histogram>

<histogram name="Variations.Limits.VariationKeySize.{Size}" units="KiB"
    expires_after="2027-01-03">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The number of kilobytes of the variations crash keys, recorded every time
    crash keys are updated. Crash keys larger than kVariationKeySize will be
    truncated. The size of kVariationKeySize is controlled by the preprocessor
    macro LARGE_VARIATION_KEY_SIZE. {Size};
  </summary>
  <token key="Size">
    <variant name="Default"
        summary="&quot;Default&quot; is recorded when
                 LARGE_VARIATION_KEY_SIZE is NOT defined."/>
    <variant name="Large"
        summary="&quot;Large&quot; is used when LARGE_VARIATION_KEY_SIZE is
                 defined."/>
  </token>
</histogram>

<histogram name="Variations.LoadPermanentConsistencyCountryResult"
    enum="VariationsPermanentConsistencyCountryResult"
    expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records how the country code saved in prefs used for filtering permanent
    consistency studies compares to the country code in the variations seed.
    This is recorded each time the saved country code is loaded from the pref.
  </summary>
</histogram>

<histogram name="Variations.LoadSeedSignature" enum="VariationSeedSignature"
    expires_after="2027-01-17">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of verifying the latest variations seed's signature, recorded
    when the seed is loaded from Local State. Not recorded when running in safe
    mode.
  </summary>
</histogram>

<histogram name="Variations.PolicyRestriction"
    enum="VariationsRestrictionPolicyValues" expires_after="2023-12-30">
  <owner>ydago@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the restrictions on how experiment variations are applied on the
    client. This is recorded at start up.

    This histogram is not interesting anymore but it is still used by test code
    to verify that the respective log is properly applied so it will be kept in
    the code even if not collected by the server anymore. TODO(crbug/1345624):
    Clean this dependency up and remove the histogram.
  </summary>
</histogram>

<histogram name="Variations.ResourceRequestsAllowed"
    enum="VariationsResourceRequestsAllowedState" expires_after="2023-06-04">
  <expired_intentionally>
    Kept as a diagnostic metric.
  </expired_intentionally>
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Counts the number of times the VariationsService is allowed or not allowed
    to make a request due to the ResourceRequestAllowedNotifier. Useful for
    debugging cases where variations seeds may not be getting fetched.
  </summary>
</histogram>

<histogram name="Variations.RuntimeMutability.Error.FeatureName"
    enum="FeatureNameHash" expires_after="2027-06-30">
  <owner>rogerm@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Captures the hashed name of a feature for which a runtime mutability
    operation (registration, state query, state update, etc) failed.
  </summary>
</histogram>

<histogram name="Variations.RuntimeMutability.Result"
    enum="VariationsRuntimeMutabilityResult" expires_after="2027-06-30">
  <owner>rogerm@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Captures the result of applying a runtime mutability update. Recored once
    per runtime-mutable feature update received in each downloaded variations
    seed.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.CrashStreakDiscrepancy" units="crashes"
    expires_after="2027-01-03">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The absolute value of the difference between the beacon-file-based crash
    streak and the local-state-based crash streak. Recorded during startup after
    successfully reading the beacon file's crash streak and before any updates
    are made (in memory) to the Local State crash streak.

    Note: This expired in May 2025 and was revived in M143.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.LoadSafeSeed.Result"
    enum="VariationsSeedLoadResult" expires_after="2027-02-07">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records whether the safe variations seed was successfully read from disk on
    startup. Records a detailed reason on read failure. Only recorded when
    attempting to run in safe mode.

    Expired after M77 and revived in M93.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.LoadSafeSeed.SignatureValidity"
    enum="VariationSeedSignature" expires_after="2026-09-20">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of verifying the safe variations seed's signature. Recorded when
    the seed is loaded from disk. Only recorded when attempting to run in safe
    mode.

    Expired after M77 and revived in M93.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.StoreSafeSeed.Result"
    enum="VariationsSeedStoreResult" expires_after="2027-01-24">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the result of attempting to store a safe variations seed (and all
    associated metadata) on disk.

    Expired after M77 and revived in M93.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.StoreSafeSeed.SignatureValidity"
    enum="VariationSeedSignature" expires_after="2023-06-04">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of verifying the safe variations seed's signature. Recorded when
    attempting to store the safe seed on disk.

    Expired after M77 and revived in M93.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.Streak.Crashes" units="crashes"
    expires_after="2027-01-17">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The number of consecutive crashes observed by the VariationsService without
    a single intervening successful seed fetch. Recorded during Chrome startup
    when the MetricsStateManager's CleanExitBeacon is created.

    Prior to M92, this was recorded when the SafeSeedManager was created.
  </summary>
</histogram>

<histogram name="Variations.SafeMode.Streak.FetchFailures" units="failures"
    expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The number of consecutive failed attempts to fetch a new seed by the
    VariationsService. Recorded during Chrome startup when the SafeSeedManager
    is created.
  </summary>
</histogram>

<histogram name="Variations.SafeModeCachedFlags.Streak.Crashes" units="crashes"
    expires_after="never">
<!-- expires-never: Needed to detect and evaluate severity of before-native crashes behind cached flags. -->

  <owner>hnakashima@chromium.org</owner>
  <owner>src/chrome/browser/flags/OWNERS</owner>
  <summary>
    The number of consecutive crashes observed by Android's CachedFeatureFlags
    without a single intervening successful flag cache from native. Recorded the
    first time a cached flag is checked.

    Android only.
  </summary>
</histogram>

<histogram name="Variations.SafeModeCachedFlags.{Event}"
    enum="VariationsSafeModeCachedFlagsBehavior" expires_after="never">
<!-- expires-never: Needed to detect and evaluate severity of before-native crashes behind cached flags. -->

  <owner>hnakashima@chromium.org</owner>
  <owner>src/chrome/browser/flags/OWNERS</owner>
  <summary>
    What behavior of Safe Mode for CachedFlags (including not engaging it) was
    performed.

    {Event}

    The ratio &quot;Cached&quot; / (&quot;WillCache&quot; - &quot;Pause&quot;)
    is the success rate for a given mode, and (100% - success rate) is the crash
    rate.

    Android only.
  </summary>
  <token key="Event">
    <variant name="Cached"
        summary="&quot;Cached&quot; is recorded at the point where flags were
                 cached from native to Shared Preferences."/>
    <variant name="Engaged"
        summary="&quot;Engaged&quot; is recorded at the point where whether
                 to engage safe mode is decided."/>
    <variant name="Pause"
        summary="&quot;Pause&quot; is recorded when the initialization flow
                 is aborted."/>
    <variant name="WillCache"
        summary="&quot;WillCache&quot; is recorded when the initialization
                 flow that should result in caching flags is entered."/>
  </token>
</histogram>

<histogram name="Variations.SeedDateChange" enum="VariationsSeedDateChange"
    expires_after="2027-02-07">
  <owner>jwd@chromium.org</owner>
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Counts if a response from the variations server is the first response of the
    day or not. This is counted when a new valid seed or a 304 is received. The
    date line is computed in UTC and the times being compared are the server
    time from the server response and the stored server time from the last
    successful request.
  </summary>
</histogram>

<histogram name="Variations.SeedFetchResponseOrErrorCode{ConnectionType}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    HTTP response codes and network error encountered by VariationsService when
    attempting to fetch a variations seed from the server over an
    {ConnectionType} connection.
  </summary>
  <token key="ConnectionType">
    <variant name="" summary="HTTPS"/>
    <variant name=".HTTP" summary="HTTP"/>
  </token>
</histogram>

<histogram name="Variations.SeedFetchTimeOnFirstRun" units="ms"
    expires_after="2027-01-03">
  <owner>ginnyhuang@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The latency of fetching an initial variations seed during first run on
    non-Android platforms. Only considers cases where an HTTP 200 result was
    received.

    The respective metric for Android's is Variations.FirstRun.SeedFetchTime.

    Note: This expired in May 2025 and was revived in M143.
  </summary>
</histogram>

<histogram name="Variations.SeedFile.CompressionTime.{SeedFile}" units="ms"
    expires_after="2027-04-01">
  <owner>rcanoaparicio@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The time it takes to compress the {SeedFile} info before writing it to disk.
    Recorded on a background thread every time a seed is written to disk.
  </summary>
</histogram>

<histogram name="Variations.SeedFile.DecompressionTime.{SeedFile}" units="ms"
    expires_after="2027-04-01">
  <owner>rcanoaparicio@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The time it takes to decompress the {SeedFile} info after reading it from
    disk. Recorded on a background thread every time a seed is read from disk.
  </summary>
</histogram>

<histogram name="Variations.SeedFileRead.{SeedFile}" enum="BooleanSuccess"
    expires_after="2027-02-07">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the success or failure of reading a seed file, distinguishing
    between safe seed file and latest seed file. This metric is emitted only by
    clients in the seed file treatment group.

    {SeedFile}
  </summary>
</histogram>

<histogram name="Variations.SeedFileReadResult.{SeedFile}"
    enum="VariationsSeedLoadResult" expires_after="2027-01-03">
  <owner>rcanoaparicio@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the result of reading the seed file. This metric is emitted only by
    clients in the seed file treatment group.
  </summary>
</histogram>

<histogram name="Variations.SeedFileWriteEmptySeed.{SeedFile}"
    enum="BooleanEmpty" expires_after="2026-03-22">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Whether a seed copied from local state to the {SeedFile} is empty. Emitted
    by clients in the seed file experiment's treatment group when creating the
    {SeedFile}'s SeedReaderWriter if the file (a) does not exist or (b) exists
    but cannot be read.
  </summary>
</histogram>

<histogram name="Variations.SeedFreshness" units="minutes"
    expires_after="2027-01-17">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The time interval between when the variations seed was downloaded and when
    it was loaded for use.

    Recorded after the seed is loaded for both regular seeds and safe seeds. Not
    recorded for expired seeds or for seeds with an unknown download time, which
    is typically a seed imported via first run. A seed that (a) was fetched over
    30 days ago and (b) is older than the binary build time is considered
    expired.

    Prior to M93, this metric was recorded under slightly different conditions.
    First, the metric was recorded for safe seeds--expired or not--as long as
    they had download times. As of M93, it's no longer recorded for expired safe
    seeds. Second, the metric was not previously recorded for regular seeds that
    were older than 30 days, but as of M93, the freshness is recorded for seeds
    that are older than 30 days and newer than the binary build time.

    Prior to M99, this histogram would not be logged for first run seeds (where
    they were not fetched by Chrome, but provided externally, such as part of
    Chrome installation via Google Update). In M99+, this histogram will be
    logged with a value of 0 minutes, so that the seed is considered fresh.
  </summary>
</histogram>

<histogram name="Variations.SeedFreshnessDiff" units="minutes"
    expires_after="2027-02-07">
  <owner>ntfschr@chromium.org</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    Logs the difference between the age of the seed (Seed Freshness) and the
    app's copy of the seed (App Seed Freshness). Seed Freshness is recorded when
    seed is loaded for both regular and safe seeds and AppSeed Freshness is
    recorded every time the browser process initializes. SeedFreshnessDiff is
    recorded at the latter of these two events. In the case when a user's clock
    is set incorrectly, or when a user changes their clock backwards in between
    Chrome runs, the difference between the seed freshness and the app seed
    freshness will be calculated and cached.
  </summary>
</histogram>

<histogram name="Variations.SeedLoadBlockingTime" units="ms"
    expires_after="2026-11-01">
  <owner>ntfschr@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    Records the time spent blocking WebView startup to wait for the variations
    seed. This is less than the entire time needed to load the seed, since
    startup is only blocked if loading is not complete by the time the seed is
    needed. This would ideally have a maximum value equal to the timeout in
    VariationsSeedLoader, but there is no actual limit on how late that timeout
    could fire. This is logged once per WebView startup, whether or not loading
    the seed was successful.
  </summary>
</histogram>

<histogram name="Variations.SeedLoadResult" enum="VariationsSeedLoadResult"
    expires_after="2027-01-31">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records whether the latest variations seed was successfully read from local
    state on startup. Records a detailed reason on read failure. Not recorded
    when running in safe mode.
  </summary>
</histogram>

<histogram name="Variations.SeedProcessingTime" units="ms"
    expires_after="2027-01-31">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records how long it takes to load and apply a variations seed. Recorded only
    when the seed is successfully loaded and applied. To help diagnose a
    processing time increase, see whether Variations.AppliedSeed.Size and
    Variations.AppliedSeed.StudyCount increased at the same time.
  </summary>
</histogram>

<histogram name="Variations.SeedSource.{SeedFile}" enum="SeedSource"
    expires_after="2027-01-03">
  <owner>rcanoaparicio@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the source where the seed was read from successfully.
  </summary>
</histogram>

<histogram name="Variations.SeedStoreResult" enum="VariationsSeedStoreResult"
    expires_after="2027-02-07">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Records the result of storing the variations seed that was received from the
    server. Also logs the types of data received (gzip, delta, etc).
  </summary>
</histogram>

<histogram name="Variations.SeedUsage" enum="VariationsSeedUsage"
    expires_after="2027-01-17">
  <owner>caitlinfischer@google.com</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Captures details about Chrome's attempt to use a VariationsSeed, e.g.
    whether Chrome used a safe seed. Recorded once during Chrome startup after
    attempting to load a seed and before field trials are created.

    This metric is not accurate between M123 and M141, inclusively. In these
    milestones, the buckets for applying regular or safe seeds may be emitted to
    even though the seed is later dropped due to misconfiguration.
  </summary>
</histogram>

<histogram name="Variations.StickyAfterQuery.Activation"
    enum="FieldTrialNameHash" expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The hash of the study name of a sticky activation study when it is activated
    for the first time (i.e. not sticky from a previous session). Logged for
    verification purposes to verify that studies stay sticky.
  </summary>
</histogram>

<histogram name="Variations.StickyAfterQuery.PrefParse"
    enum="FieldTrialNameHash" expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The hash of the study name of a sticky activation study when it is parsed
    from the pref value. Logged for verification purposes to verify that studies
    stay sticky.
  </summary>
</histogram>

<histogram name="Variations.StoreSeed.DataSize" units="KiB"
    expires_after="2027-01-17">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The size of the variations seed data, which may be a partial (delta) or
    compressed (gzip) payload, see Variations.SeedStoreResult.
  </summary>
</histogram>

<histogram name="Variations.StoreSeed.Time" units="ms"
    expires_after="2026-11-15">
  <owner>asvitkine@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The run time of the VariationsSeedStore::StoreSeedData function until the
    callback is called with the result. Changed in M145.
  </summary>
</histogram>

<histogram name="Variations.StoreSeedSignature" enum="VariationSeedSignature"
    expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The result of verifying the variations seed signature, recorded when the
    variations seed is stored to Local State after being retrieved from the
    server.
  </summary>
</histogram>

<histogram name="Variations.TimeSinceLastFetchAttempt" units="minutes"
    expires_after="2027-01-03">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    The time since the previous attempt to fetch the variations seed within the
    same session, with 0 indicating that this is the first attempt. Recorded
    when a variations seed fetch is attempted by the VariationsService.
  </summary>
</histogram>

<histogram name="Variations.UserChannel" enum="UserChannels"
    expires_after="2026-09-27">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Log the user channel assigned at browser startup used for evaluating the
    variations seeds.
  </summary>
</histogram>

<histogram name="Variations.VariationsStateEncryptionStatus"
    enum="VariationsStateEncryptionStatus" expires_after="2026-10-11">
  <owner>svenzheng@google.com</owner>
  <owner>vivianz@google.com</owner>
  <summary>
    Capture the status of variations state encryption in Chrome feedback report.
  </summary>
</histogram>

<histogram name="Variations.WebViewDownloadJobInterval" units="minutes"
    expires_after="2027-02-14">
  <owner>ntfschr@chromium.org</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    The time between the start of two consecutive WebView seed downloads by
    WebView's service. This metric will not be written if seeds are never
    downloaded.
  </summary>
</histogram>

<histogram name="Variations.WebViewDownloadJobQueueTime" units="minutes"
    expires_after="2027-02-14">
  <owner>ntfschr@chromium.org</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    The delay between when a WebView seed download was scheduled by the service
    with the JobScheduler and when it was executed.
  </summary>
</histogram>

<histogram name="Variations.{Mode}CreateTrials.SeedExpiry"
    enum="VariationsSeedExpiry" expires_after="2027-01-31">
  <owner>asvitkine@chromium.org</owner>
  <owner>rkaplow@chromium.org</owner>
  <owner>src/base/metrics/OWNERS</owner>
  <summary>
    Stores the state of the loaded variations seed, e.g. not expired. Recorded
    after the seed is loaded and before trials are created from the seed. Note
    that seeds for which this metric is recorded may not be applied, e.g. when
    the seed has expired.

    {Mode}
  </summary>
  <token key="Mode">
    <variant name=""
        summary="Recorded for all successfully loaded seeds. Not recorded in
                 variations safe mode. Note that the concept of an expired
                 seed changed in M93. Prior to M93, expired seeds were those
                 that were more than 30 days old. As of M93, seeds that are
                 older than 30 days and older than the binary's build time
                 are considered expired."/>
    <variant name="SafeMode."
        summary="Recorded for safe seeds when Chrome attempts to run in
                 variations safe mode. This metric was added in M93."/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
