<!--
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 Storage 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="CompressionState">
  <variant name="Compressed"
      summary="Compressing achieved the minimum ratio (value was stored
               compressed)"/>
  <variant name="Uncompressed"
      summary="Compressing did not achieve the minimum ratio (value was
               stored uncompressed)"/>
</variants>

<variants name="DomStorageBackingStoreLifetime">
  <variant name="InMemory" summary="in-memory database"/>
  <variant name="OnDisk" summary="on-disk database"/>
  <variant name="OnDiskExperimental"
      summary="experimental (belongs to the treatment or control group of an
               experiment targeting on-disk databases for new databases)"/>
</variants>

<variants name="DomStorageRecoveryReason">
  <variant name="CommitErrorThresholdExceeded"/>
  <variant name="MetadataReadFailure"/>
  <variant name="OpenFailure"/>
</variants>

<variants name="DomStorageSqliteRolloutStage">
  <variant name=""
      summary="on-disk database not participating in the SQLite rollout
               experiment"/>
  <variant name=".OnDiskExperimental"
      summary="experimental (belongs to the treatment or control group of the
               SQLite rollout experiment)"/>
</variants>

<variants name="DomStorageType">
  <variant name="LocalStorage" summary="local storage"/>
  <variant name="SessionStorage" summary="session storage"/>
</variants>

<variants name="IndexedDBBackingStoreType">
  <variant name="Experimental"
      summary="experimental (belongs to the treatment or control group of an
               experiment targeting on-disk backing stores)"/>
  <variant name="InMemory" summary="in-memory"/>
  <variant name="OnDisk" summary="on-disk"/>
</variants>

<variants name="IndexedDBTransactionCount">
  <variant name="" summary="Always recorded"/>
  <variant name="10kTransactions."
      summary="Recorded when there are &gt;10k transactions on the connection"/>
</variants>

<variants name="IndexedDBTransactionMode">
  <variant name="ReadOnly"/>
  <variant name="ReadWrite"/>
  <variant name="VersionChange"/>
</variants>

<variants name="InterestGroupStorageProtoType">
  <variant name="AdProtos" summary="AdProtos"/>
  <variant name="BiddingAndAuctionServerKeyProtos"
      summary="BiddingAndAuctionServerKeyProtos"/>
  <variant name="KAnonKeyProtos" summary="KAnonKeyProtos"/>
  <variant name="ListOfOrigins" summary="ListOfOrigins"/>
  <variant name="ListOfTimestamps" summary="ListOfTimestamps"/>
</variants>

<variants name="LevelDBEnvTypes">
  <variant name="IDB." summary="Restricted to IndexedDB LevelDB environments"/>
  <variant name="ServiceWorker."
      summary="Restricted to ServiceWorker LevelDB environments"/>
</variants>

<variants name="LocalStorageSizes">
  <variant name="" summary=""/>
  <variant name="1MBTo5MB" summary="DB size between 1MB and 5MB."/>
  <variant name="100KBTo1MB" summary="DB size between 100KB and 1MB."/>
  <variant name="Under100KB" summary="DB size under 100KB."/>
</variants>

<histogram
    name="API.EffectiveStorageAccess.AllowedByStorageAccessType.Subsampled"
    enum="AllowedByStorageAccessType" expires_after="2026-10-10">
  <owner>selya@chromium.org</owner>
  <owner>cfredric@chromium.org</owner>
  <summary>
    Records whether storage-access or top-level-storage-access allow access to
    cookies in a given context. This will be recorded every time cookies are
    read or set.

    Subsampled to 1% of all cases.
  </summary>
</histogram>

<histogram name="API.StorageAccess.AllowedRequests4.Subsampled"
    enum="StorageAccessResult" expires_after="2026-10-25">
  <owner>mkwst@chromium.org</owner>
  <owner>brandm@microsoft.com</owner>
  <owner>cfredric@chromium.org</owner>
  <summary>
    Records if various requests to access storage are allowed or not and if the
    Storage Access API unblocked the request or not. Recorded whenever a
    decision to access storage like getting/setting cookies or opening an
    indexeddb connection is made in CookieSettings.

    Subsampled to 1% of all cases.
  </summary>
</histogram>

<histogram name="API.StorageAccess.DocumentInheritedStorageAccess"
    enum="BooleanInherited" expires_after="2027-01-26">
  <owner>cfredric@chromium.org</owner>
  <owner>johannhof@chromium.org</owner>
  <summary>
    Records whether or not a document inherited the `has_storage_access` bit
    from the previous document.

    Recorded once at document commit, for every document.
  </summary>
</histogram>

<histogram name="API.StorageAccess.DocumentLoadedWithStorageAccess"
    enum="Boolean" expires_after="2026-11-15">
  <owner>cfredric@chromium.org</owner>
  <owner>johannhof@chromium.org</owner>
  <summary>
    Records whether or not a document was loaded with the `has_storage_access`
    bit set to true.

    Recorded once at document commit, for every document.
  </summary>
</histogram>

<histogram name="API.StorageAccess.GrantIsImplicit" enum="BooleanAvailable"
    expires_after="2023-03-12">
  <owner>mkwst@chromium.org</owner>
  <owner>brandm@microsoft.com</owner>
  <summary>
    Records if a generated grant was implicit or explicit at the time it was
    created.

    Warning: this histogram was expired from 2020-11-27 to 08-12-2022; data may
    be missing.
  </summary>
</histogram>

<histogram name="API.StorageAccessHeader.ActivateStorageAccessLoadOutcome"
    enum="ActivateStorageAccessLoadOutcome" expires_after="2027-01-04">
  <owner>sledoux@chromium.org</owner>
  <owner>cfredric@chromium.org</owner>
  <summary>
    Records instances of HTTP responses that include the
    `Activate-Storage-Access` header with a well-formed value indicating the
    server would like the response to be loaded with an active storage access
    permission. Logs whether the header was honored, or the reason for its
    rejection if it was not.

    Recorded for each HTTP response received that contains a
    `Activate-Storage-Access` header with the value of `load`.
  </summary>
</histogram>

<histogram name="API.StorageAccessHeader.StorageAccessStatusOutcome"
    enum="StorageAccessStatusOutcome" expires_after="2027-01-24">
  <owner>sledoux@chromium.org</owner>
  <owner>cfredric@chromium.org</owner>
  <summary>
    Records whether an HTTP request contains the `Sec-Fetch-Storage-Access`
    header. If the request did contain the header, it also logs what value of
    the header was; if the request did not contain the header, it logs why the
    header was omitted.

    Recorded whenever an HTTP request is sent.
  </summary>
</histogram>

<histogram name="API.TopLevelStorageAccess.RequestOutcome"
    enum="TopLevelStorageAccessRequestOutcome" expires_after="2027-01-17">
  <owner>cfredric@chromium.org</owner>
  <owner>mreichhoff@chromium.org</owner>
  <summary>
    Records the outcome of a particular Top-Level Storage Access API permission
    request.

    Recorded at the time of the request, for every request.
  </summary>
</histogram>

<histogram name="API.TopLevelStorageAccess.RequestStorageAccessFor2"
    enum="RequestStorageResult" expires_after="2027-02-14">
  <owner>cfredric@chromium.org</owner>
  <owner>mreichhoff@chromium.org</owner>
  <summary>
    Records invocations of document.requestStorageAccessFor and reasons the
    request was approved or rejected. Recorded for every call to the function,
    regardless of outcome. Note that API.StorageAccess.RequestStorageAccess is
    similar, but for the other variant of this API.
  </summary>
</histogram>

