chromium/tools/metrics/histograms/metadata/cookie/histograms.xml

<!--
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 Cookie 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
[email protected].
-->

<histogram-configuration>

<histograms>

<histogram name="Cookie.AndroidOTRRestore" enum="BooleanEnabled"
    expires_after="2025-04-19">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    Emits when a cookie restore is attempted by Android Incognito Mode session
    restoration. This happens if an in-progress incognito session is killed by
    the system (e.g., memory pressure) and not by the user.

    The enum value is true when the cookie was restored properly and false if it
    was rejected. Rejection should be rare as the cookies are directly written
    out by the system.
  </summary>
</histogram>

<histogram name="Cookie.AvgCookieJarSizePerKey" units="kibibytes"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the average sum of the sizes of the name and value of
    all cookies per domain. This metric is recorded every 10 minutes.
  </summary>
</histogram>

<histogram name="Cookie.ClockSkew.ExpiredWithoutSkew" enum="Boolean"
    expires_after="2025-04-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    For each cookie expiry, logs true if the cookie would have been expired
    without the addition of the skew time. Otherwise, logs false. This metric is
    collected during CanonicalCookie::Create() in a helper function that
    calculates cookie expiry.
  </summary>
</histogram>

<histogram name="Cookie.ClockSkew.{SkewDirection}" units="minutes"
    expires_after="2025-04-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    For each cookie expiry, count the length of the clock skew (current_time -
    server_time). {SkewDirection} This metric is collected during
    CanonicalCookie::Create() in a helper function that calculates cookie
    expiry.
  </summary>
  <token key="SkewDirection">
    <variant name="AddMinutes"
        summary="The raw clock skew value was positive or zero, so these
                 cookies were adjusted to expire later."/>
    <variant name="AddMinutes12To24Hours"
        summary="The raw clock skew value was positive, so these cookies were
                 adjusted to expire later. The range of bucket values for
                 this metric is 720 to 1440 minutes (12 to 24 hours)."/>
    <variant name="SubtractMinutes"
        summary="The raw clock skew value was negative, so these cookies were
                 adjusted to expire quicker. This histogram can only record
                 positive values, so all counts are adjusted to their
                 positive counterparts."/>
    <variant name="SubtractMinutes12To24Hours"
        summary="The raw clock skew value was negative, so these cookies were
                 adjusted to expire quicker. This histogram can only record
                 positive values, so all counts are adjusted to their
                 positive counterparts.The range of bucket values for this
                 metric is 720 to 1440 minutes (12 to 24 hours)."/>
    <variant name="WithoutAddMinutesExpires"
        summary="The raw clock skew value was positive AND the addition of
                 these minutes caused the cookie to delay expiring until
                 later. If this cookie was not adjusted for clock skew, it
                 would have expired immediately."/>
  </token>
</histogram>

<histogram name="Cookie.CommitProblem" enum="CookieCommitProblem"
    expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <summary>
    Recorded when a problem occurs trying to commit changes to the cookie store
    back to disk, in the SQLite store.
  </summary>
</histogram>

<histogram name="Cookie.CookieJarSize" units="kibibytes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the sum of the sizes of the name and value of all
    cookies in the cookie jar. This metric is recorded every 10 minutes.
  </summary>
</histogram>

<histogram name="Cookie.CookiePartitionSizeKibibytes" units="kibibytes"
    expires_after="2024-10-01">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the sum of the sizes of the name and value of all
    cookies in a single partition of the partitioned cookie jar. This metric is
    recorded every 10 minutes and emits one event per partition. This metric is
    only recorded when partitioned cookies are enabled.
  </summary>
</histogram>