<histogram name="Clipboard.Read" enum="ClipboardFormatRead"
    expires_after="2026-12-27">
  <owner>huangdarwin@chromium.org</owner>
  <owner>src/ui/base/clipboard/OWNERS</owner>
  <summary>
    Counts how often each Clipboard format is read by the platform clipboard.
    These reads generally imply that an application requested this format after
    checking that the format is available, but there are some cases where Chrome
    reads a format to check for existence (outside the
    ui::Clipboard::ReadAvailableTypes() function). Please prefer interpreting
    these numbers as relative use changes, as opposed to absolute user usage.
  </summary>
</histogram>

<histogram name="Clipboard.TimeIntervalBetweenCommitAndRead" units="ms"
    expires_after="2024-06-01">
  <owner>dcheng@chromium.org</owner>
  <owner>src/ui/base/clipboard/OWNERS</owner>
  <summary>
    Records the time interval between when clipboard data was committed to the
    clipboard and the same clipboard data was read from the clipboard. The same
    clipboard data may be read multiple times. Emitted at the moment the
    clipboard data was read. Currently only implemented for Chrome OS' in-memory
    clipboard (`ui::ClipboardNonBacked`).
  </summary>
</histogram>

<histogram name="Clipboard.Write" enum="ClipboardFormatWrite"
    expires_after="2026-12-27">
  <owner>huangdarwin@chromium.org</owner>
  <owner>src/ui/base/clipboard/OWNERS</owner>
  <summary>
    Counts how often each Clipboard format is written by the platform clipboard.
    These writes all imply that an application had this format available, and
    therefore wrote this format.
  </summary>
</histogram>

<histogram name="Clipboard.Write.Text.{TextGranularity}Count" units="count"
    expires_after="2027-05-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>src/ui/base/clipboard/OWNERS</owner>
  <summary>
    Records the number of {TextGranularity} in the text that is written to the
    clipboard. Recorded each time a text copy is written.
  </summary>
  <token key="TextGranularity">
    <variant name="Character"/>
    <variant name="Word"/>
  </token>
</histogram>

<histogram
    name="IndexedDB.BackendDuration.WriteBlobs.{IndexedDBBackingStoreType}"
    units="ms" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the total elapsed time between the start of a transaction commit in the
    backend (browser process), which is when blob writing begins, and when the
    blobs are reported as successfully written. Not logged for transactions that
    do not write blobs.
  </summary>
</histogram>

<histogram
    name="IndexedDB.BackendDuration.{Operation}.{IndexedDBBackingStoreType}"
    units="ms" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the duration of the synchronous work performed in the backend (browser
    process) for the operation {Operation} on an {IndexedDBBackingStoreType}
    backing store. Logged once for each successful operation that calls into the
    backing store (i.e., is non-trivial).
  </summary>
  <token key="Operation">
    <variant name="AdvanceCursor"/>
    <variant name="BeginTransaction"/>
    <variant name="ChangeDatabaseVersion"/>
    <variant name="ClearObjectStore"/>
    <variant name="CloseBackingStore"/>
    <variant name="CommitTransaction"/>
    <variant name="ContinueCursor"/>
    <variant name="CountRecords"/>
    <variant name="CreateDatabase"/>
    <variant name="CreateIndex"/>
    <variant name="CreateObjectStore"/>
    <variant name="DeleteDatabase"/>
    <variant name="DeleteIndex"/>
    <variant name="DeleteObjectStore"/>
    <variant name="DeleteRecordRange"/>
    <variant name="GetAllRecords"/>
    <variant name="GetDatabaseInfo"/>
    <variant name="GetKeyGeneratorCurrentNumber"/>
    <variant name="GetRecord"/>
    <variant name="OpenCursor"/>
    <variant name="OpenDatabase"/>
    <variant name="PrefetchCursor"/>
    <variant name="PutRecord"/>
    <variant name="RenameIndex"/>
    <variant name="RenameObjectStore"/>
    <variant name="RunIdleTasks"/>
    <variant name="RunLongIdleTasks"/>
    <variant name="SetIndexKeys"/>
  </token>
</histogram>

<histogram name="IndexedDB.BackingStore.ReadBlob.{IndexedDBBackingStoreType}"
    enum="NetErrorCodes" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the result of each attempt to read the bytes corresponding to a
    blink.mojom.Blob or storage.mojom.BlobDataItem from an
    {IndexedDBBackingStoreType} backing store only (i.e., not from pending blobs
    which are yet to be written to the store). Logged when streaming completes,
    successfully or otherwise. The source of the bytes may be a file as in the
    case of LevelDB, or a blob streaming handle as in the case of SQLite. This
    histogram gates rollout of the SQLite backing store.
  </summary>
</histogram>

<histogram
    name="IndexedDB.BackingStore.{Operation}.{IndexedDBBackingStoreType}"
    enum="IndexedDbStatusType" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the result of the operation {Operation} on an
    {IndexedDBBackingStoreType} backing store. An operation is a group of one or
    more calls into the backing store performed together (i.e., synchronously).
    Collectively, these histograms gate rollout of the SQLite backing store.
  </summary>
  <token key="Operation">
    <variant name="AdvanceCursor"/>
    <variant name="BeginTransaction"/>
    <variant name="ChangeDatabaseVersion"/>
    <variant name="ClearObjectStore"/>
    <variant name="CommitPhaseOne"/>
    <variant name="CommitPhaseTwo"/>
    <variant name="ContinueCursor"/>
    <variant name="CountRecords"/>
    <variant name="CreateIfMissing"/>
    <variant name="CreateIndex"/>
    <variant name="CreateObjectStore"/>
    <variant name="CreateOrOpenDatabase"/>
    <variant name="DeleteDatabase"/>
    <variant name="DeleteIndex"/>
    <variant name="DeleteObjectStore"/>
    <variant name="DeleteRecordRange"/>
    <variant name="GetAllRecords"/>
    <variant name="GetDatabaseNamesAndVersions"/>
    <variant name="GetKeyGeneratorCurrentNumber"/>
    <variant name="GetRecord"/>
    <variant name="OpenCursor"/>
    <variant name="PrefetchCursor"/>
    <variant name="PutRecord"/>
    <variant name="RenameIndex"/>
    <variant name="RenameObjectStore"/>
    <variant name="SetIndexKeys"/>
    <variant name="WriteBlobs"/>
  </token>
</histogram>

<histogram name="IndexedDB.BadMessageReason" enum="IndexedDBBadMessageReason"
    expires_after="2027-08-08">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the reason that an IndexedDB Mojo request was reported as a bad
    message. Recorded immediately before the bad message is reported to the Mojo
    framework.
  </summary>
</histogram>

<histogram name="IndexedDB.ClientKeepActiveRemotesCount" units="count"
    expires_after="2027-02-07">
  <owner>pmonette@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Logs the size of the `client_keep_active_remotes_` RemoteSets. Emitted every
    time a new remote is added.
  </summary>
</histogram>

<histogram name="IndexedDB.ContextShutdownDuration2" units="ms"
    expires_after="2026-10-02">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the time it takes to completely shut down `IndexedDBContextImpl`,
    starting from when it's requested on the UI thread to when the last bucket's
    destruction is completed. This is only recorded for regular (not incognito)
    profiles.
  </summary>
</histogram>

<histogram name="IndexedDB.Create{Mode}Transaction.NumTransactionsInConnection"
    units="transactions" expires_after="2027-02-28">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of transactions that already exist on the same connection. Recorded
    everytime a {Mode} transaction is created. Will be used to diagnose
    crbug.com/381086791. Specifically, we'll assses whether the number of
    clients who get high values for these histograms is similar to the number of
    clients who hit transaction timeouts.
  </summary>
  <token key="Mode" variants="IndexedDBTransactionMode"/>
</histogram>

<histogram name="IndexedDB.Create{Mode}Transaction.NumTransactionsInDatabase"
    units="transactions" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of transactions that already exist on the same database. Recorded
    everytime a {Mode} transaction is created, if the associated database
    exists. Will be used to diagnose crbug.com/381086791. Specifically, we'll
    assses whether the number of clients who get high values for these
    histograms is similar to the number of clients who hit transaction timeouts.
  </summary>
  <token key="Mode" variants="IndexedDBTransactionMode"/>
</histogram>

<histogram
    name="IndexedDB.DatabaseConnectionOpenResult.{IndexedDBBackingStoreType}"
    enum="DatabaseConnectionOpenResult" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The outcome of an IDBFactory::Open request from the browser process's
    perspective for an {IndexedDBBackingStoreType} backing store. Logged once on
    receipt of the request and once at the terminal outcome, which is the point
    after which subsequent results of the request depend on the client's
    response or on external factors such as the bucket being force-closed.
  </summary>
</histogram>

<histogram name="IndexedDB.DeleteBucketDataSuccess.{IndexedDBBackingStoreType}"
    enum="BooleanSuccess" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Whether deleting the on-disk data of a bucket with an
    {IndexedDBBackingStoreType} backing store succeeded. Logged after the
    attempt to delete on-disk files by a doomed bucket context instance.
  </summary>
</histogram>

<histogram name="IndexedDB.FilePathLengthOverflow.{Engine}" units="characters"
    expires_after="2026-10-11">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Windows only.

    For the longest file name used by the given IndexedDB backing store engine,
    logs the number of excess characters relative to Windows MAX_PATH,
    regardless of whether the system in question is actually limited by MAX_PATH
    (since Chromium does have that limitation).

    In the vast majority of cases, there should be no overflow, which is logged
    as 0.

    This is logged for each engine each time a backing store is created/opened
    but only when LevelDB is active. Collectively they are intended to measure
    the impact of the file naming scheme when switching to SQLite.
  </summary>
  <token key="Engine">
    <variant name="LevelDB"/>
    <variant name="SQLite"/>
  </token>
</histogram>

<histogram name="IndexedDB.GetUnacquirableLocksLongTimes" units="ms"
    expires_after="2026-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the duration of PartitionedLockManager::GetUnacquirableLocks, but only
    if it takes over 2ms to execute. This is intended to facilitate tracking
    down performance issues. See crbug.com/384476946.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="IndexedDB.GetUnacquirableLocksRequestQueueSize" units="count"
    expires_after="2026-10-02">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the number of queued lock requests that exist in the
    PartitionedLockManager when GetUnacquirableLocks() takes over 2ms to
    complete. This is intended to facilitate tracking down performance issues.
    See crbug.com/384476946
  </summary>
</histogram>

<histogram
    name="IndexedDB.IdleTasksCompletionToNextActivity.{IndexedDBBackingStoreType}"
    units="ms" expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The time between the completion of idle maintenance tasks and the next
    client-initiated activity in a bucket with an {IndexedDBBackingStoreType}
    backing store. Logged when the first activity occurs after idle tasks were
    scheduled and completed. Used to evaluate whether the idle timeout is
    well-tuned: very small values indicate the timeout may be too short and
    maintenance is delaying active work.
  </summary>
</histogram>

<histogram name="IndexedDB.LargeValueReadResult" enum="FileErrorCode"
    expires_after="2027-01-17">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the status (including success) when IndexedDB finishes reading a
    blob-wrapped (large) value. If the read fails, the first value that failed
    to be unwrapped in a transaction will be logged. This error causes the
    transaction to abort, preventing further read attempts on other values. This
    metric is recorded in the renderer process.
  </summary>
</histogram>

<histogram name="IndexedDB.LevelDbTombstoneSweeper.TombstonesFound"
    units="count" expires_after="2026-05-10">
  <owner>leimy@chromium.org</owner>
  <owner>tamartol@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the number of tombstones entries which were found during the LevelDB
    cleanup task. Recorded when the LevelDbTombstoneSweeper is destroyed.
  </summary>
</histogram>

<histogram name="IndexedDB.LockRequestCancelledLongTimes" units="ms"
    expires_after="2026-10-02">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the duration of PartitionedLockManager::LockRequestCancelled, but only
    if it takes over 2ms to execute. This is intended to facilitate tracking
    down performance issues. See crbug.com/384476946
  </summary>
</histogram>

<histogram name="IndexedDB.LockRequestCancelledRequestQueueSize" units="count"
    expires_after="2026-10-02">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the number of queued lock requests that exist in the
    PartitionedLockManager when LockRequestCancelled() takes over 2ms to
    complete. This is intended to facilitate tracking down performance issues.
    See crbug.com/384476946
  </summary>
</histogram>

<histogram name="IndexedDB.NumConnections.OnCreateAbove10k" units="connections"
    expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of content::indexed_db::Connection objects alive in the browser
    process when a new Connection is created. Recorded every time a Connection
    object is created and the number of existing Connection objects is greater
    than 10k. Will be used to diagnose crbug.com/381086791.
  </summary>
</histogram>

<histogram name="IndexedDB.NumPendingConnections.OnCreateAbove10k"
    units="connections" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of content::indexed_db::PendingConnection objects alive in the
    browser process when a new PendingConnection is created. Recorded every time
    a PendingConnection object is created and the number of existing
    PendingConnection objects is greater than 10k. Will be used to diagnose
    crbug.com/381086791.
  </summary>
</histogram>

<histogram name="IndexedDB.NumPendingConnections.RequestQueueSize"
    units="connections" expires_after="2027-02-07">
  <owner>etienneb@chromium.org</owner>
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of content::indexed_db::PendingConnection objects pending in the
    ConnectionCoordinator request queue. Will be used to diagnose
    crbug.com/381086791.
  </summary>
</histogram>

<histogram
    name="IndexedDB.NumTransactionsInIDBDatabaseOnTransactionCreated.10kTransactions"
    units="transactions" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of transactions in a blink::IDBDatabase when a blink::IDBTransaction
    is created. Recorded every time a blink::IDBTransaction is created and the
    number of transactions in the blink::IDBDatabase is greater than 10k. Will
    be used to diagnose crbug.com/381086791.
  </summary>
</histogram>

<histogram name="IndexedDB.QuotaCheckTime2.{QuotaCheckResult}" units="ms"
    expires_after="2027-01-10">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the result of quota checks made by the IndexedDB component on commit of
    readwrite txns.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
  <token key="QuotaCheckResult">
    <variant name="DroppedRequest"/>
    <variant name="QuotaError"/>
    <variant name="Success"/>
  </token>
</histogram>

<histogram name="IndexedDB.RemoveTransactionConnectionTxnCount" units="count"
    expires_after="2026-07-19">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the number of transactions remaining on a Connection when
    Connection::RemoveTransaction() takes over 2ms to complete. This is intended
    to facilitate tracking down performance issues. See crbug.com/384476946
  </summary>
</histogram>

<histogram name="IndexedDB.RemoveTransactionLongTimes" units="ms"
    expires_after="2026-07-19">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the duration of Connection::RemoveTransaction(), but only if it takes
    over 2ms to execute. This is intended to facilitate tracking down
    performance issues. See crbug.com/384476946
  </summary>
</histogram>

<histogram name="IndexedDB.RemoveTransactionRequestQueueSize" units="count"
    expires_after="2026-07-19">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the number of queued lock requests that exist in the
    PartitionedLockManager when Connection::RemoveTransaction() takes over 2ms
    to complete. This is intended to facilitate tracking down performance
    issues. See crbug.com/384476946
  </summary>
</histogram>

<histogram name="IndexedDB.SQLite.BlobServedFromLegacyFile" enum="Boolean"
    expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records whether a blob served from IndexedDB's SQLite backing store was read
    from a legacy file (true) or from the SQLite database itself (false). This
    helps track the migration progress from legacy file-based blob storage to
    inline SQLite blob storage.

    Logged once for each blob that's in a row (IndexedDBValue) that is read from
    the DB.
  </summary>