<histogram name="Cookie.CookiePrefix" enum="CookiePrefix"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <summary>
    Number of times a cookie was set with a name prefixed by
    &quot;__Secure-&quot; or &quot;__Host-&quot; (prefixes reserved by
    https://tools.ietf.org/html/draft-west-cookie-prefixes).
  </summary>
</histogram>

<histogram name="Cookie.CookieSchemeRequestScheme" enum="CookieRequestScheme"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The scheme a cookie was set by and the scheme of the request that the cookie
    was sent to. This is recorded once per cookie each time a URL request has
    its headers set.
  </summary>
</histogram>

<histogram name="Cookie.CookieSourceScheme" enum="CookieSourceScheme"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <summary>
    For each cookie added to the store, record whether its source URL has a
    cryptographic scheme, broken down by Secure and not Secure.
  </summary>
</histogram>

<histogram name="Cookie.CookieSourceSchemeName" enum="CookieSourceSchemeName"
    expires_after="2024-12-24">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    For each cookie added to the store, record the source URL's scheme. Schemes
    we're unfamiliar with will be put into the &quot;Other Scheme&quot; bucket.
  </summary>
</histogram>

<histogram name="Cookie.CorruptMetaTableRecovered" enum="Boolean"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This metric records whether the DB could be reinitialized after corruption.
    Note that corruption could occur due to attempting to load an unsupported
    variant of the cookie db (e.g., code supports v15+ and tries to load v12).
    If recorded as true, recovery was possible. If recorded as false, then
    recovery was not possible for some reason. The latter should be rare. This
    metric is recorded when the cookie DB is first initialized.
  </summary>
</histogram>

<histogram name="Cookie.Count2" units="units" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of cookies in the store (recorded every 10 minutes of active browsing
    time), with a wider range than Cookie.Count.
  </summary>
</histogram>

<histogram
    name="Cookie.CrossSiteRedirectDowngradeChangesInclusion2.{AccessType}"
    enum="CookieSameSite2" expires_after="2025-03-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The SameSite attribute of a cookie whose inclusion is changed by considering
    redirects as part of the same-site context calculation. I.e., this is logged
    for cookies which are included if not considering redirects when calculating
    the same-site context, but are excluded (solely due to the SameSite
    attribute) if cross-site redirects can cause a request to be considered
    cross-site. This is only recorded for cookies accessed over HTTP, since
    redirects are not relevant for JS cookie accesses. This is logged for each
    cookie (whose inclusion is changed) when it is {AccessType}, regardless of
    whether the cookie was ultimately included.
  </summary>
  <token key="AccessType">
    <variant name="Read" summary="read for a request"/>
    <variant name="Write" summary="set by a response"/>
  </token>
</histogram>

<histogram name="Cookie.CrossSiteRedirectDowngradeChangesInclusionAge"
    units="minutes" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The age of the cookie within [0,30) minutes, rounded down to the nearest
    minute, whose inclusion is changed by considering redirects as part of the
    same-site context calculation. (See
    Cookie.CrossSiteRedirectDowngradeChangesInclusion2's summary for more info.)

    This is only recorded for cookies accessed via an HTTP request and is logged
    for each cookie whose inclusion was changed regardless of whether the cookie
    was ultimately included or not.
  </summary>
</histogram>

<histogram name="Cookie.CrossSiteRedirectDowngradeChangesInclusionHttpMethod"
    enum="HttpMethods" expires_after="2024-11-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The HTTP method of the request for the cookie whose inclusion is changed by
    considering redirects as part of the same-site context calculation. (See
    Cookie.CrossSiteRedirectDowngradeChangesInclusion2's summary for more info.)

    This is only recorded for cookies accessed over HTTP and is logged for each
    cookie whose inclusion was changed regardless of whether the cookie was
    ultimately included or not.
  </summary>
</histogram>

<histogram name="Cookie.CrossSiteRedirectType.{AccessType}"
    enum="ContextRedirectTypeBug1221316" expires_after="2025-01-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The type of redirects a cookie experienced before ultimately being accessed.
    This metric is triggered whenever a cookie is attempted to be accessed by an
    HTTP request or response. It does not matter if the access succeeds, only
    that one was attempted.

    The metrics exists primarily to act as a denominator for
    Cookie.CrossSiteRedirectDowngradeChangesInclusion2.{AccessType}.
  </summary>
  <token key="AccessType">
    <variant name="Read" summary="read for a request"/>
    <variant name="Write" summary="set by a response"/>
  </token>
</histogram>

<histogram name="Cookie.DaysSinceRefreshForRetrieval" units="days"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of days since a cookie was updated, collected when cookies are loaded
    into memory at browser start. This is used to track how many cookies are in
    danger of expiring due to the proposed 400 day maximum expiration day limit.
  </summary>
</histogram>

<histogram name="Cookie.DomainHasNonASCII" enum="Boolean"
    expires_after="2024-11-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Whether a site tried to set a cookie with a Domain attribute that has at
    least one non-ASCII character in it.

    This metric is recorded everytime a cookie is created from a string (i.e.
    when it is set via Set-Cookie or document.cookie write), regardless of
    whether or not the cookie is ultimately stored.
  </summary>
</histogram>

<histogram name="Cookie.DomainSet" enum="Boolean" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Was a cookie set with a Domain attribute.

    This metric is recorded once per included cookie on every set attempt.
  </summary>
</histogram>

<histogram name="Cookie.DoubleUnderscorePrefixedName" enum="Boolean"
    expires_after="2025-01-07">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records if a cookie has a double underscore prefixed name, excluding the
    cookie prefixes. I.e.: __Secure- and __Host- prefixed names are ignored.

    This metric is recorded every time a cookie is successfully created using
    CanonicalCookie::Create.
  </summary>
</histogram>

<histogram name="Cookie.ErrorInitializeDB" enum="SqliteLoggedResultCode"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The exact database error encountered if initializing the cookies database
    fails catastrophically. Initializing the cookies database happens once per
    network context configured with persistent cookies, so this metric could be
    reported multiple times from the same client. Catastrophic errors are
    defined in sql::IsErrorCatastrophic.
  </summary>
</histogram>

<histogram name="Cookie.Experimental.CookiesAllowedForUrlsUsage"
    enum="CookiesAllowedForUrlsUsage" expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records what types of rules are present in the CookiesAllowedForUrls policy.
    This policy supports content settings that only apply to the cookie's site,
    only apply to the top-level site, and rules that apply to both. This
    histogram is recorded when the CookiesAllowedForUrls policy is first loaded.
    Only recorded when the policy contains at least one valid rule.
  </summary>
</histogram>

<histogram name="Cookie.ExpirationDuration400DaysGT" units="days"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of days until a cookie expires when set (for values over the
    rfc6265bis limit of 400 days).
  </summary>
</histogram>

<histogram name="Cookie.ExpirationDuration400DaysLTE" units="days"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of days until a cookie expires when set (for values under or equal to
    the rfc6265bis limit of 400 days).
  </summary>
</histogram>

<histogram name="Cookie.ExpirationDurationMinutesNonSecure" units="minutes"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Number of minutes until non-Secure cookie expires when set.</summary>
</histogram>

<histogram name="Cookie.ExpirationDurationMinutesSecure" units="minutes"
    expires_after="2024-12-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Number of minutes until Secure cookie expires when set.</summary>
</histogram>

<histogram name="Cookie.FirstPartyPartitioned.HasCrossSiteAncestor"
    enum="BooleanPresent" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the presence/absence of a cross-site ancestor when a
    first-party Partitioned cookie is accessed. This metric is recorded each
    time the IncludeForRequestURL method is called on a CanonicalCookie that is
    first-party partitioned.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.ComponentSetsNonfatalErrors"
    units="sets" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This histogram keeps count of how many First-Party Sets are not successfully
    parsed while initializing the First-Party Sets component, but do not cause a
    fatal error.

    This metric is recorded by the FirstPartySetParser when it has successfully
    finished processing all sets from its input stream, as passed by the
    FirstPartySetsLoader.

    The metric is recorded during the startup of each client if it was able to
    process the whole component without encountering a fatal error. It will be
    recorded at most once each time the client starts up.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.ComponentSetsParsedSuccessfully"
    units="sets" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This histogram keeps count of how many First-Party Sets are successfully
    parsed while initializing the First-Party Sets component.

    This metric is recorded by the FirstPartySetParser when it has succesfully
    finished processing all sets from its input stream, as passed by the
    FirstPartySetsLoader.

    The metric is recorded during the startup of each client if it was able to
    process the whole component without encountering a fatal error. It will be
    recorded at most once each time the client starts up.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.ContextDelayedQueriesCount"
    units="queries" expires_after="2024-09-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of queries that were delayed for a browser context (i.e. answered
    asynchronously instead of synchronously).

    Recorded once per profile during log-in when the First-Party Sets info is
    ready for the network context. If the feature was disabled, 0 is recorded.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.ContextMostDelayedQueryDelta" units="ms"
    expires_after="2024-09-15">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The length of time between when the first asynchronous query was received,
    and when asynchronous queries started to be answered for a browser context.

    Recorded once per profile profile during log-in when the First-Party Sets
    info is ready in the network context. Recorded for all clients, even those
    with low-resolution clocks. If the feature was disabled, 0 is recorded.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.EnqueueingDelay.{QueryType}" units="ms"
    expires_after="2025-08-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The amount of time an asynchronous {QueryType} query was delayed before it
    was answered.

    Recorded once for each query that is answered asynchronously, when the
    callback is invoked. Recorded for all clients, even those with
    low-resolution clocks.
  </summary>
  <token key="QueryType">
    <variant name="ComputeMetadata3"/>
    <variant name="ContextConfig2"/>
  </token>
</histogram>

<histogram name="Cookie.FirstPartySets.FindOwner.Latency" units="microseconds"
    expires_after="M134">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This histogram records the (TimeTicks) latency of computing the owner of a
    given domain.

    This metric is sampled every time an owner is computed. (E.g., a single time
    when computing a partition key involving First-Party Sets; multiple times
    when computing a SamePartyContext.) Only sampled for users with
    high-resolution clocks.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.InitializationDuration.{Landmark}2"
    units="ms" expires_after="2025-02-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The amount of time taken until {Landmark} during First-Party Sets
    initialization. Each sample is measured starting from the moment the
    FirstPartySets instance is constructed.

    Each metric is recorded once when the First-Party Sets objects are
    initialized in the Network Service. (Note that this may happen multiple
    times during a single Chrome session, if the Network Service crashes and
    restarts.) Recorded for all clients, even those with low-resolution clocks.
  </summary>
  <token key="Landmark">
    <variant name="ContextReadyToServeQueries"/>
    <variant name="ReadCommandLineSet"/>
    <variant name="ReadComponentSets"/>
    <variant name="ReadyToServeQueries"/>
  </token>
</histogram>

<histogram name="Cookie.FirstPartySets.ProcessedEntireComponent"
    enum="BooleanSuccess" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This histogram tracks whether the First-Party Sets component was able to
    process all sets while starting up, or if it had to abort during the process
    due to encountering a fatal error.

    The metric will be recorded at most once each time the client starts up.
  </summary>
</histogram>

<histogram name="Cookie.FirstPartySets.{Context}.DelayedQueriesCount"
    units="queries" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of queries that were delayed (i.e. answered asynchronously
    instead of synchronously).

    Recorded once during initialization, for each context. (This means once per
    browser-run in the browser process; and once each time the Network Service
    is started.) The metric is emitted even when First-Party Sets is disabled.
  </summary>
  <token key="Context">
    <variant name="Browser"/>
    <variant name="Network"/>
  </token>
</histogram>

<histogram name="Cookie.FirstPartySets.{Context}.MostDelayedQueryDelta"
    units="ms" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The length of time between when the first asynchronous query was received,
    and when asynchronous queries started to be answered.

    Recorded once during initialization, for each context. (This means once per
    browser-run in the browser process; and once each time the Network Service
    is started.) Recorded for all clients, even those with low-resolution
    clocks.

    If the context was initialized before any queries were made (including if
    the feature is disabled entirely), 0 is recorded.
  </summary>
  <token key="Context">
    <variant name="Browser"/>
    <variant name="Network"/>
  </token>
</histogram>

<histogram name="Cookie.FromStorageWithValidLength" enum="BooleanValid"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If a canonical cookie has a valid name+value length. Logged whenever a
    cookie is created FromStorage and if this cookie IsCanonical.
  </summary>
</histogram>

<histogram name="Cookie.HasNonASCII.{CookieField}" enum="Boolean"
    expires_after="2025-02-04">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If a cookie's {CookieField} field contains a non-ASCII character.
    Informally, this indicates if the field contains a (non-ASCII) Unicode
    character. Logged whenever a cookie is created via
    CanonicalCookie::Create().
  </summary>
  <token key="CookieField">
    <variant name="Name"/>
    <variant name="Value"/>
  </token>
</histogram>

<histogram name="Cookie.IncludedRequestEffectiveSameSite"
    enum="CookieEffectiveSameSite" expires_after="2024-11-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The value of the effective samesite for cookies that will be included in a
    request. Logged once per successful inclusion.
  </summary>
</histogram>

<histogram name="Cookie.IncludedResponseEffectiveSameSite"
    enum="CookieEffectiveSameSite" expires_after="2024-12-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The value of the effective samesite for cookies that will be accepted from a
    response. Logged once per successful inclusion.
  </summary>
</histogram>

<histogram name="Cookie.IsPartitionedValid" enum="BooleanValid"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    If a cookie line contains the Partitioned attribute, this histogram logs
    whether it was used correctly (must have a __Host- prefix and must not have
    the SameParty attribute). Logged whenever a cookie is created from a string
    (from a Set-Cookie header or a write to document.cookie).
  </summary>
</histogram>

<histogram name="Cookie.LoadProblem" enum="CookieLoadProblem"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <summary>
    Recorded when a problem is recorded when loading the persistent cookie
    store.
  </summary>
</histogram>

<histogram name="Cookie.MaxCookieJarSizePerKey" units="kibibytes"
    expires_after="2024-11-03">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the maximum sum of the sizes of the name and value of
    all cookies that a single domain is using. This metric is recorded every 10
    minutes.
  </summary>
</histogram>

<histogram name="Cookie.MaxSameSiteNoneCookiesPerKey" units="units"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    Maximum number of SameSite=None cookies that belong to a single domain on
    the client. This histogram will be used to inform the
    per-partition-per-domain limit for partitioned cookies. Recorded every 10
    minutes of active browsing time.
  </summary>
</histogram>

<histogram name="Cookie.NameOrValueHtab" enum="Boolean"
    expires_after="2025-01-12">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records whether or not a cookie has internal HTABs in either its name or
    value. Leading and trailing HTABs are ignored.

    This metric is recorded every time CanonicalCookie::Create is called,
    regardless whether the cookie is successfully created or not.
  </summary>
</histogram>

<histogram name="Cookie.NumKeys" units="keys" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of distinct keys (eTLD+1's) that have any stored cookies
    (which may or may not be expired). Recorded every 10 minutes of active
    browsing time.
  </summary>
</histogram>

<histogram name="Cookie.OnCookiesAccessed.BatchSize" units="accesses"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of cookie access details batches received in
    RenderFrameHostImpl. Recorded every time accesses are reported from the
    network service.
  </summary>
</histogram>

<histogram name="Cookie.OnCookiesAccessed.TotalAccesses" units="accesses"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the number of cookie access details received in RenderFrameHostImpl.
    Recorded every time accesses are reported from the network service.
  </summary>
</histogram>

<histogram name="Cookie.PartitionCount" units="partitions"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the number of cookie jar partitions. This metric is
    only recorded when partitioned cookies are enabled. This count does not
    include the unpartitioned cookie jar. Only counts cookie jar partitions with
    at least one cookie. This metric is recorded every 10 minutes.
  </summary>
</histogram>

<histogram name="Cookie.PartitionedCookieCount" units="cookies"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the number of cookies in the partitioned cookie jar.
    This metric is only recorded when partitioned cookies are enabled. This
    metric is recorded every 10 minutes.
  </summary>
</histogram>

<histogram name="Cookie.PartitionedCookieCount.{NonceType}" units="cookies"
    expires_after="2024-11-02">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the number of partitioned cookies whose partition key
    is {NonceType}. This metric is only recorded when partitioned cookies are
    enabled. This metric is recorded every 10 minutes.
  </summary>
  <token key="NonceType">
    <variant name="Nonced"/>
    <variant name="Unnonced"/>
  </token>
</histogram>

<histogram name="Cookie.PartitionedCookieJarSizeKibibytes" units="kibibytes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the size of the names and values of all cookies in
    the partitioned cookie jar. This metric is only recorded when partitioned
    cookies are enabled. This metric is recorded every 10 minutes.
  </summary>
</histogram>

<histogram name="Cookie.PartitionedCookieJarSizeKibibytes.{NonceType}"
    units="kibibytes" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the size of the names and values of all cookies in
    the partitioned cookie jar, only counting {NonceType} partitions. This
    metric is only recorded when partitioned cookies are enabled. This metric is
    recorded every 10 minutes.
  </summary>
  <token key="NonceType">
    <variant name="Nonced"/>
    <variant name="Unnonced"/>
  </token>
</histogram>

<histogram name="Cookie.PartitionedCookiesInRequest" units="cookies"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    This histogram records the number of partitioned cookies in requests. Only
    recorded when partitioned cookies are enabled to reduce noise.
  </summary>
</histogram>

<histogram name="Cookie.PerFirstPartySetCount" units="cookies"
    expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This histogram records, for each (nontrivial) First-Party Set, the number of
    cookies in the cookie store that belong to a member or owner of that set.
    Recorded every 10 minutes of active browsing time.
  </summary>
</histogram>

<histogram name="Cookie.Port.OmniboxURLNavigation.Localhost"
    enum="InterestingCookiePorts" expires_after="2024-11-18">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The port of the destination for a URL omnibox navigation when the
    destination is localhost. Excludes navigations that are effectively reloads.
    Also does not take into account any redirects that destination URL may do
    before finally serving a page. In other words, it's the port of the first
    request in a possible chain. Note that the effective port is recorded which
    includes the default port, so if https://google.com is typed then 443 will
    be recorded.

    Cookie.Port.OmniboxURLNavigation.RemoteHost records the non-localhost
    version of this histogram.

    While the intent of this histogram is to inform cookie related design
    decisions, the metric itself does not depend on cookies being sent or set.
  </summary>
</histogram>

<histogram name="Cookie.Port.OmniboxURLNavigation.RemoteHost"
    enum="InterestingCookiePorts" expires_after="2024-11-18">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The port of the destination for a URL omnibox navigation when the
    destination is anything but localhost. Excludes navigations that are
    effectively reloads. Also does not take into account any redirects that
    destination URL may do before finally serving a page. In other words, it's
    the port of the first request in a possible chain. Note that the effective
    port is recorded which includes the default port, so if https://google.com
    is typed then 443 will be recorded.

    Cookie.Port.OmniboxURLNavigation.Localhost records the localhost version of
    this histogram.

    While the intent of this histogram is to inform cookie related design
    decisions, the metric itself does not depend on cookies being sent or set.
  </summary>
</histogram>

<histogram name="Cookie.Port.Read.{HostType}" enum="InterestingCookiePorts"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This is the port a cookie is being read by: For network access via HTTP(S)
    this value is the port of the origin the request is being sent to. For
    script access via non-HTTP APIs this is the value of the port of the origin
    of the frame the read call is made in.

    The &quot;Localhost&quot; variant of this metric is recorded only for
    localhost origns. The &quot;RemoteHost&quot; variant is recorded for all
    other origins.

    This metric is recorded once per included cookie on every read attempt.
  </summary>
  <token key="HostType">
    <variant name="Localhost"/>
    <variant name="RemoteHost"/>
  </token>
</histogram>

<histogram name="Cookie.Port.ReadDiffersFromSet.{HostType}"
    enum="CookieSentToSamePort" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This records if a cookie is being read by the same port value that set it
    (the source port). See Cookie.Port.Set.* and Cookie.Port.Read.* for more
    information on how the port value for setting and reading (respectively) is
    obtained.

    If the source port is unspecified (due to a cookie already existing before
    we started to record this value) or invalid (due to corruption) then this
    metric does not check for destination port equivalency.

    The &quot;Localhost&quot; variant of this metric is recorded only for
    localhost origns. The &quot;RemoteHost&quot; variant is recorded for all
    other origins. The &quot;DomainSet&quot; variant of this metric is recorded
    for all cookies which have the Domain attribute set (localhost and IP
    addresses cannot set the Domain attribute and therefore will not trigger
    this metric. Put technically, the origin must have a non-empty registrable
    domain to set the Domain attribute).

    This metric is recorded once per included cookie on every read attempt.
  </summary>
  <token key="HostType">
    <variant name="DomainSet"/>
    <variant name="Localhost"/>
    <variant name="RemoteHost"/>
  </token>
</histogram>

<histogram name="Cookie.Port.Set.{HostType}" enum="InterestingCookiePorts"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This is the port a cookie is being set by: For network access via HTTP(S)
    this value is the port of the origin the response is being recieved from.
    For script access via non-HTTP APIs this is the value of the port of the
    origin of the frame the set call is made in.

    The &quot;Localhost&quot; variant of this metric is recorded only for
    localhost origns. The &quot;RemoteHost&quot; variant is recorded for all
    other origins.

    This metric is recorded once per included cookie on every set attempt. This
    includes expired cookies which are immediately deleted.
  </summary>
  <token key="HostType">
    <variant name="Localhost"/>
    <variant name="RemoteHost"/>
  </token>
</histogram>

<histogram name="Cookie.RequestSameSiteContext" enum="SameSiteCookieContext"
    expires_after="2025-01-07">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The same-site context of a request, i.e. the relationship between the
    request and the navigational environment. Logged on every request to access
    a cookie.
  </summary>
</histogram>

<histogram name="Cookie.SameSiteAttributeValue" enum="CookieSameSiteString"
    expires_after="2024-09-22">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The value of the cookie's SameSite attribute, if any. This is logged once
    per created cookie, upon parsing of the SameSite attribute from a string.
  </summary>
</histogram>

<histogram name="Cookie.SameSiteNoneSizeBytes" units="bytes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    Size of SameSite=None cookies in bytes. Counted whenever a cookie is set via
    CookieMonster::SetCanonicalCookie.
  </summary>
</histogram>

<histogram name="Cookie.SameSiteNoneSizeBytes.{IsPartitioned}" units="bytes"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    Size of SameSite=None {IsPartitioned} cookies in bytes. Counted whenever a
    cookie is set via CookieMonster::SetCanonicalCookie.
  </summary>
  <token key="IsPartitioned">
    <variant name="Partitioned"/>
    <variant name="Unpartitioned"/>
  </token>
</histogram>

<histogram name="Cookie.ScriptAgeSinceLastUpdateInHoursGTOneWeek" units="hours"
    expires_after="2025-04-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours old a non-session cookie written by a script and being
    loaded for some context is (for values greater than one week). Recorded when
    cookies are loaded from the store.
  </summary>
</histogram>

<histogram name="Cookie.ScriptAgeSinceLastUpdateInHoursLTEOneWeek"
    units="hours" expires_after="2025-04-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours old a non-session cookie written by a script and being
    loaded for some context is (for values less than or equal to one week).
    Recorded when cookies are loaded from the store.
  </summary>
</histogram>

<histogram name="Cookie.ScriptExpirationInHoursGTOneWeek" units="hours"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours in the future a non-session cookie being set via JavaScript
    wants to expire (for values greater than to one week). Recorded when the
    cookie is stored via script.
  </summary>
</histogram>

<histogram name="Cookie.ScriptExpirationInHoursLTEOneWeek" units="hours"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours in the future a non-session cookie being set via JavaScript
    wants to expire (for values less than or equal to one week). Recorded when
    the cookie is stored via script.
  </summary>
</histogram>

<histogram name="Cookie.SessionAgeInHoursGTOneWeek2" units="hours"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours old a session cookie being loaded for some context is (for
    values greater than one week). Recorded when cookies are loaded from the
    store.
  </summary>
</histogram>

<histogram name="Cookie.SessionAgeInHoursLTEOneWeek2" units="hours"
    expires_after="2024-12-01">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours old a session cookie being loaded for some context is (for
    values less than or equal to one week). Recorded when cookies are loaded
    from the store.
  </summary>
</histogram>

<histogram name="Cookie.SessionAgeSinceLastUpdateInHoursGTOneWeek"
    units="hours" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours old a session cookie being loaded for some context is (for
    values greater than one week). Recorded when cookies are loaded from the
    store. Unlike Cookie.SessionAgeInHoursGTOneWeek this metric records the time
    since the last refresh (if any) instead of initial creation.
  </summary>
</histogram>

<histogram name="Cookie.SessionAgeSinceLastUpdateInHoursLTEOneWeek"
    units="hours" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Number of hours old a session cookie being loaded for some context is (for
    values less than or equal to one week). Recorded when cookies are loaded
    from the store. Unlike Cookie.SessionAgeSinceLastUpdateInHoursLTEOneWeek
    this metric records the time since the last refresh (if any) instead of
    initial creation.
  </summary>
</histogram>

<histogram name="Cookie.SourceType" enum="CookieSourceType"
    expires_after="2025-04-08">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    For each cookie added to the store, record the source that wrote it. This
    helps understand the balance of cookies written by HTTP Headers, JavaScript,
    etc.
  </summary>
</histogram>

<histogram name="Cookie.StaleSessionCookiesDeletedOnStartup" units="cookies"
    expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    Records the amount of stale (7 days since last access or update) session
    cookies deleted by SessionRestore after tabs have been restored on browser
    startup.

    See crbug.com/40285083 for more info.
  </summary>
</histogram>

<histogram name="Cookie.TimeBlockedOnLoad" units="ms"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <summary>
    The amount of time (ms) between the cookie store load starting and
    completing.
  </summary>
</histogram>

<histogram name="Cookie.TimeDatabaseMigrationToV19" units="ms"
    expires_after="2025-09-22">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to migrate a v18 cookie database to v19. Migration
    occurs upon first startup of a browser version with v18 database code.
  </summary>
</histogram>

<histogram name="Cookie.TimeDatabaseMigrationToV20" units="ms"
    expires_after="2025-11-14">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to migrate a v19 cookie database to v20. Migration
    occurs upon first startup of a browser version with v19 database code.
  </summary>
</histogram>

<histogram name="Cookie.TimeDatabaseMigrationToV21" units="ms"
    expires_after="2025-11-22">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to migrate a v20 cookie database to v21. Migration
    occurs upon first startup of a browser version with v20 database code.
  </summary>
</histogram>

<histogram name="Cookie.TimeDatabaseMigrationToV22" units="ms"
    expires_after="2026-03-22">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to migrate a v21 cookie database to v22. Migration
    occurs upon first startup of a browser version with v21 database code.
  </summary>
</histogram>

<histogram name="Cookie.TimeDatabaseMigrationToV23" units="ms"
    expires_after="2026-04-10">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to migrate a v22 cookie database to v23. Migration
    occurs upon first startup of a browser version with v22 database code.
  </summary>
</histogram>

<histogram name="Cookie.TimeDatabaseMigrationToV24" units="ms"
    expires_after="2025-07-31">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to migrate a v23 cookie database to v24. Migration
    occurs upon first startup of a browser version with v23 database code.
  </summary>
</histogram>

<histogram name="Cookie.TimeInitializeDB" units="ms" expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>The amount of time (ms) to initialize the cookies database.</summary>
</histogram>

<histogram name="Cookie.TimeOpsBlockedDueToGlobalOp" units="ms"
    expires_after="2025-05-30">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) cookie operations are blocked due to a global
    operation happening on startup. 0 if this didn't happen.

    Recorded after all cookies finished loading from disk for a given cookie
    store.
  </summary>
</histogram>

<histogram name="Cookie.TimeToRecordPeriodicStats" units="ms"
    expires_after="2024-12-30">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The amount of time (ms) to record periodic statistics for logging. This
    metric is recorded every 10 minutes.
  </summary>
</histogram>

<histogram name="Cookie.Type2" enum="CookieType" expires_after="2025-03-28">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    For each cookie added to the store, record it's type(s). A new enumeration
    value, Persistent, was added in M125.
  </summary>
</histogram>

<histogram name="Cookie.WinGetLastErrorInitializeDB" enum="WinGetLastError"
    expires_after="2024-05-19">
  <owner>[email protected]</owner>
  <owner>src/net/cookies/OWNERS</owner>
  <summary>
    The result of calling ::GetLastError if initializing the cookies database
    fails catastrophically. Initializing the cookies database happens once per
    network context configured with persistent cookies, so this metric could be
    reported multiple times from the same client. Catastrophic errors are
    defined in sql::IsErrorCatastrophic. This metric is only reported on
    Windows.
  </summary>
</histogram>

</histograms>

</histogram-configuration>