</histogram>

<histogram name="IndexedDB.SQLite.FreelistPercentageAtClose" units="%"
    expires_after="2026-12-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The percentage of pages in the SQLite database that are on the freelist
    (unused) at the time the database connection is closed. Logged once per
    on-disk database close.
  </summary>
</histogram>

<histogram name="IndexedDB.SQLite.OpenRetryResult" enum="IndexedDbStatusType"
    expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the result when the SQLite backing store automatically retries opening
    a DB after the first attempt fails. This only happens for on-disk DBs.
  </summary>
</histogram>

<histogram name="IndexedDB.SQLite.OpenToReadMetadataResult"
    enum="IndexedDbStatusType" expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the result when the SQLite backing store opens a DB for the sole
    purpose of reading metadata (i.e. name and version).
  </summary>
</histogram>

<histogram name="IndexedDB.SQLite.PutRecord.CompressionRatio" units="%"
    expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The compression ratio achieved when putting a value in the SQLite-backed
    IndexedDB. This is calculated as [compressed size] / [original size].
    Depending on this ratio, the value may or may not be stored in its
    compressed form.
  </summary>
</histogram>

<histogram
    name="IndexedDB.SQLite.PutRecord.PrecompressionValueSize.{CompressionState}"
    units="bytes" expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The size of the input data, before being compressed, when putting a record
    in the SQLite-backed IndexedDB, split by whether the data was compressible
    enough to be stored compressed. This is NOT logged for values where
    compression was not even attempted.
  </summary>
</histogram>

<histogram name="IndexedDB.SQLite.SpecificEvent.{Mode}"
    enum="IndexedDbSqliteSpecificEvent" expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs specific events of interest, mostly errors, that occur when using the
    SQLite backing store for IndexedDB. The specifics of when each are logged
    are summarized in the enum, but the code is the canonical source of truth.
    These events are not mutually exclusive; the first event (0) is logged for
    every time the backing store attempts to open a SQLite database connection.
  </summary>
  <token key="Mode">
    <variant name="InMemory"/>
    <variant name="OnDisk"/>
  </token>
</histogram>

<histogram name="IndexedDB.SQLite.VacuumEvent"
    enum="IndexedDbSqliteVacuumEvent" expires_after="2026-10-27">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Tracks the vacuum funnel for SQLite-backed IndexedDB databases. An event is
    logged when vacuuming is attempted on long idle or requested at close.
    Multiple events may be logged subsequently as the funnel progresses.
  </summary>
</histogram>

<histogram name="IndexedDB.SqliteMigration.RenameBlobResult"
    enum="PlatformFileError" expires_after="2027-02-04">
  <owner>leimy@chromium.org</owner>
  <owner>evanstade@microsoft.com</owner>
  <owner>abhishek.shanthkumar@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the result of renaming a blob file during IndexedDB backing store
    migration from LevelDB to SQLite.
  </summary>
</histogram>

<histogram name="IndexedDB.TransactionTimeout.{TransactionCount}CommitPending"
    enum="Boolean" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Whether an IndexedDB transaction has a commit pending. Recorded every time
    the 20 seconds inactivity timeout is hit for a transaction. Will be used to
    diagnose crbug.com/381086791. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram name="IndexedDB.TransactionTimeout.{TransactionCount}IsAborted"
    enum="IDBTransactionMode" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Whether an IndexedDB transaction is aborted. Recorded every time the 20
    seconds inactivity timeout is hit for a transaction. Will be used to
    diagnose crbug.com/381086791. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram name="IndexedDB.TransactionTimeout.{TransactionCount}IsConnected"
    enum="Boolean" expires_after="2027-01-03">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Whether the connection to which an IndexedDB transaction is associated is
    connected. Recorded every time the 20 seconds inactivity timeout is hit for
    a transaction, if it is associated with an existing connection. Will be used
    to diagnose crbug.com/381086791. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram name="IndexedDB.TransactionTimeout.{TransactionCount}Mode"
    enum="IDBTransactionMode" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    The mode of an IndexedDB transaction. Recorded every time the 20 seconds
    inactivity timeout is hit for a transaction. Will be used to diagnose
    crbug.com/381086791. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram
    name="IndexedDB.TransactionTimeout.{TransactionCount}NumTransactionsInConnection"
    units="transactions" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of transactions associated with the same connection as an IndexedDB
    transaction. Recorded every time the 20 seconds inactivity timeout is hit
    for a transaction. Will be used to diagnose crbug.com/381086791. We suspect
    that this can be very high. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram
    name="IndexedDB.TransactionTimeout.{TransactionCount}NumTransactionsInDB"
    units="transactions" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Number of transactions associated with the same database as an IndexedDB
    transaction. Recorded every time the 20 seconds inactivity timeout is hit
    for a transaction. Will be used to diagnose crbug.com/381086791. We suspect
    that this can be very high. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram name="IndexedDB.TransactionTimeout.{TransactionCount}TaskRunQueued"
    enum="Boolean" expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Whether a RunTask invocation is queued for the BucketContext. Recorded every
    time the 20 seconds inactivity timeout is hit for a transaction. Will be
    used to diagnose crbug.com/381086791. {TransactionCount}
  </summary>
  <token key="TransactionCount" variants="IndexedDBTransactionCount"/>
</histogram>

<histogram name="IndexedDB.WrappedBlobLoadTime" units="ms"
    expires_after="2027-01-17">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the amount of time taken to load a blob from the IDB backing store.
    This is measured from the renderer, starting when the bytes are requested
    from the renderer process and finishing when loading is complete i.e. all
    bytes are available in the renderer process. For simplicity's sake, this is
    only logged for large values automatically wrapped in blobs, but the results
    should be applicable to explicit Blobs as well.

    If the blob bytes need to be unwrapped (decompressed), the time it takes to
    do so is NOT taken into account. If interested in total time to receive the
    uncompressed blob bytes, another histogram would need to be added.
  </summary>
</histogram>

<histogram name="LevelDBEnv.DeleteTableBackupFile" enum="BooleanSuccess"
    expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Tracks the success rate of deleting an unused leveldb table backup file.

    Warning: this histogram was expired from 2025/04 to 2026/08; data may be
    missing.
  </summary>
</histogram>

<histogram name="LevelDBEnv.SyncResult" enum="PlatformFileError"
    expires_after="2026-12-27">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Logs the success/failure of LevelDB's calls to Sync() (which translates to
    system calls of fsync(), FlushFileBuffers(), etc). Sync() is only called if
    the client requests it (e.g. for a strict durability IndexedDB transaction)
    and after an otherwise successful write.

    Warning: this histogram was expired from 2024/04 to 2026/01; data is
    missing.
  </summary>
</histogram>

<histogram name="LevelDBEnv.{LevelDBEnvTypes}IOError"
    enum="LevelDBIOErrorMethods" expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Methods where leveldb's Chromium environment has IO errors.
    {LevelDBEnvTypes}

    Warning: this histogram was expired from 2026/06 to 2026/08; data may be
    missing.
  </summary>
  <token key="LevelDBEnvTypes" variants="LevelDBEnvTypes">
    <variant name=""/>
  </token>
</histogram>

<histogram name="LevelDBEnv.{LevelDBEnvTypes}MissingFiles" units="files"
    expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Number of backup files found without corresponding ldb files. As measured by
    GetChildren when used in LevelDB clients other than IndexedDB.
    {LevelDBEnvTypes}

    Warning: this histogram was expired from 2026/06 to 2026/08; data may be
    missing.
  </summary>
  <token key="LevelDBEnvTypes" variants="LevelDBEnvTypes">
    <variant name=""/>
  </token>
</histogram>

<histogram name="LevelDBWrapper.CommitDelay" units="ms"
    expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Delay between the browser process receiving changes and those changes being
    written to the DB.

    Warning: this histogram was expired from 2025/03 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="LocalStorage.AccessMetaDataUpdateAtShutdown" enum="Boolean"
    expires_after="2027-03-31">
  <owner>arichiv@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Emitted when a local StorageArea is shutdown and the access metadata for the
    associated StorageKey is updated. It's possible to update the access
    metadata when new data is written to the storage area instead, so this
    metric does not capture all access metadata updates.

    Value is true if update succeeded and false if update failed.
  </summary>
</histogram>

<histogram
    name="LocalStorage.DatabaseOnDiskSizeKB{DomStorageSqliteRolloutStage}"
    units="KB" expires_after="2027-01-24">
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the on disk size of the LocalStorage database for a given browser
    Profile. Recorded once per LocalStorage backend per attempt to open the
    on-disk database in the Storage process, regardless of open outcome.
  </summary>
</histogram>

<histogram name="LocalStorage.DaysSinceLastModified" units="days"
    expires_after="2027-03-31">
  <owner>arichiv@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Emitted when the browsing context that loaded the related local storage
    controller shuts down. One entry is recorded per local storage area.

    Number of days since a local storage area was modified. Capped at 400 days
    as areas are not retained past that point.
  </summary>
</histogram>

<histogram name="LocalStorage.MojoSizeInKB" units="KB"
    expires_after="2027-05-31">
  <owner>fergal@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Size of the HTML5 LocalStorage DB in KB in the renderer-side cache using
    Mojo implementation. This was expired from 2026-05-31 to 2026-06-08, so data
    may be missing.
  </summary>
</histogram>

<histogram name="LocalStorage.MojoTimeToPrime" units="ms"
    expires_after="2027-05-31">
  <owner>fergal@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Time (in ms) to load HTML5 LocalStorage into the renderer-side cache using
    Mojo implementation. This was expired from 2026-05-31 to 2026-06-08, so data
    may be missing.
  </summary>
</histogram>

<histogram name="LocalStorage.MojoTimeToPrimeAblationDelay" units="ms"
    expires_after="2026-07-25">
  <owner>fergal@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Time (in ms) added to loading of LocalStorage into the renderer-side cache
    used for ablation study purposes.
  </summary>
</histogram>

<histogram name="LocalStorage.MojoTimeToPrimeFor{LocalStorageSizes}" units="ms"
    expires_after="2027-05-31">
  <owner>fergal@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Time (in ms) to load HTML5 LocalStorage into the renderer-side cache using
    Mojo implementation, split by size. {LocalStorageSizes}
  </summary>
  <token key="LocalStorageSizes" variants="LocalStorageSizes"/>
</histogram>

<histogram name="LocalStorage.OrphanStorageAreasOnStartupCount" units="areas"
    expires_after="2027-03-31">
  <owner>arichiv@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the amount of orphan (nonce-bound buckets which will never be
    loaded) storage areas detected on LocalStorageImpl initialization (profile
    load). Recorded one minute after LocalStorageImpl initialization to ensure
    any restored tabs have loaded.

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

<histogram name="LocalStorage.RendererAreaCacheHit"
    enum="LocalStorageRendererAreaCacheHitEnum" expires_after="2027-07-08">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The renderer side cache hit rate metrics for new HTML5 LocalStorage DB
    opened.

    Warning: this histogram was expired from M78 to M92 and from 2026-03-08 to
    2026-07-24; data may be missing.
  </summary>
</histogram>

<histogram name="LocalStorage.StaleStorageAreasDeletedOnStartupCount"
    units="areas" expires_after="2027-03-31">
  <owner>arichiv@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the amount of stale (400 days since last access or write) storage
    areas deleted on LocalStorageImpl initialization (profile load).

    Emitted after successful attempt to delete stale storage areas.

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

<histogram name="LocalStorage.StaleStorageAreasDeletedOnStartupSuccess"
    enum="BooleanSuccess" expires_after="2027-03-31">
  <owner>arichiv@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the success of clearing stale (400 days since last access or write)
    storage areas on LocalStorageImpl initialization (profile load).

    Emitted after attempt to delete stale storage areas occurs.

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

<histogram name="MojoLevelDBEnv.IOError" enum="LevelDBIOErrorMethods"
    expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Methods where leveldb's Mojo environment has IO errors. This histogram has
    expired between M87-106.

    Warning: this histogram was expired from 2026/06 to 2026/08; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Blob.FileReaderLoader.DataPipeNotReadableMojoError"
    enum="FileReaderLoaderMojoResult" expires_after="2027-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Recorded when FileReaderLoader.FailureType2 records a data pipe not readable
    error. This is the specific type of Mojo error.

    Warning: this histogram was expired from 2025/02 to 2025/06 and from 2026/07
    to 2026/08; data may be missing.
  </summary>
</histogram>

<histogram name="Storage.Blob.FileReaderLoader.FailureType2"
    enum="FileReaderLoaderFailureType" expires_after="2027-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Recorded when an error occurs in the FileReaderLoader, which is used to load
    blobs in the Renderer. FileReaderUser is mostly used for Javascript's
    'FileReader', but can also be used to read blobs for the IndexedDB
    renderer-side implementation. For the read error category, see
    Storage.Blob.FileReaderLoader.ReadError for a breakdown of the specific read
    error reasons.

    Warning: this histogram was expired from 2026/05 to 2026/08; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Blob.FileReaderLoader.ReadError2" enum="NetErrorCodes"
    expires_after="2027-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The error code reported by the blob system while trying to read a blob in
    the FileReaderLoader.

    Warning: this histogram was expired from 2026/05 to 2026/08; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Buckets.BucketCount" units="buckets"
    expires_after="2026-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Counts the number of storage buckets in existence for a StorageKey when a
    new one is created (including the new one). This is intended to give an idea
    of the number of buckets individual apps use. Note: the count in histogram
    bucket 1 correlates to the total number of sites that use the buckets API
    (per Chrome client). The count in histogram bucket N, divided by the size of
    the bucket, correlates to the number of sites for that Chrome client which
    use at least that many buckets.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Buckets.Parameters.Durability"
    enum="StorageBucketDurabilityParameter" expires_after="2025-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The requested durability for a bucket when it is open()ed.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Buckets.Parameters.Expiration" units="minutes"
    expires_after="2026-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The expiration time for a bucket, in minutes, if provided when it is
    open()ed. If not provided, the underflow bucket is used.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Buckets.Parameters.Persisted"
    enum="StorageBucketPersistedParameter" expires_after="2026-07-01">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The requested persistence for a bucket when it is open()ed.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.Buckets.Parameters.QuotaKb" units="KB"
    expires_after="2027-01-03">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The requested quota for a bucket, in kB, if provided. If not provided, the
    underflow bucket is used. Logged when the bucket is open()ed.

    Warning: this histogram was expired from 2025/04 to 2025/06; data may be
    missing.
  </summary>
</histogram>

<histogram name="Storage.ClearSiteDataHeader.Parameters"
    enum="ClearSiteDataParameters" expires_after="2027-01-17">
  <owner>estade@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    A Clear-Site-Data response header was seen with the given values.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.DatabaseSize"
    units="KB" expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the size of the Declarative Performance Observer SQLite database
    file on disk. Recorded during database initialization.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.EvictionCount"
    units="reports" expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the number of early failure reports evicted in a single operation to
    satisfy storage quota constraints. Recorded whenever eviction completes.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.ExpiredReportsCount"
    units="reports" expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the number of stored early failure reports deleted during database
    initialization because they exceeded the TTL limit. Recorded only when the
    number of expired reports is greater than zero.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.ReadReportResult"
    enum="DeclarativePerformanceObserverStoreReadResult"
    expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the outcome of reading stored early failure reports from the
    Declarative Performance Observer SQLite database. Recorded on the database
    sequence whenever early failure reports are taken for delivery.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.StoredOriginCount"
    units="origins" expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the total number of unique origins with active early-failure
    policies tracked in the SQLite database. Recorded during database
    initialization.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.StoredReportCount"
    units="reports" expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the total number of early failure reports stored in the SQLite
    database. Recorded during database initialization.
  </summary>
</histogram>

<histogram name="Storage.DeclarativePerformanceObserver.StoreReportResult"
    enum="DeclarativePerformanceObserverStoreReportResult"
    expires_after="2026-12-19">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Records the outcome of attempting to serialize and store an early failure
    report in the Declarative Performance Observer SQLite database. Recorded on
    the database sequence for each write attempt.
  </summary>
</histogram>

<histogram
    name="Storage.DeprecatedPrivacySandboxAPIs.DatabaseStillExisted.{Api}"
    enum="Boolean" expires_after="2027-07-01">
  <owner>cammie@chromium.org</owner>
  <owner>leimy@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Whether the database files still exist for {Api} on profile startup, so they
    are deleted subsequently. if they were no longer present.
  </summary>
  <token key="Api">
    <variant name="AggregationService" summary="Aggregation Service"/>
    <variant name="BrowsingTopicsSiteData" summary="Browsing Topics Site Data"/>
    <variant name="Conversions" summary="Conversions"/>
    <variant name="InterestGroups" summary="Interest Groups"/>
    <variant name="PrivateAggregation" summary="Private Aggregation"/>
    <variant name="SharedStorage" summary="Shared Storage"/>
  </token>
</histogram>

<histogram
    name="Storage.DomStorage.Compression.PrecompressionValueSize.{CompressionState}"
    units="bytes" expires_after="2027-03-24">
  <owner>fergal@chromium.org</owner>
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The size of the input value, before compression, when writing a key-value
    pair in the DomStorage SQLite backend. Split by whether the value was
    compressible enough to be stored compressed. Only logged for values at or
    above the minimum compression threshold.
  </summary>
</histogram>

<histogram name="Storage.DomStorage.Compression.Ratio" units="%"
    expires_after="2027-03-24">
  <owner>fergal@chromium.org</owner>
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The compression ratio achieved when writing a value in the DomStorage SQLite
    backend. Calculated as [compressed size] / [original size] * 100. Depending
    on this ratio, the value may or may not be stored in its compressed form.
    Only logged for values at or above the minimum compression threshold.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.AttemptToObserveSymlinkOrJunction"
    enum="Boolean" expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records whether a site attempted to observe a symlink or a junction using
    the File System Observer API. Recorded on every observe() call after
    validating the handle and ensuring that read permissions on the handle are
    granted. Only recorded when observing a handle in the LocalFileSystem.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.ConfirmSensitiveEntryAccessDuration"
    units="ms" expires_after="2027-01-03">
  <owner>leimy@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Logs the time it takes to execute
    ChromeFileSystemAccessPermissionContext::ConfirmSensitiveEntryAccess(). This
    metric will be used to estimate the impact of the performance improvements
    made to the blocklists check within the method.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.FilePathWatcherCallbackError"
    enum="FileSystemAccessWatchWithChangeInfoResult" expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records if content::FilePathWatcher sends an error to its callback and how
    it failed. Recorded on every error sent to the callback.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.InotifyWatchCount" units="count"
    expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records the high water mark of inotify watches used in a FilePathWatcher on
    Linux. Recorded when the FilePathWatcher is destroyed.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.ObservationCallbackRate"
    units="count" expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records the number of times an observer's callback is triggered per
    observation in a one second window. Recorded one second after a callback has
    been triggered when there is no ongoing window.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.ObserverUsage" units="count"
    expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records the high water mark of OS-specific observer resource usage for a
    given StorageKey. Recorded when FileSystemAccessObserverQuotaManager is
    destroyed.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.ObserverUsageQuotaExceeded"
    enum="Boolean" expires_after="2026-11-15">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records whether FileSystemObserver usage change caused quota to be exceeded.
    Recorded when FileSystemAccessObserverQuotaManager is destroyed.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.ObserverUsageRate" units="%"
    expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records the percentage ratio of high water mark of OS-specific observer
    resource usage over the total available quota for a given StorageKey.
    Recorded when FileSystemAccessObserverQuotaManager is destroyed.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.RestorePermissionPromptOutcome"
    enum="FileSystemAccessRestorePermissionPromptOutcome"
    expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    The result of a user interaction with the File System Access Persistent
    Permissions restore prompt UI.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.ToggleExtendedPermissionOutcome"
    enum="Boolean" expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    The result of a user interaction with the File System Access Persistent
    Permissions Page Info UI checkbox toggle option to enable or disable
    Extended Permissions for a given origin.
  </summary>
</histogram>

<histogram name="Storage.FileSystemAccess.WatchWithChangeInfoResult"
    enum="FileSystemAccessWatchWithChangeInfoResult" expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    Records if content::FilePathWatcher::WatchWitchChangeInfo succeeds and if it
    doesn't, how it fails. Recorded for every call.
  </summary>
</histogram>

<histogram
    name="Storage.FileSystemAccess.{OpType}PermissionRequestOutcome.{EntryType}"
    enum="FileSystemAccessPermissionRequestOutcome" expires_after="2026-08-31">
  <owner>mych@chromium.org</owner>
  <owner>src/content/browser/file_system_access/OWNERS</owner>
  <summary>
    The result of an attempt to request permission to a file or directory via
    the File System Access API.
  </summary>
  <token key="OpType">
    <variant name="Read" summary="Read permission requested"/>
    <variant name="Write" summary="Write permission requested"/>
  </token>
  <token key="EntryType">
    <variant name="Directory" summary="Requested permission to a directory"/>
    <variant name="File" summary="Requested permission to a file"/>
  </token>
</histogram>

<histogram name="Storage.InterestGroup.AdComponentRenderURLSize" units="bytes"
    expires_after="2025-07-13">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the size of each ad component renderURL in bytes. Recorded for each
    ad component, each time an interest group is successfully joined.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoCompressionRatio" units="%"
    expires_after="2026-03-22">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the percentage ratio of compressed size divided by uncompressed size
    of the AdsProto, times 100. Recorded each time the AdProto is compressed,
    including both during interest group insertion, and database migration from
    older uncompressed versions, unless uncompressed size is 0. Includes both
    ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoCompressionTime" units="ms"
    expires_after="2026-02-01">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the time taken to compress the ad proto. Recorded each time the
    AdProto is compressed, including both during interest group insertion, and
    database migration from older uncompressed versions. Includes both ads and
    ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoDecompressionOutcome"
    enum="AdProtoDecompressionOutcome" expires_after="2025-07-13">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the outcome of interest group AdProto decompression, recorded on
    each decompression attempt. Includes both ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoDecompressionTime" units="ms"
    expires_after="2025-09-28">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the outcome of interest group AdProto decompression, recorded on
    each successful decompression attempt. Includes both ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoDeserializationTime" units="ms"
    expires_after="2025-10-12">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the time taken to deserialize the ad proto. Recorded each time the
    AdProto is deserialized. Includes both ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoSerializationTime" units="ms"
    expires_after="2026-02-05">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the time taken to serialize the ad proto. Recorded each time the
    AdProto is serialized, including both during interest group insertion, and
    database migration. Includes both ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoSizeCompressed" units="bytes"
    expires_after="2026-03-22">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the size of the compressed AdProto, recorded each time the AdProto
    is compressed, including both during interest group insertion, and database
    migration from older uncompressed versions, even if the uncompressed size is
    0. Includes both ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdProtoSizeUncompressed" units="bytes"
    expires_after="2025-09-14">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the size of the uncompressed AdProto, recorded each time the AdProto
    is compressed, including both during interest group insertion, and database
    migration from older uncompressed versions, even if the uncompressed size is
    0. Includes both ads and ad components.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.AdRenderURLSize" units="bytes"
    expires_after="2025-11-16">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the size of each ad renderURL in bytes. Recorded for each ad, each
    time an interest group is successfully joined.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.DBErrors" units="count"
    expires_after="2025-06-08">
  <owner>behamilton@google.com</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the number of database errors that occur when accessing interest
    group storage.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.DBMaintenanceTime" units="microseconds"
    expires_after="2025-09-14">
  <owner>behamilton@google.com</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the time spent performing database maintenance on the interest group
    storage. Recorded when maintenance is run (approximately once an hour).

    Note that clients without high-resolution clocks will report 0 for very
    short times.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.DBSize" units="KB"
    expires_after="2027-01-31">
  <owner>behamilton@google.com</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the size of the InterestGroup database. Collected prior to database
    maintenance.
  </summary>
</histogram>

<histogram
    name="Storage.InterestGroup.HeaderObserver.CreatedOpaqueOriginForPrefsCheck"
    enum="Boolean" expires_after="2025-08-10">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <owner>privacy-sandbox-dev@chromium.org</owner>
  <summary>
    Tracks whether or not it was necessary to create a new opaque origin to use
    as the top-frame origin for the call to
    `ContentBrowserClient::IsInterestGroupAPIAllowed()` when storing headers
    received from the network service. Recorded every time this check was made.
    NOTE: This histogram doesn't apply to normal joins, updates, auctions, etc.
    -- it just applies to checks applied after receiving headers from the
    network service.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.InitializationResult"
    enum="InterestGroupStorageInitializationResult" expires_after="2025-07-13">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the result of database initialization, every time initialization is
    attempted.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.JSONDeserializationResult"
    enum="InterestGroupStorageJSONDeserializationResult"
    expires_after="2026-01-18">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the result of JSON deserialization, every time it is attempted.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.JSONSerializationResult"
    enum="InterestGroupStorageJSONSerializationResult"
    expires_after="2025-07-13">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the result of JSON serialization, every time it is attempted.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.KAnonymityKeysCacheHitRate" units="%"
    expires_after="2026-05-10">
  <owner>orrb@chromium.org</owner>
  <owner>privacy-sandbox-dev@chromium.org</owner>
  <summary>
    The fraction of keys that need to be fetched for a particular interest group
    that are available from the on-device cache of keys retained from prior
    requests to the k-anonymity server. As with other percent metrics, this is
    recorded as an integer of 0-100. Recorded immediately after the cache is
    checked for k-anonymity keys prior to attempting a fetch from the
    k-anonymity server, and only when the cache is checked, i.e. not when the
    `kFledgeCacheKAnonHashedKeys` feature is disabled.

    See https://github.com/WICG/turtledove/blob/main/FLEDGE.md for the latest
    version of the FLEDGE explainer.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.PerInterestGroup.NumAdComponents"
    units="ad components" expires_after="2026-01-18">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the number of ads components per interest group. Recorded each time
    an interest group is successfully joined when a (potentially-empty) ad
    components array was passed to joinAdInterestGroup().
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.PerInterestGroup.NumAds" units="ads"
    expires_after="2026-05-24">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the number of ads per interest group. Recorded each time an interest
    group is successfully joined when a (potentially-empty) ads array was passed
    to joinAdInterestGroup().
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.PerSiteCount" units="groups"
    expires_after="2026-11-29">
  <owner>behamilton@google.com</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the number of interest groups loaded for a single group owner when
    running an ad auction. Recorded for each owner involved in a running ad
    auction.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.PrevWinsNumEntries" units="entries"
    expires_after="2025-12-07">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <owner>privacy-sandbox-dev@chromium.org</owner>
  <summary>
    Records an estimate of the number of prevWins entries per interest group,
    reported each time it is loaded from the database, both for on-device and
    B&amp;A auctions.
  </summary>
</histogram>

<histogram name="Storage.InterestGroup.ProtoDeserializationResult.{Type}"
    enum="InterestGroupStorageProtoDeserializationResult"
    expires_after="2026-01-18">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the result of {Type} Proto deserialization, every time it is
    attempted.
  </summary>
  <token key="Type" variants="InterestGroupStorageProtoType"/>
</histogram>

<histogram name="Storage.InterestGroup.ProtoSerializationResult.{Type}"
    enum="InterestGroupStorageProtoSerializationResult"
    expires_after="2026-01-18">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the result of {Type} Proto serialization, every time it is
    attempted.
  </summary>
  <token key="Type" variants="InterestGroupStorageProtoType"/>
</histogram>

<histogram name="Storage.InterestGroup.Upgrade{Outcome}{Version}Version"
    units="version" expires_after="2025-07-13">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the {Version} version number of database upgrades that {Outcome},
    recorded each time the database upgrade has a &quot;{Outcome}&quot; outcome.
  </summary>
  <token key="Outcome">
    <variant name="Failed" summary="fail"/>
    <variant name="Succeeded" summary="succeed"/>
  </token>
  <token key="Version">
    <variant name="End" summary="ending"/>
    <variant name="Start" summary="starting"/>
  </token>
</histogram>

<histogram name="Storage.InterestGroup.VacuumResult"
    enum="InterestGroupStorageVacuumResult" expires_after="2025-07-13">
  <owner>caraitto@chromium.org</owner>
  <owner>pauljensen@chromium.org</owner>
  <summary>
    Records the result of the vacuum operation, every time it is attempted.
  </summary>
</histogram>

<histogram name="Storage.SessionStorage.ClearDiskStateAtStoragePartitionInit"
    enum="Boolean" expires_after="2027-05-01">
  <owner>leimy@chromium.org</owner>
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records whether the session storage database was cleared during storage
    partition initialization. True means the database was destroyed and
    recreated because no session restore was needed. Emitted once per storage
    partition during initialization.
  </summary>
</histogram>

<histogram
    name="Storage.SessionStorage.DatabaseOnDiskSizeKB{DomStorageSqliteRolloutStage}"
    units="KB" expires_after="2026-11-22">
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the on disk size of the SessionStorage database for a given browser
    Profile. Recorded once per SessionStorage backend per attempt to open the
    on-disk database in the Storage process, regardless of open outcome.
  </summary>
</histogram>

<histogram name="Storage.SessionStorage.RendererAreaCacheHit"
    enum="LocalStorageRendererAreaCacheHitEnum" expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    The renderer side cache hit rate metrics for new HTML5 SessionStorage DB
    opened. This histogram has expired between M97-106.
  </summary>
</histogram>

<histogram name="Storage.StoragePartition.InitializeDuration" units="ms"
    expires_after="2027-07-01">
  <owner>elabadysayed@chromium.org</owner>
  <owner>src/content/browser/OWNERS</owner>
  <summary>
    Records the synchronous duration of StoragePartitionImpl::Initialize() on
    the UI thread across all //content embedders. Emitted once every time a
    storage partition is initialized.
  </summary>
</histogram>

<histogram name="Storage.StoragePartition.InitializeDuration.{Step}" units="ms"
    expires_after="2027-07-01">
  <owner>elabadysayed@chromium.org</owner>
  <owner>src/content/browser/OWNERS</owner>
  <summary>
    Records the synchronous duration of {Step} inside
    StoragePartitionImpl::Initialize() on the UI thread.

    Note: The order and grouping of initialization steps within
    StoragePartitionImpl::Initialize() are implementation details and are not
    guaranteed to remain stable across Chromium releases. If new features are
    added or steps are reordered, data continuity across versions will be
    broken. Consequently, this metric should only be considered for comparisons
    within the exact same browser version.
  </summary>
  <token key="Step">
    <variant name="BackgroundTasks"
        summary="initializing background sync, background fetch, platform
                 notifications, and devtools contexts"/>
    <variant name="CodeCacheAndInterestGroup"
        summary="initializing code cache, attribution manager, and interest
                 group manager"/>
    <variant name="DOMStorageAndIndexedDB"
        summary="initializing DOMStorage, IndexedDB, and CacheStorage
                 wrappers"/>
    <variant name="QuotaAndFileSystem"
        summary="initializing QuotaContext, QuotaManager, and
                 FileSystemContext"/>
    <variant name="ServiceWorkerContext"
        summary="initializing ServiceWorkerContextWrapper, worker services,
                 and cookie store manager"/>
  </token>
</histogram>

<histogram name="Storage.StoragePartitionMap.Get.Duration" units="ms"
    expires_after="2027-07-01">
  <owner>elabadysayed@chromium.org</owner>
  <owner>src/content/browser/OWNERS</owner>
  <summary>
    Records the synchronous duration of StoragePartitionImplMap::Get() on the UI
    thread across all //content embedders. Emitted once every time a storage
    partition is retrieved or created in the map.
  </summary>
</histogram>

<histogram
    name="Storage.{DomStorageType}.CommitErrorCountAtReset{DomStorageSqliteRolloutStage}"
    units="errors" expires_after="2027-03-09">
  <owner>fergal@chromium.org</owner>
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the number of consecutive commit errors that accumulated before the
    error counter was reset in {DomStorageType}. Emitted whenever the counter is
    reset from a non-zero value, whether due to a subsequent successful commit
    or an attempt to recover the database. These errors represent commits whose
    data was silently lost without retry. The .OnDiskExperimental suffix
    identifies databases in the SQLite rollout experiment (treatment or control
    group). Its absence identifies databases not participating in the
    experiment.
  </summary>
</histogram>

<histogram name="Storage.{DomStorageType}.Database.Error"
    enum="SqliteErrorCode" expires_after="2027-06-01">
  <owner>leimy@chromium.org</owner>
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the SQLite result code reported via the {DomStorageType} database's
    error callback whenever a SQLite operation fails. Recorded once per error.
  </summary>
  <token key="DomStorageType" variants="DomStorageType"/>
</histogram>

<histogram
    name="Storage.{DomStorageType}.Duration.{Operation}.{DomStorageBackingStoreLifetime}"
    units="ms" expires_after="2027-02-28">
  <owner>leimy@chromium.org</owner>
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the duration of {Operation} operations in {DomStorageType} using
    {DomStorageBackingStoreLifetime} database. Measured on the DB sequence
    around the actual database call, which excludes task-queue delays. This
    helps compare latency between the LevelDB and SQLite backends.
  </summary>
  <token key="Operation">
    <variant name="CleanUpStaleData"
        summary="removing all traces of deleted data from the backing storage"/>
    <variant name="CloneMap"
        summary="deep-copying a map's key-value pairs from one session to
                 another"/>
    <variant name="DeleteSessions"
        summary="deleting metadata and optionally map data for one or more
                 sessions"/>
    <variant name="DeleteStorageKeysFromSession"
        summary="deleting metadata and optionally map data for specific
                 storage keys in a session"/>
    <variant name="DestroyDatabase"
        summary="destroying the on-disk database before opening a new one,
                 during recovery or a clear-on-open backing mode for
                 SessionStorage"/>
    <variant name="OpenDatabase2"
        summary="opening the database via DomStorageDatabase::Open"/>
    <variant name="PurgeOrigins"
        summary="purging origins marked for cleanup on shutdown"/>
    <variant name="PutMetadata"
        summary="writing map metadata such as access timestamps or
                 session-to-map associations"/>
    <variant name="ReadAllMetadata"
        summary="reading all map locators. For local storage this includes
                 size and usage metadata, for session storage this includes
                 the next map id"/>
    <variant name="ReadMapKeyValues"
        summary="reading all key-value pairs for a storage area via
                 ReadMapKeyValues"/>
    <variant name="UpdateMaps"
        summary="committing pending map updates via UpdateMaps"/>
  </token>
</histogram>

<histogram
    name="Storage.{DomStorageType}.Recovery.{DomStorageRecoveryReason}.InMemory"
    enum="BooleanSuccess" expires_after="2027-02-24">
  <owner>fergal@chromium.org</owner>
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records whether the database recovery attempt for {DomStorageType} succeeded
    when the database was originally in-memory. True means recovery succeeded
    (re-opened successfully), false means we gave up after attempting and
    failing to reopen. {DomStorageRecoveryReason} indicates what initiated the
    recovery.
  </summary>
</histogram>

<histogram
    name="Storage.{DomStorageType}.Recovery.{DomStorageRecoveryReason}{DomStorageSqliteRolloutStage}"
    enum="DomStorageDatabaseRecoveryOutcome" expires_after="2027-02-24">
  <owner>fergal@chromium.org</owner>
  <owner>leimy@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the outcome of a database recovery attempt for {DomStorageType} that
    started on disk. Emitted once per recovery cycle when reaching a terminal
    state (successful reconnection or gave up). To track ongoing instability, it
    is also emitted each time the commit-error threshold is exceeded after a
    prior recovery attempt, and when post-recovery errors occur but resolve via
    a successful commit. The {DomStorageRecoveryReason} suffix indicates what
    initiated the recovery. The .OnDiskExperimental suffix identifies databases
    in the SQLite rollout experiment (treatment or control group). Its absence
    identifies databases not participating in the experiment.
  </summary>
</histogram>

<histogram name="Storage.{DomStorageType}.ShutdownDroppedChanges"
    enum="Boolean" expires_after="2026-11-01">
  <owner>leimy@chromium.org</owner>
  <owner>stevebe@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records data loss that occurs when browser shutdown discards pending
    changes.
  </summary>
</histogram>

<histogram name="Storage.{DomStorageType}.Sqlite.FreelistBytes" units="KB"
    expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Reclaimable space in the on-disk {DomStorageType} SQLite database, computed
    as the freelist page count times the page size and sampled once when the
    database is opened. This is the space a vacuum would return to the file
    system. Only recorded for on-disk databases.
  </summary>
  <token key="DomStorageType" variants="DomStorageType"/>
</histogram>

<histogram name="Storage.{DomStorageType}.Sqlite.FreelistPercentage" units="%"
    expires_after="2027-07-01">
  <owner>leimy@chromium.org</owner>
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Freelist pages as a percentage of total pages in the on-disk
    {DomStorageType} SQLite database, sampled once when the database is opened.
    Indicates how fragmented the database is. Only recorded for on-disk
    databases.
  </summary>
  <token key="DomStorageType" variants="DomStorageType"/>
</histogram>

<histogram
    name="Storage.{DomStorageType}.{Operation}.{DomStorageBackingStoreLifetime}"
    enum="DomStorageDbStatusType" expires_after="2027-02-10">
  <owner>leimy@chromium.org</owner>
  <owner>fergal@chromium.org</owner>
  <owner>rahsin@microsoft.com</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <summary>
    Records the database status result for {Operation} operations in
    {DomStorageType} using {DomStorageBackingStoreLifetime} database. This helps
    track the success and failure rates of database operations calculated using
    the OK and non-OK results. The non-OK results are not comparable across
    backends. For OpenDatabase, any non-OK result leads to the database getting
    clobbered.
  </summary>
  <token key="Operation">
    <variant name="CleanUpStaleData"/>
    <variant name="CloneMap"/>
    <variant name="DeleteSessions"/>
    <variant name="DeleteStorageKeysFromSession"/>
    <variant name="DestroyDatabase"/>
    <variant name="OpenDatabase"/>
    <variant name="PurgeOrigins"/>
    <variant name="PutMetadata"/>
    <variant name="ReadAllMetadata"/>
    <variant name="ReadMapKeyValues"/>
    <variant name="UpdateMaps"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
