<!--
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 History 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="ClusteringRequestSource">
  <variant name="" summary="all requests"/>
  <variant name=".AllKeywordCacheRefresh"
      summary="only requests for the all-keyword-cache which occurs about
               once every 2 hours but can vary if e.g. the user isn't
               interacting with the omnibox"/>
  <variant name=".NewTabPage"
      summary="only requests for the Journeys module on load of the New Tab
               Page"/>
  <variant name=".ShortKeywordCacheRefresh"
      summary="only requests for the short-keyword cache which occurs up to
               once every 10 seconds but can vary if e.g. the user isn't
               interacting with the omnibox"/>
  <variant name=".WebUI"
      summary="only requests for the Journeys this WebUI within History or
               Side Panel, either query-less or query states, both on load
               and on scroll"/>
</variants>

<variants name="HasCriticalActions">
  <variant name="WithCriticalActions"
      summary="results contained agent visits and critical actions were
               queried from the database"/>
  <variant name="WithoutCriticalActions"
      summary="results contained no agent visits or the critical actions
               feature is disabled"/>
</variants>

<variants name="PassagePriority">
  <variant name="" summary="aggregated across all priorities"/>
  <variant name=".Latent" summary="Latent priority"/>
  <variant name=".Passive" summary="Passive priority"/>
  <variant name=".UserInitiated" summary="User initiated priority"/>
</variants>

<histogram name="History.AttemptedToFixProfileError"
    enum="BooleanDatabaseKilled" expires_after="2026-12-27">
  <owner>etienneb@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Logged whenever history database initialization fails. The frequency of
    logging will tell you the total failure rate. True indicate that we think
    the database is non-recoverable and it will be deleted. It should be
    re-created the next time Chrome is started. False indicates we think the
    error is temporary (like out of disk space or file locked). Chrome will run
    with no history database and nothing will be done to try to fix the error.
    See History.InitializationFailureStep for which particular step of history
    initialization failed.

    Warning: this histogram was expired from 2024-02-11 to 2025-08-21; data may
    be missing.
  </summary>
</histogram>

<histogram name="History.BrowsingDataLifetime.Duration.BrowserShutdownDeletion"
    units="ms" expires_after="2027-04-16">
  <owner>ydago@chromium.org</owner>
  <owner>dullweber@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The time that passed while performing a browsing data deletion using the
    ClearBrowsingDataOnExitList policy. The deletion will be for all time.

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

<histogram
    name="History.BrowsingDataLifetime.Duration.Scheduled{DeletionType}Deletion"
    units="ms" expires_after="2027-04-16">
  <owner>ydago@chromium.org</owner>
  <owner>dullweber@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The time that passed while performing a scheduled data deletion using the
    BrowsingDataSettings policy. The deletion will be for a specific hourly time
    range, the data types being deleted are {DeletionType}.

    Warning: this histogram was expired from 2025-07-01 to 2026-04-15; data may
    be missing.
  </summary>
  <token key="DeletionType">
    <variant name="Filterable" summary="filterable"/>
    <variant name="Unfilterable" summary="unfilterable"/>
  </token>
</histogram>

<histogram name="History.BrowsingHistoryResult.DuplicateVisitsCount"
    units="visits" expires_after="2027-01-31">
  <owner>zalmashni@google.com</owner>
  <owner>rainhard@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Recorded whenever history data is queried for display on chrome://history
    (i.e. when the page is opened, when the user scrolls to the bottom of the
    available list, and when the user changes the search terms). Records the
    number of duplicate visits removed from each query on the client side. If
    kBrowsingHistorySimilarVisitsGrouping experimentis enabled, duplicate visits
    are those that have the same host and title whithin the same day. If the
    experiment is disabled, duplicate visits are those that have the same URL
    whithin the same day.
  </summary>
</histogram>

<histogram name="History.BrowsingHistoryResult.{LocalOrRemote}.{VisitAge}"
    units="visits" expires_after="2027-01-10">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <component>1456716</component>
  <summary>
    Recorded whenever history data is queried for display on chrome://history
    (i.e. when the page is opened, when the user scrolls to the bottom of the
    available list, and when the user changes the search terms). Records the
    number of {LocalOrRemote} visits from {VisitAge}.
  </summary>
  <token key="LocalOrRemote">
    <variant name="Combined" summary="combined (local and remote)"/>
    <variant name="LocalOnly" summary="local-only"/>
    <variant name="RemoteOnly" summary="remote-only"/>
  </token>
  <token key="VisitAge">
    <variant name="PostExpiryThreshold" summary="at most 90 days ago"/>
    <variant name="PreExpiryThreshold" summary="more than 90 days ago"/>
  </token>
</histogram>

<histogram name="History.ClearBrowsingData.Duration.ChromeTask.{Task}"
    units="ms" expires_after="2027-02-07">
  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Records the duration of a ChromeBrowsingDataRemoverDelegate task for {Task}
    deletion.
  </summary>
<!-- LINT.IfChange(History.ClearBrowsingData.Duration.ChromeTask.Task) -->

  <token key="Task">
    <variant name="AccountPasswords" summary="AccountPasswords"/>
    <variant name="AutofillData" summary="AutofillData"/>
    <variant name="AutofillOrigins" summary="AutofillOrigins"/>
    <variant name="CdmLicenses" summary="CdmLicenses"/>
    <variant name="Cookies" summary="Cookies"/>
    <variant name="DisableAutoSigninForAccountPasswords"
        summary="DisableAutoSigninForAccountPasswords"/>
    <variant name="DisableAutoSigninForProfilePasswords"
        summary="DisableAutoSigninForProfilePasswords"/>
    <variant name="DomainReliability" summary="DomainReliability"/>
    <variant name="FaviconCacheExpiration" summary="FaviconCacheExpiration"/>
    <variant name="FieldInfo" summary="FieldInfo"/>
    <variant name="History" summary="History"/>
    <variant name="HostCache" summary="HostCache"/>
    <variant name="HttpAuthCache" summary="HttpAuthCache"/>
    <variant name="MediaDeviceSalts" summary="MediaDeviceSalts"/>
    <variant name="NetworkErrorLogging" summary="NetworkErrorLogging"/>
    <variant name="OfflinePages" summary="OfflinePages"/>
    <variant name="Passwords" summary="Passwords"/>
    <variant name="PasswordsStatistics" summary="PasswordsStatistics"/>
    <variant name="PrivateVerificationTokens"
        summary="PrivateVerificationTokens"/>
    <variant name="ReportingCache" summary="ReportingCache"/>
    <variant name="SecurePaymentConfirmationCredentials"
        summary="SecurePaymentConfirmationCredentials"/>
    <variant name="Synchronous" summary="Synchronous"/>
    <variant name="TpmAttestationKeys" summary="TpmAttestationKeys"/>
    <variant name="UserDataSnapshot" summary="UserDataSnapshot"/>
    <variant name="VideoDecodeHistory" summary="VideoDecodeHistory"/>
    <variant name="WebAppHistory" summary="WebAppHistory"/>
    <variant name="WebAuthnCredentials" summary="WebAuthnCredentials"/>
    <variant name="WebrtcEventLogs" summary="WebrtcEventLogs"/>
    <variant name="WebrtcLogs" summary="WebrtcLogs"/>
  </token>
<!-- LINT.ThenChange(//chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc:TracingDataTypeHistogramSuffix) -->

</histogram>

<histogram name="History.ClearBrowsingData.Duration.FilteredDeletion"
    units="ms" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The time that passed while performing a browsing data deletion with an
    origin filter. The deletion might be for all time or specific time range.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.Duration.FullDeletion" units="ms"
    expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The time that passed while performing a full browsing data deletion.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.Duration.OriginDeletion" units="ms"
    expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The time that passed while performing a browsing data deletion for a set of
    origins.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.Duration.SlowTasks180s"
    enum="BrowsingDataRemoverTasks" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Record tasks from BrowsingDataRemoverImpl that took more than 180s to
    finish.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.Duration.SlowTasks180sChrome"
    enum="ChromeBrowsingDataRemoverTasks" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Record tasks from ChromeBrowsingDataRemoverDelegate that took more than 180s
    to finish.
  </summary>
</histogram>

<histogram
    name="History.ClearBrowsingData.Duration.SlowTasks180sStoragePartition"
    enum="StoragePartitionRemoverTasks" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Record tasks from StoragePartition that took more than 180s to finish.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.Duration.Task.{Task}" units="ms"
    expires_after="2027-02-07">
  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Records the duration of a BrowsingDataRemoverImpl task for {Task} deletion.
  </summary>
<!-- LINT.IfChange(History.ClearBrowsingData.Duration.Task.Task) -->

  <token key="Task">
    <variant name="AuthCache" summary="AuthCache"/>
    <variant name="ChannelIds" summary="ChannelIds"/>
    <variant name="CodeCaches" summary="CodeCaches"/>
    <variant name="Downloads" summary="Downloads"/>
    <variant name="EmbedderData" summary="EmbedderData"/>
    <variant name="HttpAndMediaCaches" summary="HttpAndMediaCaches"/>
    <variant name="HttpCache" summary="HttpCache"/>
    <variant name="NetworkErrorLogging" summary="NetworkErrorLogging"/>
    <variant name="NetworkHistory" summary="NetworkHistory"/>
    <variant name="PrefetchCache" summary="PrefetchCache"/>
    <variant name="PreflightCache" summary="PreflightCache"/>
    <variant name="PrerenderCache" summary="PrerenderCache"/>
    <variant name="ReportingCache" summary="ReportingCache"/>
    <variant name="SharedDictionary" summary="SharedDictionary"/>
    <variant name="SharedStorage" summary="SharedStorage"/>
    <variant name="StoragePartition" summary="StoragePartition"/>
    <variant name="Synchronous" summary="Synchronous"/>
    <variant name="TrustTokens" summary="TrustTokens"/>
  </token>
<!-- LINT.ThenChange(//content/browser/browsing_data/browsing_data_remover_impl.h:TracingDataType) -->

</histogram>

<histogram name="History.ClearBrowsingData.Duration.TimeRangeDeletion"
    units="ms" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The time that passed while performing a browsing data deletion for a
    restricted amount of time (e.g. &quot;Last hour&quot;) without an origin
    filter.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.ImportantDeselectedNum"
    units="units" expires_after="2024-10-04">
  <owner>ayui@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <component>1456716</component>
  <summary>
    Recorded when the user presses the 'clear' button when presented with the
    list of important sites they might want to exclude from clearing browsing
    data. We record the number of sites the user deselected, or protected, from
    clearing. The default has all sites selected.

    This histogram expired between M95 and M115, and may have incomplete data
    within that range.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.ImportantDeselectedPercent"
    units="%/5" expires_after="2024-10-04">
  <owner>ayui@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <component>1456716</component>
  <summary>
    Recorded when the user presses the 'clear' button when presented with the
    list of important sites they might want to exclude from clearing browsing
    data. We record the percent of sites the user deselected, or protected, from
    clearing. The default has all sites selected, which is 0%. Note: To reduce
    the number of empty buckets, the percent is divided by 5.

    This histogram expired between M95 and M115, and may have incomplete data
    within that range.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.ImportantDialogShown"
    enum="BooleanShown" expires_after="2026-02-22">
  <owner>ayui@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <component>1456716</component>
  <summary>
    Recorded when the user presses the 'clear' button in the clear browsing
    dialog. We record 'true' if the important sites dialog is shown.

    This histogram expired between M95 and M115, and may have incomplete data
    within that range.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.NumImportant" units="units"
    expires_after="2025-10-12">
  <owner>ayui@chromium.org</owner>
  <owner>chrome-owp-storage@google.com</owner>
  <component>1456716</component>
  <summary>
    Recorded when we successfully fetched important sites in the clear browsing
    data screen. This is the number of sites that we think are important to the
    user.

    This histogram expired between M95 and M115, and may have incomplete data
    within that range.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.TaskQueueAtShutdown" units="units"
    expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>dullweber@chromium.org</owner>
  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of tasks that are in the task queue when the BrowsingDataRemover
    is destroyed.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.UserDeletedCookieOrCache"
    enum="CookieOrCacheDeletion" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Recorded when the user deletes their browsing data. Shows whether cookies
    and/or cache were among the selected data types.
  </summary>
</histogram>

<histogram name="History.ClearBrowsingData.UserDeletedCookieOrCacheFromDialog"
    enum="CookieOrCacheDeletion" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>msramek@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Recorded when the user deletes their browsing data manually from the
    ClearBrowsingData dialog. Shows whether cookies and/or cache were among the
    selected data types.
  </summary>
</histogram>

<histogram name="History.Clusters.Actions.DidMakeQuery" enum="BooleanQueried"
    expires_after="2025-06-08">
  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logged when the user closes the chrome://history/journeys page (e.g. closed
    tab, navigated in the same tab, or closed browser). Logs whether the user
    made a query on their history from the journeys page.
  </summary>
</histogram>

<histogram name="History.Clusters.Actions.FinalState.Number{Event}"
    units="count" expires_after="never">
<!-- expires-never: part of vital metric ChromeSearch.Actions -->

  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logged when the user closes the chrome://history/journeys page (e.g. closed
    tab, navigated in the same tab, or closed browser). Logs the number of
    {Event} over the period of a single visit to the Journeys UI.
  </summary>
  <token key="Event">
    <variant name="ClustersDeleted" summary="cluster deletions"/>
    <variant name="IndividualVisitsDeleted"
        summary="single/individual visits deleted"/>
    <variant name="LinksOpened" summary="links opened"/>
    <variant name="RelatedSearchesClicked"
        summary="related search links opened"/>
    <variant name="TogglesToBasicHistory"
        summary="Toggles to from basic history UI"/>
    <variant name="VisibilityToggles" summary="Journeys UI toggles on/off"/>
  </token>
</histogram>

<histogram name="History.Clusters.Actions.FinalState.WasSuccessful"
    enum="BooleanSuccess" expires_after="2025-09-14">
  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logged when the user closes the chrome://history/journeys page (e.g., closed
    tab, navigated in the same tab, or closed browser). Logs whether the users
    interaction with the UI was deemed successful or not. Success is defined as
    a link was clicked, a cluster was opened, or a deletion event occurred.
  </summary>
</histogram>

<histogram name="History.Clusters.Actions.InitialState"
    enum="HistoryClustersInitialState" expires_after="never">
<!-- expires-never: part of vital metric ChromeSearch.Actions -->

  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logged when the user closes the chrome://history/journeys page (e.g. closed
    tab, navigated in the same tab, or closed browser). Logs the state that
    started the use of the journeys page (e.g., a direct navigation to journeys
    page).
  </summary>
</histogram>

<histogram name="History.Clusters.Actions.LinksOpened" units="links opened"
    expires_after="2024-04-28">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logged when the user closed the chrome://history/journeys page (e.g. closed
    tab, navigated in the same tab, or closed browser). Logs the # of links
    opened from the journeys page.
  </summary>
</histogram>

<histogram name="History.Clusters.Actions.NumQueries"
    units="number queries made" expires_after="2026-01-18">
  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logged when the user closes the chrome://history/journeys page (e.g. closed
    tab, navigated in the same tab, or closed browser). Logs the number of
    queries the user made while on the journeys page, only logged if at least
    one query was made.
  </summary>
</histogram>

<histogram
    name="History.Clusters.Backend.ClusterSimilarityHeuristicsProcessor.ClusterSearchTermOverriden"
    enum="Boolean" expires_after="2024-04-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs whether the canonical search term for the cluster was overridden when
    one was already generated for it. Logged for all but the first search visit
    in each cluster processed that has multiple search visits when the Journeys
    UI is shown.

    A cluster can have multiple search visits and we expect that search visits
    in the same cluster all have the same search term (or no search term at
    all). However, this does not seem to be true as we have seen crashes in the
    wild that make this assumption. This metric tracks how often a search visit
    had non-empty search terms that differed from the search terms of the
    previous search visit with non-empty search terms in the same cluster.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.ComputeClusters.ThreadTime"
    units="ms" expires_after="2024-04-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the time taken to cluster visits once the visits have been finalized
    with all the necessary information for clustering, which is performed on a
    background worker. This does not include any thread hop or queuing delay.
    Logged when clusters have been calculated based on any request to cluster
    visits, which could be triggered from several things, including loading the
    journeys UI, putting a query in the journeys page, etc.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.ComputeClustersForUI.ThreadTime"
    units="ms" expires_after="2024-04-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the time taken to determine how clusters should be displayed once the
    initial context clusters have been formed, which is performed on a
    background worker. This does not include any thread hop or queuing delay.
    Logged when clusters have been calculated based on any request to cluster
    visits, which could be triggered from several things, including loading the
    journeys UI, putting a query in the journeys page, etc. This is a segment
    within `History.Clusters.Backend.ComputeClusters.ThreadTime`.
  </summary>
</histogram>

<histogram
    name="History.Clusters.Backend.ComputeClusterTriggerability2.ThreadTime"
    units="ms" expires_after="2024-04-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the time taken to run the steps during a clustering pass that are
    required for determinining the triggerability for a cluster, which is
    performed on a background worker. This does not include any thread hop or
    queuing delay. Logged when clusters have been calculated based on any
    request to cluster visits, which could be triggered from several things,
    including loading the journeys UI, putting a query in the journeys page,
    etc. This is a segment within
    `History.Clusters.Backend.ComputeClusters.ThreadTime`.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.ContextClusterer.ThreadTime"
    units="ms" expires_after="2025-03-09">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the time taken to run the initial context clustering pass, which is
    performed on a background worker. This does not include any thread hop or
    queuing delay. Logged when clusters have been calculated based on any
    request to cluster visits, which could be triggered from several things,
    including loading the journeys UI, putting a query in the journeys page,
    etc. This is a segment within
    `History.Clusters.Backend.ComputeClusters.ThreadTime`.
  </summary>
</histogram>

<histogram
    name="History.Clusters.Backend.FilterClusterProcessor.ClusterFilterReason{Source}"
    enum="ClusterFilterReason" expires_after="2024-12-08">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the reason why a cluster was filtered out of the return set for each
    cluster provided to the clustering backend when invoked by {Source}. Note
    that a single cluster can log multiple values in this metric if it is
    ineligible for multiple reasons.
  </summary>
  <token key="Source" variants="ClusteringRequestSource"/>
</histogram>

<histogram
    name="History.Clusters.Backend.FilterClusterProcessor.NumClusters.{Segment}{Source}"
    units="counts" expires_after="2024-06-02">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the number of clusters {Segment} each time {Source} invokes the
    clustering backend with a functional filtering configuration. Note that the
    max count is limited to the size of the initial batch sent to the clustering
    backend.
  </summary>
  <token key="Segment">
    <variant name="PostFilter" summary="after applying the filtering criteria"/>
    <variant name="PreFilter" summary="before applying the filtering criteria"/>
  </token>
  <token key="Source" variants="ClusteringRequestSource"/>
</histogram>

<histogram name="History.Clusters.Backend.KeywordCache.AllKeywordsCount"
    units="count" expires_after="2025-07-13">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the number of keywords stored in the primary cache. Each keyword may
    actually be multiple words.

    Logged each time the primary cache is refreshed, i.e. on omnibox key stroke
    limited to at most once every 2 hours, though clearing history items will
    reset the cache timer.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.NumClustersReturned"
    units="number clusters returned" expires_after="2024-04-28">
  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the total number of clusters returned for requested visits. Logged when
    clusters have been calculated based on any request to cluster visits, which
    could be triggered from several things, including loading the journeys UI,
    putting a query in the journeys page, etc..
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.NumVisitsBelowFold"
    units="number visits" expires_after="2025-06-08">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the number of visits that are &quot;below the fold&quot; in each
    cluster after hidden and done visits have been culled. Logged for each
    cluster that is shown to the user in the Journeys WebUI.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.NumVisitsBelowFoldPercentage"
    units="%" expires_after="2024-04-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the percentage of visits that are &quot;below the fold&quot; in each
    cluster after hidden and done visits have been culled. Logged for each
    cluster that is shown to the user in the Journeys WebUI.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.NumVisitsToCluster"
    units="number visits" expires_after="2024-04-28">
  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the total number of visits requested to be clustered by the backend.
    Logged when any request to cluster visits is made, which could be triggered
    from several things, including loading the journeys UI, putting a query in
    the journeys page, etc..
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.ProcessBatchOfVisits.ThreadTime"
    units="ms" expires_after="2025-07-13">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs the time taken to process a batch of visits (joining existing History
    visit metadata with any additional Search, engagement, content metadata) and
    is performed on the UI thread. This does not include any thread hop or
    queuing delay. Can be logged multiple times when a request to cluster visits
    is made, which could be triggered from several things, including loading the
    journeys UI, putting a query in the journeys page, etc... depending on how
    many visits were sent to the backend to cluster.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.QueryAnnotatedVisits.ThreadTime"
    units="ms" expires_after="2026-03-29">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    This histogram records the time taken (excluding queuing delay) to retrieve
    visits from the History database, which occurs on the History DB thread.
    Logged once per request to cluster visits is made, which could be triggered
    from several things, including loading the journeys UI, putting a query in
    the journeys page, etc.
  </summary>
</histogram>

<histogram name="History.Clusters.Backend.UpdateClusters.Counts.{Segment}"
    units="count" expires_after="2024-04-28">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Near startup and every 1 hour afterwards, unclustered visits are clustered,
    and the clusters are persisted in the history DB.

    As needed, both fresh and persisted clusters are fetched. Clusters are
    fetched for: a) displaying on the Journeys WebUI and b) generating keyword
    caches to match with omnibox inputs and show journey chips or suggestions in
    the omnibox.

    Each update consists of multiple batches of 1-3 days. The number of batches
    depends on how long ago the last update occurred, which could have been 0-90
    days ago.

    Recorded for every batch of visits clustered; can be recorded more than once
    every hour.

    {Segment}
  </summary>
  <token key="Segment">
    <variant name="NumClustersReplaced"
        summary="This slice records the number of clusters included in the
                 visits and therefore replaced from the DB. Not recorded if
                 there were 0 visits. Recorded even if there were 0 model
                 clusters or 0 replaced clusters."/>
    <variant name="NumClustersReturned"
        summary="This slice records the number of clusters returned from the
                 cluster model. Not recorded if there were 0 visits. Recorded
                 een if there were 0 clusters."/>
    <variant name="NumVisitsToCluster"
        summary="This slice records the number of visits returned and sent to
                 the cluster model. Recorded even if there were 0 visits."/>
  </token>
</histogram>

<histogram name="History.Clusters.Backend.UpdateClusters.{Segment}" units="ms"
    expires_after="2024-03-31">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Near startup and every 1 hour afterwards, unclustered visits are clustered,
    and the clusters are persisted in the history DB.

    As needed, both fresh and persisted clusters are fetched. Clusters are
    fetched for: a) displaying on the Journeys WebUI and b) generating keyword
    caches to match with omnibox inputs and show journey chips or suggestions in
    the omnibox.

    This histogram records the latency breakdown for updating clusters.

    Recorded for every batch of visits clustered; can be recorded more than once
    every hour.

    This slice records the time between the main thread requesting and
    {Segment}.
  </summary>
  <token key="Segment">
    <variant name="ComputeClustersLatency"
        summary="receiving clusters from the model"/>
    <variant name="GetAnnotatedVisitsToClusterLatency"
        summary="receiving annotated visits to cluster (which can include
                 clustered, unclustered, incomplete, and complete visits)"/>
    <variant name="PersistClustersLatency"
        summary="receiving acknowledgement for completion of persisting the
                 clusters to the history DB"/>
    <variant name="Total"
        summary="the main thread being notified that the work was completed"/>
  </token>
</histogram>

<histogram
    name="History.Clusters.Backend.UpdateClusterTriggerability.DidUpdateClusterTriggerability{Segment}"
    enum="Boolean" expires_after="2024-11-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    On navigation, context clusters are created, grown, and persisted.

    On startup and every 1 hour afterwards, these context clusters have their
    triggability calculated. Context clusters older than 2 hours are not updated
    are not re-updated after the initial triggability is calculated. However, if
    there are unclustered visits (due to visits from before the user had context
    clustering enabled or synced visits without a cluster ID), they will also be
    context clustered with their triggerability calculated as well.

    When a user visits the Journeys WebUI, persisted clusters (both those with
    and without triggerability calculated) are fetched. Clusters are then
    augmented with appropriate metadata needed for displaying on the Journeys
    WebUI (e.g. ranking, deduping, labeling).

    When the keyword cache used to match omnibox inputs and show journey chips
    or suggestions in the omnibox needs updating, context clusters (both those
    with and without triggerability calculated) are fetched.

    This histogram records whether there was at least one cluster's
    triggerability was updated {Segment}.

    Recorded for every batch of clusters to be updated; can be recorded more
    than once every hour (Finch-configurable).
  </summary>
  <token key="Segment">
    <variant name="" summary="during a run of the task"/>
    <variant name=".AfterFilteredClustersEmpty"
        summary="after a call to fetch persisted clusters returned only
                 clusters that have all had their triggerability calculated
                 already"/>
  </token>
</histogram>

<histogram
    name="History.Clusters.Backend.UpdateClusterTriggerability.HadUnclusteredVisitsToCluster"
    enum="Boolean" expires_after="2024-06-02">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    On navigation, context clusters are created, grown, and persisted.

    On startup and every 1 hour afterwards, these context clusters have their
    triggability calculated. Context clusters older than 2 hours are not updated
    are not re-updated after the initial triggability is calculated. However, if
    there are unclustered visits (due to visits from before the user had context
    clustering enabled or synced visits without a cluster ID), they will also be
    context clustered with their triggerability calculated as well.

    When a user visits the Journeys WebUI, persisted clusters (both those with
    and without triggerability calculated) are fetched. Clusters are then
    augmented with appropriate metadata needed for displaying on the Journeys
    WebUI (e.g. ranking, deduping, labeling).

    When the keyword cache used to match omnibox inputs and show journey chips
    or suggestions in the omnibox needs updating, context clusters (both those
    with and without triggerability calculated) are fetched.

    This histogram records whether there were unclustered visits left to cluster
    in the first run of this task. When this trends to all false, this
    additional step can get deleted.

    Recorded for every batch of clusters to be updated; can be recorded more
    than once every hour.
  </summary>
</histogram>

<histogram
    name="History.Clusters.Backend.UpdateClusterTriggerability.{Segment}"
    units="ms" expires_after="2025-09-07">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    On navigation, context clusters are created, grown, and persisted.

    On startup and every 1 hour afterwards, these context clusters have their
    triggability calculated. Context clusters older than 2 hours are not updated
    are not re-updated after the initial triggability is calculated. However, if
    there are unclustered visits (due to visits from before the user had context
    clustering enabled or synced visits without a cluster ID), they will also be
    context clustered with their triggerability calculated as well.

    When a user visits the Journeys WebUI, persisted clusters (both those with
    and without triggerability calculated) are fetched. Clusters are then
    augmented with appropriate metadata needed for displaying on the Journeys
    WebUI (e.g. ranking, deduping, labeling).

    When the keyword cache used to match omnibox inputs and show journey chips
    or suggestions in the omnibox needs updating, context clusters (both those
    with and without triggerability calculated) are fetched.

    This histogram records the latency breakdown for updating cluster
    triggerability.

    Recorded for every batch of clusters to be updated; can be recorded more
    than once every hour.

    This slice records the time between the main thread requesting and
    {Segment}.
  </summary>
  <token key="Segment">
    <variant name="ComputeClusterTriggerabilityLatency"
        summary="receiving cluster triggerability metadata from the model"/>
    <variant name="ComputeContextClustersLatency"
        summary="receiving context clusters from unclustered visits from the
                 model"/>
    <variant name="GetAnnotatedVisitsToClusterLatency"
        summary="receiving persisted unclustered visits to compute context
                 clusters for for"/>
    <variant name="GetMostRecentPersistedClustersLatency"
        summary="receiving persisted clusters to compute cluster
                 triggerability metadata for"/>
    <variant name="PersistClusterTriggerabilityLatency"
        summary="receiving acknowledgement for completion of persisting the
                 cluster triggerability metadata to the history DB"/>
    <variant name="PersistContextClustersLatency"
        summary="receiving acknowledgement for completion of persisting the
                 context clusters formed from unclustered visits to the
                 history DB"/>
    <variant name="Total"
        summary="the main thread being notified that the work was completed"/>
  </token>
</histogram>

<histogram
    name="History.Clusters.Backend.WasClusterFiltered.{ClusterFilterReason}"
    enum="BooleanFiltered" expires_after="2024-10-06">
  <owner>mcrouse@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Logs whether a cluster was filtered for having {ClusterFilterReason}. Logged
    when finalizing each individual cluster which occurs at the end of every
    clustering backend request.
  </summary>
  <token key="ClusterFilterReason">
    <variant name="Category" summary="all non-complex categories"/>
    <variant name="NoisyCluster" summary="all noisy visits"/>
    <variant name="SingleVisit" summary="only a single visit"/>
    <variant name="VisibilityScore" summary="low visibility score"/>
  </token>
</histogram>

<histogram name="History.Clusters.ContextClusterer.DbLatency.{Segment}"
    units="ms" expires_after="2024-12-08">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    When the user visits a page, `ContextClustererHistoryServiceObserver`
    considers whether to add the visit to a new cluster or an existing cluster.

    This histogram records the processing breakdown for persisting visits to
    group them into context clusters. Recorded each time {Segment}. The
    histograms here summed up with the histograms as part of
    `History.Clusters.ContextClusterer.VisitProcessingLatency` record the total
    latency for context clustering.
  </summary>
  <token key="Segment">
    <variant name="AddVisitsToCluster"
        summary="new visits are added to an existing cluster"/>
    <variant name="ReserveNextClusterId"
        summary="a cluster is determined and requires a new cluster ID"/>
    <variant name="UpdateClusterVisit"
        summary="additional visit metadata has been calculated for an
                 existing visit already part of a cluster and needs to be
                 updated"/>
  </token>
</histogram>

<histogram
    name="History.Clusters.ContextClusterer.NumUnpersistedVisitsBeforeClusterPersisted"
    units="num unpersisted visits" expires_after="2024-06-02">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    When we decide a new visit belongs to a new cluster, we asyncly reserve a
    new cluster ID and add the visit to the cluster. When subsequent visits
    belong to the same cluster, we asyncly add those visits to the cluster. When
    the latter occurs before the former completes, i.e. when there are multiple
    visits done that belong in the same cluster before the cluster ID was
    reserved, we queue those subsequent visits and only add them when the
    cluster ID is reserved.

    This histogram records the number of visits that were waiting to be
    persisted while waiting for the persisted ID of the containg cluster to be
    received. Recorded at most once per cluster that is generated via the
    navigation graph.
  </summary>
</histogram>

<histogram
    name="History.Clusters.ContextClusterer.VisitProcessingLatency.{Segment}"
    units="ms" expires_after="2024-10-06">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    When the user visits a page, `ContextClustererHistoryServiceObserver`
    considers whether to add the visit to a new cluster or an existing cluster.

    This histogram records the processing breakdown for processing visits to
    group them into context clusters. Recorded each time {Segment}. The
    histograms here summed up with the histograms as part of
    `History.Clusters.ContextClusterer.DbLatency` record the total latency for
    context clustering.
  </summary>
  <token key="Segment">
    <variant name="CleanUpTimer"
        summary="a clean-up pass has invoked, roughly once every ten minutes
                 (Finch-configurable)"/>
    <variant name="UrlsDeleted" summary="a set of URLs has beeen deleted"/>
    <variant name="UrlVisited" summary="a URL is visited"/>
  </token>
</histogram>

<histogram name="History.Clusters.JourneysEligibleAndEnabledAtSessionStart"
    enum="BooleanEnabled" expires_after="2025-01-05">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Records whether a user that is Journeys eligible has Journeys enabled. This
    is recorded once at the start of the session.
  </summary>
</histogram>

<histogram name="History.Clusters.KeywordCache.Latency" units="ms"
    expires_after="2025-07-06">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Records the total amount of time spent populating the keyword cache,
    measured via the wall clock. Most of this time is not on the main thread.

    The total time spent populating the keywords cache will be:
    History.Clusters.KeywordCache.Latency = (number of batches) * (latency of
    fetching and computing clusters + History.Clusters.KeywordCache.ThreadTime).
    Historically, the breakdown of fetching and computing latency was recorded
    in History.Clusters.Backend.GetMostRecentClusters.* histograms.
  </summary>
</histogram>

<histogram name="History.Clusters.KeywordCache.LoadCachesFromPrefs.Latency"
    units="ms" expires_after="2025-06-08">
  <owner>pnoland@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Records the amount of time spent reading all caches from the pref service
    and deserializing them. Recorded when these caches are read from prefs,
    which is once at startup. This is not recorded if the pref service is null.
  </summary>
</histogram>

<histogram name="History.Clusters.KeywordCache.ThreadTime" units="ms"
    expires_after="2025-07-06">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    This measures the amount of main thread time spent populating the keyword
    cache AFTER we get it from the backend.

    See History.Clusters.KeywordCache.Latency for the full wall clock time.
  </summary>
</histogram>

<histogram name="History.Clusters.KeywordCache.WriteCache.{CacheType}.Latency"
    units="ms" expires_after="2024-10-06">
  <owner>pnoland@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Records the amount of time spent serializing and writing a keyword cache to
    the pref service. Recorded every time a cache is written to prefs, which is
    every time one is updated. This is not recorded if the pref service is null.
  </summary>
  <token key="CacheType">
    <variant name="All"
        summary="Records time spent writing the 'all keywords' cache."/>
    <variant name="Short"
        summary="Records time spent writing the short keyword cache."/>
  </token>
</histogram>

<histogram name="History.Clusters.ProcessClustersDuration" units="ms"
    expires_after="2024-11-03">
  <owner>olivierli@chromium.org</owner>
  <owner>manukh@chromium.org</owner>
  <component>1457319</component>
  <summary>
    This histogram records the total time taken to convert and process visits in
    all history cluster available. This is recorded once after the conversion,
    deduplication and sorting of the clusters. This is recorded using the
    highest precision clock possible. Like most time measurements this will not
    have the same behavior regarding system sleep on all platforms. See
    bit.ly/chrome-clocks-and-sleep for more details. Since the measurement is
    taken after the operation is over it will be missing if the operation never
    completes. This can happen if the user or the system shuts down chrome
    because of the unresponsiveness. A decidedly imperfect strategy to evaluate
    how often this happens is to compare total counts with another histogram
    that is recorded before the operation starts
    (&quot;History.Clusters.Backend.GetClusterLatency&quot;). Such analysis has
    to be conducted with care. Consult with Metrics team if curious.
  </summary>
</histogram>

<histogram name="History.Clusters.UIActions.Cluster.{ClusterAction}"
    units="index" expires_after="2025-08-24">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Recorded every time the user {ClusterAction} in chrome://history/journeys.
    The value represents the 0-indexed index of the cluster.
  </summary>
  <token key="ClusterAction">
    <variant name="Deleted" summary="deletes a history cluster"/>
    <variant name="OpenedInTabGroup"
        summary="opens the visit urls in a history cluster in a new tab group"/>
    <variant name="RelatedSearchClicked"
        summary="clicks a related search suggestion"/>
    <variant name="RelatedVisitsVisibilityToggled"
        summary="toggles visibility of the default-hidden related visits.
                 Deprecated 1/25/23."/>
    <variant name="VisitClicked" summary="clicks a visit"/>
  </token>
</histogram>

<histogram
    name="History.Clusters.UIActions.RelatedSearch.{RelatedSearchAction}"
    units="index" expires_after="2025-06-08">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Recorded every time the user {RelatedSearchAction} a related search
    suggestion in a history cluster in chrome://history/journeys. The value
    represents the 0-indexed index of the related search suggestion in the
    respective cluster.
  </summary>
  <token key="RelatedSearchAction">
    <variant name="Clicked" summary="clicks"/>
  </token>
</histogram>

<histogram name="History.Clusters.UIActions.ToggledVisibility"
    enum="BooleanVisible" expires_after="2024-04-28">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Recorded every time the user toggles the visibility of the history clusters
    Web UI shown at chrome://history/journeys from the history Web UI sidebar.
    The value represents the visibility of the history clusters Web UI.
  </summary>
</histogram>

<histogram name="History.Clusters.UIActions.{VisitType}Visit.{VisitAction}"
    units="index" expires_after="2025-06-22">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Recorded every time the user {VisitAction} a {VisitType} in a history
    cluster in chrome://history/journeys. The value represents the 0-indexed
    index of the visit in the respective cluster.
  </summary>
  <token key="VisitAction">
    <variant name="Clicked" summary="clicks"/>
    <variant name="Deleted" summary="deletes"/>
    <variant name="Hidden" summary="hides"/>
  </token>
  <token key="VisitType">
    <variant name="" summary="visit"/>
    <variant name="nonSRP"
        summary="visit to a url other than the default search results page"/>
    <variant name="SRP" summary="visit to the default search results page"/>
  </token>
</histogram>

<histogram name="History.Clusters.UpdateClusters.TimeBetweenTasks" units="ms"
    expires_after="2024-09-01">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    The time elapsed between subsequent cluster update tasks
    (HistoryClustersServiceTaskUpdateClusters). Depending on finch params, this
    occurs either:

    1) Never (e.g. if updating and persisting clusters is disabled).

    2) OR N time after startup in addition to every M time; where N is typically
    5-60 minutes, and M is typically 1-12 hours.

    3) OR on keyword refresh request bounded to at most every M time, where M is
    typically 1-12 hours. Keyword refresh requests occur when the omnibox input
    looks like a search query and journeys in the omnibox is enabled.
  </summary>
</histogram>

<histogram name="History.Clusters.WebUISessionDuration" units="ms"
    expires_after="2025-06-08">
  <owner>manukh@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1457319</component>
  <summary>
    Records the amount of time the Journeys WebUI is open.

    This timer is started when the Journeys WebUI is loaded. The Journeys WebUI
    is loaded when either the user directly goes to the Journeys WebUI, or when
    the user switches to the Journeys tab from a different tab.

    The timer is stopped and the elapsed time recorded when either the whole
    WebUI is closed, or if the user disables the Journeys preference, or if the
    user switches tabs off the Journeys tab onto a different one.

    Elapsed times longer than one hour are recorded as one hour.
  </summary>
</histogram>

<histogram name="History.DatabaseFileMB" units="MB" expires_after="2025-06-22">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1456716</component>
  <summary>
    Size of History DB file. Duplicate of Profile.HistorySize and
    Sqlite.SizeKB.History. Logged on initialization of the History DB on 1% of
    starts.
  </summary>
</histogram>

<histogram name="History.DatabaseSqliteError" enum="SqliteLoggedResultCode"
    expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-journeys@google.com</owner>
  <component>1456716</component>
  <summary>
    The exact database error encountered when initializing the database, if
    failed.
  </summary>
</histogram>

<histogram name="History.DatabaseTooOld" enum="HistoryDatabaseVersion"
    expires_after="2026-09-12">
  <owner>jpgravel@chromium.org</owner>
  <owner>etienneb@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The version of the database found on disk if it's too old to be migrated to
    the current version.
  </summary>
</histogram>

<histogram name="History.DatabaseVersion" enum="HistoryDatabaseVersion"
    expires_after="2027-01-17">
  <owner>jpgravel@chromium.org</owner>
  <owner>etienneb@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The version of the database loaded during initialization. This is the
    version loaded from disk, before the database is migrated to the current
    version.
  </summary>
</histogram>

<histogram name="History.DomainCount1Day_V3" units="domains"
    expires_after="2027-01-17">
  <owner>mpearson@chromium.org</owner>
  <owner>mjzhang@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <improvement direction="HIGHER_IS_BETTER"/>
  <summary>
    Number of unique domains visited by the user within a calendar day in user's
    local timezone, excluding domains that have only ever had visits with a
    4XX/5XX HTTP response code. For each regular profile (not incognito, guest,
    system, etc.), reported at profile open (which usually happens at startup)
    for each unreported day (up to 7 days) prior to the current date, and also
    reported once every 24 hours thereafter for the latest unreported day, while
    the profile remains open. If no domains are visited in a given day, a count
    of 0 will be reported for that day.

    Warning about Android activity types (custom tabs, browser app, etc.): Do
    not look at this data using an activity type filter; when looking at data
    from Android, use &quot;Android Chrome (All)&quot;. Why? This histogram
    reflects all usage of the browser. Using a filter such as &quot;Browser
    App&quot; is not appropriate because it doesn't make sense to ask &quot;how
    many web sites were visited in Chrome (in any mode) the last week but only
    tell me if the answer if this current launch was in browser app mode.&quot;

    Warning about delayed data: Chrome may upload logs on a given day without
    uploading this histogram. This can happen because Chrome uploads logs
    initially upon startup. This histogram is emitted shortly _after_ startup.
    In the case of short sessions, it's possible the log with this histogram did
    not have time to be uploaded. Generally the log will be cached and uploaded
    the next time the user starts Chrome. We should still get one count per
    calendar day; it simply may not be on the day the metric was computed.
    (Exception: on Android before M-91, sometimes these emitted histograms were
    lost due to lack of robust &quot;background logging&quot;.)

    Note: This histogram attempts to emit every 24 hours that the device is on,
    but the timer does not increment while the machine is suspended. Prefer the
    V4 version of this metric which accounts for suspended time.
  </summary>
</histogram>

<histogram name="History.DomainCount1Day_V4" units="domains"
    expires_after="2027-01-17">
  <owner>mpearson@chromium.org</owner>
  <owner>mjzhang@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <improvement direction="HIGHER_IS_BETTER"/>
  <summary>
    Number of unique domains visited by the user within a calendar day in user's
    local timezone, excluding domains that have only ever had visits with a
    4XX/5XX HTTP response code. For each regular profile (not incognito, guest,
    system, etc.), reported at profile open (which usually happens at startup)
    for each unreported day (up to 7 days) prior to the current date, and also
    reported once every 24 hours thereafter for the latest unreported day, while
    the profile remains open. If no domains are visited in a given day, a count
    of 0 will be reported for that day.

    Warning about Android activity types (custom tabs, browser app, etc.): Do
    not look at this data using an activity type filter; when looking at data
    from Android, use &quot;Android Chrome (All)&quot;. Why? This histogram
    reflects all usage of the browser. Using a filter such as &quot;Browser
    App&quot; is not appropriate because it doesn't make sense to ask &quot;how
    many web sites were visited in Chrome (in any mode) the last week but only
    tell me if the answer if this current launch was in browser app mode.&quot;

    Warning about delayed data: Chrome may upload logs on a given day without
    uploading this histogram. This can happen because Chrome uploads logs
    initially upon startup. This histogram is emitted shortly _after_ startup.
    In the case of short sessions, it's possible the log with this histogram did
    not have time to be uploaded. Generally the log will be cached and uploaded
    the next time the user starts Chrome. We should still get one count per
    calendar day; it simply may not be on the day the metric was computed.
    (Exception: on Android before M-91, sometimes these emitted histograms were
    lost due to lack of robust &quot;background logging&quot;.)
  </summary>
</histogram>

<histogram name="History.DomainCount28Day_V3" units="domains"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>mjzhang@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <summary>
    Number of unique domains visited by the user within a 28 calendar day period
    in user's local timezone, excluding domains that have only ever had visits
    with a 4XX/5XX HTTP response code. For each regular profile (not incognito,
    guest, system, etc.), reported at profile open (which usually happens at
    startup) for each unreported 28-day period (up to 7 periods) ending on the
    current day, current day - 1, current day - 2, etc. Also reported once every
    24 hours thereafter for the latest unreported period, while the profile
    remains open. If no domains are visited during a 28-day period, a count of 0
    will be reported for that period.

    Warning about Android activity types (custom tabs, browser app, etc.): Do
    not look at this data using an activity type filter; when looking at data
    from Android, use &quot;Android Chrome (All)&quot;. Why? This histogram
    reflects all usage of the browser. Using a filter such as &quot;Browser
    App&quot; is not appropriate because it doesn't make sense to ask &quot;how
    many web sites were visited in Chrome (in any mode) the last week but only
    tell me if the answer if this current launch was in browser app mode.&quot;

    Warning about delayed data: Chrome may upload logs on a given day without
    uploading this histogram. This can happen because Chrome uploads logs
    initially upon startup. This histogram is emitted shortly _after_ startup.
    In the case of short sessions, it's possible the log with this histogram did
    not have time to be uploaded. Generally the log will be cached and uploaded
    the next time the user starts Chrome. We should still get one count per
    calendar day; it simply may not be on the day the metric was computed.
    (Exception: on Android before M-91, sometimes these emitted histograms were
    lost due to lack of robust &quot;background logging&quot;.)

    Note: This histogram attempts to emit every 24 hours that the device is on,
    but the timer does not increment while the machine is suspended. Prefer the
    V4 version of this metric which accounts for suspended time.
  </summary>
</histogram>

<histogram name="History.DomainCount28Day_V4" units="domains"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>mjzhang@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <summary>
    Number of unique domains visited by the user within a 28 calendar day period
    in user's local timezone, excluding domains that have only ever had visits
    with a 4XX/5XX HTTP response code. For each regular profile (not incognito,
    guest, system, etc.), reported at profile open (which usually happens at
    startup) for each unreported 28-day period (up to 7 periods) ending on the
    current day, current day - 1, current day - 2, etc. Also reported once every
    24 hours thereafter for the latest unreported period, while the profile
    remains open. If no domains are visited during a 28-day period, a count of 0
    will be reported for that period.

    Warning about Android activity types (custom tabs, browser app, etc.): Do
    not look at this data using an activity type filter; when looking at data
    from Android, use &quot;Android Chrome (All)&quot;. Why? This histogram
    reflects all usage of the browser. Using a filter such as &quot;Browser
    App&quot; is not appropriate because it doesn't make sense to ask &quot;how
    many web sites were visited in Chrome (in any mode) the last week but only
    tell me if the answer if this current launch was in browser app mode.&quot;

    Warning about delayed data: Chrome may upload logs on a given day without
    uploading this histogram. This can happen because Chrome uploads logs
    initially upon startup. This histogram is emitted shortly _after_ startup.
    In the case of short sessions, it's possible the log with this histogram did
    not have time to be uploaded. Generally the log will be cached and uploaded
    the next time the user starts Chrome. We should still get one count per
    calendar day; it simply may not be on the day the metric was computed.
    (Exception: on Android before M-91, sometimes these emitted histograms were
    lost due to lack of robust &quot;background logging&quot;.)
  </summary>
</histogram>

<histogram name="History.DomainCount7Day_V3" units="domains"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>mjzhang@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <summary>
    Number of unique domains visited by the user within a 7 calendar day period
    in user's local timezone, excluding domains that have only ever had visits
    with a 4XX/5XX HTTP response code. For each regular profile (not incognito,
    guest, system, etc.), reported at profile open (which usually happens at
    startup) for each unreported 7-day period (up to 7 periods) ending on the
    current day, current day - 1, current day - 2, etc. Also reported once every
    24 hours thereafter for the latest unreported period, while the profile
    remains open. If no domains are visited during a 7-day period, a count 0
    will be reported for that period.

    Warning about Android activity types (custom tabs, browser app, etc.): Do
    not look at this data using an activity type filter; when looking at data
    from Android, use &quot;Android Chrome (All)&quot;. Why? This histogram
    reflects all usage of the browser. Using a filter such as &quot;Browser
    App&quot; is not appropriate because it doesn't make sense to ask &quot;how
    many web sites were visited in Chrome (in any mode) the last week but only
    tell me if the answer if this current launch was in browser app mode.&quot;

    Warning about delayed data: Chrome may upload logs on a given day without
    uploading this histogram. This can happen because Chrome uploads logs
    initially upon startup. This histogram is emitted shortly _after_ startup.
    In the case of short sessions, it's possible the log with this histogram did
    not have time to be uploaded. Generally the log will be cached and uploaded
    the next time the user starts Chrome. We should still get one count per
    calendar day; it simply may not be on the day the metric was computed.
    (Exception: on Android before M-91, sometimes these emitted histograms were
    lost due to lack of robust &quot;background logging&quot;.)

    Note: This histogram attempts to emit every 24 hours that the device is on,
    but the timer does not increment while the machine is suspended. Prefer the
    V4 version of this metric which accounts for suspended time.
  </summary>
</histogram>

<histogram name="History.DomainCount7Day_V4" units="domains"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>mjzhang@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <summary>
    Number of unique domains visited by the user within a 7 calendar day period
    in user's local timezone, excluding domains that have only ever had visits
    with a 4XX/5XX HTTP response code. For each regular profile (not incognito,
    guest, system, etc.), reported at profile open (which usually happens at
    startup) for each unreported 7-day period (up to 7 periods) ending on the
    current day, current day - 1, current day - 2, etc. Also reported once every
    24 hours thereafter for the latest unreported period, while the profile
    remains open. If no domains are visited during a 7-day period, a count 0
    will be reported for that period.

    Warning about Android activity types (custom tabs, browser app, etc.): Do
    not look at this data using an activity type filter; when looking at data
    from Android, use &quot;Android Chrome (All)&quot;. Why? This histogram
    reflects all usage of the browser. Using a filter such as &quot;Browser
    App&quot; is not appropriate because it doesn't make sense to ask &quot;how
    many web sites were visited in Chrome (in any mode) the last week but only
    tell me if the answer if this current launch was in browser app mode.&quot;

    Warning about delayed data: Chrome may upload logs on a given day without
    uploading this histogram. This can happen because Chrome uploads logs
    initially upon startup. This histogram is emitted shortly _after_ startup.
    In the case of short sessions, it's possible the log with this histogram did
    not have time to be uploaded. Generally the log will be cached and uploaded
    the next time the user starts Chrome. We should still get one count per
    calendar day; it simply may not be on the day the metric was computed.
    (Exception: on Android before M-91, sometimes these emitted histograms were
    lost due to lack of robust &quot;background logging&quot;.)
  </summary>
</histogram>

<histogram name="History.Embeddings.ComputeAnswerStatus"
    enum="ComputeAnswerStatus" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The status returned by the answerer after calling ComputeAnswer.

    ComputeAnswer is called once for each query as it is entered in a
    history_embeddings UI (history page, side panel). This is not once per
    keystroke due to debouncing logic and other constraints on query acceptance
    (minimum length, number of terms, etc.) but is still frequent enough that
    cancellation is common and expected.
  </summary>
</histogram>

<histogram name="History.Embeddings.ComputeAnswerTime{ComputeAnswerStatus}"
    units="ms" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time the HistoryEmbeddingsService waited to receive a response from the
    answerer after calling ComputeAnswer.

    ComputeAnswer is called once for each query as it is entered in a
    history_embeddings UI (history page, side panel). This is not once per
    keystroke due to debouncing logic and other constraints on query acceptance
    (minimum length, number of terms, etc.) but is still frequent enough that
    cancellation is common and expected.
  </summary>
  <token key="ComputeAnswerStatus">
    <variant name="" summary="Any status, unsliced"/>
    <variant name=".ExecutionCancelled" summary="ExecutionCancelled"/>
    <variant name=".ExecutionFailure" summary="ExecutionFailure"/>
    <variant name=".Filtered" summary="Filtered"/>
    <variant name=".Loading" summary="Loading"/>
    <variant name=".ModelUnavailable" summary="ModelUnavailable"/>
    <variant name=".Success" summary="Success"/>
    <variant name=".Unanswerable" summary="Unanswerable"/>
  </token>
</histogram>

<histogram name="History.Embeddings.DatabaseAsCacheAccessTime.StorageRead"
    units="ms" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>sophiechang@chromium.org</owner>
  <summary>
    The time spent on the Storage sequence to read existing passages and
    embeddings from the database so it can be used as a cache to avoid
    re-embedding identical passages from the same URL. Logged each time page
    passages are retrieved. (This metric includes SQL query time only; no
    waits.)
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseInitialized" enum="Boolean"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>sophiechang@chromium.org</owner>
  <summary>
    When the HistoryEmbeddings database is opened, this histogram is logged to
    indicate whether initialization succeeded.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseIterationSkippedEmbeddings"
    units="rows" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>manukh@chromium.org</owner>
  <summary>
    Number of database statement iteration rows skipped due to embeddings data
    load failure. If a row is skipped, only one counter is incremented to
    reflect the reason; the check order is: passages, embeddings, mismatches.
    Logged once for each full iteration, which happens when the database is
    queried; this may include a time range or not, and may exhaust all rows or
    stop early if a new query is initiated.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseIterationSkippedMismatches"
    units="rows" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>manukh@chromium.org</owner>
  <summary>
    Number of database statement iteration rows skipped due to embeddings count
    mismatching passages count. If a row is skipped, only one counter is
    incremented to reflect the reason; the check order is: passages, embeddings,
    mismatches. Logged once for each full iteration, which happens when the
    database is queried; this may include a time range or not, and may exhaust
    all rows or stop early if a new query is initiated.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseIterationSkippedPassages"
    units="rows" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>manukh@chromium.org</owner>
  <summary>
    Number of database statement iteration rows skipped due to passages data
    load failure. If a row is skipped, only one counter is incremented to
    reflect the reason; the check order is: passages, embeddings, mismatches.
    Logged once for each full iteration, which happens when the database is
    queried; this may include a time range or not, and may exhaust all rows or
    stop early if a new query is initiated.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseIterationYielded" units="rows"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>manukh@chromium.org</owner>
  <summary>
    Number of database statement iteration rows yielded with valid data. Logged
    once for each full iteration, which happens when the database is queried;
    this may include a time range or not, and may exhaust all rows or stop early
    if a new query is initiated.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseStoredAsciiPassages"
    units="passages" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of passages that contained only ASCII characters when passages are
    stored to the database. Logged each time passages are successfully inserted
    or replaced in the database. This happens for each page visit when the tab
    is kept open for several seconds after all tabs finish loading. See also the
    related metrics History.Embeddings.DatabaseStoredNonAsciiPassages and
    History.Embeddings.DatabaseStoredNonAsciiPassageRatio.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseStoredNonAsciiPassageRatio"
    units="%" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Percentage of passages that contain non-ASCII characters when passages are
    stored to the database. Logged each time passages are successfully inserted
    or replaced in the database. This happens for each page visit when the tab
    is kept open for several seconds after all tabs finish loading. See also the
    related metrics History.Embeddings.DatabaseStoredAsciiPassages and
    History.Embeddings.DatabaseStoredNonAsciiPassages.
  </summary>
</histogram>

<histogram name="History.Embeddings.DatabaseStoredNonAsciiPassages"
    units="passages" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of passages that contained any non-ASCII characters when passages are
    stored to the database. Logged each time passages are successfully inserted
    or replaced in the database. This happens for each page visit when the tab
    is kept open for several seconds after all tabs finish loading. See also the
    related metrics History.Embeddings.DatabaseStoredAsciiPassages and
    History.Embeddings.DatabaseStoredNonAsciiPassageRatio.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.CacheHit" enum="Boolean"
    expires_after="2026-05-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether one embeddings generation attempt involves a passage in the cache.
    Logged each time the embedder attempts to generate one embeddings vector. On
    a cache hit, no tokenization or model execution will be attempted so the
    relevant histograms won't be recorded either.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.CpuUsage2" units="1/100 %"
    expires_after="2027-01-10">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Periodically samples CPU utilization of the embedder process. A sample is
    taken every 30 seconds while the embedder service is running. The
    utilization is in 0-100% range per CPU, which is then summed up and
    multiplied by 100.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.CpuUsage2.NotRunning"
    units="1/100 %" expires_after="2027-07-19">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    History.Embeddings.Embedder.CpuUsage2, sliced by embedder running state.
    This histogram is recorded only if the embedder is not running at both the
    beginning and end of the sample period.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.CpuUsage2.Running" units="1/100 %"
    expires_after="2027-07-19">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    History.Embeddings.Embedder.CpuUsage2, sliced by embedder running state.
    This histogram is recorded only if the embedder is running at both the
    beginning and the end of the sample period.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.CpuUsage2.RunningPartial"
    units="1/100 %" expires_after="2027-07-19">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    History.Embeddings.Embedder.CpuUsage2, sliced by embedder running state.
    This histogram is recorded only if the embedder is running at either the
    beginning or the end of the sample period, but not both.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.EmbeddingsGenerationSucceeded"
    enum="Boolean" expires_after="2027-02-14">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether an attempt to generate embeddings was successful. Logged each time
    the embedder attempts to generate embeddings.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.EmbeddingsModelLoadDuration"
    units="ms" expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The time it took to load the embeddings model. Logged each time the
    embeddings model is successfully loaded.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.EmbeddingsModelLoadSucceeded"
    enum="Boolean" expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether the attempt to load the embeddings model succeeded. Logged each time
    loading of the embeddings model was attempted.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.InputTruncated" enum="Boolean"
    expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether the tokenized input was truncated during embeddings generation.
    Logged each time an input tokenization succeeds.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.LaunchDuration" units="ms"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time it took to launch the PassageEmbeddingsService. Logged each time
    the service is successfully launched.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.ModelInfoStatus"
    enum="EmbeddingsModelInfoStatus" expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether the model metadata received from optimization guide model provider
    is valid. Logged each time the embedder receives an model update from
    optimization guide.
  </summary>
</histogram>

<histogram
    name="History.Embeddings.Embedder.PassageEmbeddingsGenerationDuration"
    units="ms" expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The number of milliseconds spent to generate embeddings for a passage.
    Logged each time embeddings generation succeeds for a passage.
  </summary>
</histogram>

<histogram
    name="History.Embeddings.Embedder.PassageEmbeddingsGenerationThreadDuration"
    units="ms" expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The number of milliseconds spent to generate embeddings for a passage,
    measured in thread time. Logged each time embeddings generation succeeds for
    a passage, if ThreadTicks measurement is supported.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.PassageTokenCount" units="tokens"
    expires_after="2026-07-05">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The length of the token array that each passage is encoded into. Logged each
    time an input tokenization succeeds.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.QueryEmbeddingsGenerationDuration"
    units="ms" expires_after="2026-11-22">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The number of milliseconds spent to generate one embeddings vector for a
    user query. Logged each time embeddings generation succeeds for a user
    query.
  </summary>
</histogram>

<histogram
    name="History.Embeddings.Embedder.QueryEmbeddingsGenerationThreadDuration"
    units="ms" expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The number of milliseconds spent to generate one embeddings vector for a
    user query, measured in thread time. Logged each time embeddings generation
    succeeds for a user query, if ThreadTicks measurement is supported.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.SentencePieceModelLoadDuration"
    units="ms" expires_after="2026-05-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The time it took to load the sentencepiece model. Logged each time the
    sentencepiece model is successfully loaded.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.SentencePieceModelLoadSucceeded"
    enum="Boolean" expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether the attempt to load the sentencepiece model succeeded. Logged each
    time loading of the sentencepiece model was attempted.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.TokenizationDuration" units="ms"
    expires_after="2026-09-06">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    The number of milliseconds spent tokenizing an input string. Logged each
    time the embedder successfully tokenizes an input string.
  </summary>
</histogram>

<histogram name="History.Embeddings.Embedder.TokenizationSucceeded"
    enum="Boolean" expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether an attempt to tokenize an input string to the embedder was
    successful. Logged each time the embedder attempts to tokenize a string.
  </summary>
</histogram>

<histogram name="History.Embeddings.EmbeddingScoreSufficient" enum="Boolean"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Whether a search result could be included in the final result set based on
    its embedding score alone, without the word match boost from text search.
    This is logged for each result that passes the threshold filter with its
    total score including the word match boost, so it signals how helpful the
    boost from text search is in yielding results that would not have been
    included otherwise.
  </summary>
</histogram>

<histogram name="History.Embeddings.NumMatchedUrlsVisible" units="counts"
    expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Number of URLs that matched the query and are allowed to be shown based on
    the content visibility policy. Logged each time a query leveraging history
    embeddings is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.NumUrlsAddedByWordMatch" units="counts"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of URLs that were added to a result set due to having a sufficient
    word match score and an insufficient total score. Logged each time a query
    leveraging history embeddings is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.NumUrlsDiscardedForLowScore" units="counts"
    expires_after="2027-07-19">
  <owner>sophiechang@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <summary>
    Number of URLs that were found but discarded for insufficient score (i.e.
    not reaching the configured search score threshold). Logged each time a
    query leveraging history embeddings is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.NumUrlsKeptByWordMatch" units="counts"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of URLs that were kept in a result set due to having a sufficient
    word match score and an insufficient total score, after capping to the
    maximum count for presentation to the user. Logged each time a query
    leveraging history embeddings is performed.

    Note, this differs from History.Embeddings.NumUrlsAddedByWordMatch in that
    it measures after capping. Comparing these two metrics can reveal how much
    word matches are pushed off the list by first total score results.
  </summary>
</histogram>

<histogram name="History.Embeddings.NumUrlsMatched" units="counts"
    expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of URLs that matched the query. Logged each time a query leveraging
    history embeddings is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Passages.ExtractionTime" units="ms"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Round trip request and response time for a single passage extraction. The
    clock starts just before the browser requests passages from a renderer, and
    stops just after results are received. Logged each time passages are
    successfully retrieved from a RenderFrameHost.
  </summary>
</histogram>

<histogram name="History.Embeddings.Passages.PassageCount" units="passages"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of passages retrieved from a single page passage extraction. Logged
    each time passages are retrieved from a RenderFrameHost.
  </summary>
</histogram>

<histogram name="History.Embeddings.Passages.TitleInserted" enum="Boolean"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Whether a dedicated web contents title passage was inserted at the beginning
    of the extracted passages vector. Logged each time passages are extracted.
  </summary>
</histogram>

<histogram name="History.Embeddings.Passages.TotalTextSize" units="bytes"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The sum of passage text sizes for all passages retrieved from an extraction.
    Logged each time passages are retrieved from a RenderFrameHost.
  </summary>
</histogram>

<histogram name="History.Embeddings.Quality.LogEntryPrepared" enum="Boolean"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>manukh@chromium.org</owner>
  <summary>
    Whether a quality log entry was prepared when a history embeddings result
    was selected while quality logging was enabled.
  </summary>
</histogram>

<histogram name="History.Embeddings.QueryAnswerable" enum="Boolean"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Indicates query was answerable and passed to answerer. Logged each time a
    query could be passed to the answerer, i.e. when search is complete and top
    passages are ready to provide the context.
  </summary>
</histogram>

<histogram name="History.Embeddings.QueryEmbeddingSucceeded" enum="Boolean"
    expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether the attempt to compute the query embedding succeeded. Logged each
    time an embedding was requested for a query.
  </summary>
</histogram>

<histogram name="History.Embeddings.QueryFiltered"
    enum="EmbeddingsQueryFiltered" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>robertogden@chromium.org</owner>
  <summary>
    Indicates query filter status every time a query is checked for filtering.
  </summary>
</histogram>

<histogram name="History.Embeddings.ScheduledJobCount" units="jobs"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of jobs (groups of passages) that were already scheduled by the
    SchedulingEmbedder at the moment a new job is enqueued.
  </summary>
</histogram>

<histogram name="History.Embeddings.ScheduledJobDuration{PassagePriority}"
    units="ms" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of milliseconds that a job existed in the SchedulingEmbedder job
    queue. Logged when a job is successfully completed by having all its
    passages embedded. Failed or canceled jobs do not log this histogram.
  </summary>
  <token key="PassagePriority" variants="PassagePriority"/>
</histogram>

<histogram name="History.Embeddings.ScheduledJobStatus{PassagePriority}"
    enum="ComputeEmbeddingsStatus" expires_after="2026-12-06">
  <owner>mahmadi@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The status of a job when leaving the SchedulingEmbedder job queue. Logged
    when a job is successfully completed by having all its passages embedded, or
    when a job fails or is canceled.
  </summary>
  <token key="PassagePriority" variants="PassagePriority"/>
</histogram>

<histogram name="History.Embeddings.ScheduledPassageCount" units="passages"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of passages that were already scheduled by the SchedulingEmbedder at
    the moment a new job is enqueued.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.Completed" enum="Boolean"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Whether the search completed without interruption. Logged each time a vector
    database search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.Duration" units="ms"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of milliseconds spent searching. Logged each time a vector
    database search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.EmbeddingCount" units="embeddings"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of embeddings searched. Logged each time a vector database search
    is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.ModifiedNonAsciiPassageCount"
    units="passages" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of passages that were modified by removing non-ASCII characters.
    Note that this value is still useful even when the passage text itself is
    not used in the search (word match boosting is optimized for speed) because
    passages counted by this metric also indicate embeddings that were
    calculated from modified source passages. Logged each time a vector database
    search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.PassageScanningTime" units="ms"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of milliseconds spent on the passage scanning portion of the
    search, i.e. the text search required to compute word match score boost.
    Includes scoring for embeddings and word match boost scoring from text
    search. Logged each time a vector database search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.ScoringTime" units="ms"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of milliseconds spent on the scoring portion of the search.
    Includes scoring for embeddings and word match boost scoring from text
    search. Logged each time a vector database search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.SkippedNonAsciiPassageCount"
    units="passages" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of passages that had their embeddings scored zero during search
    due to the source passage containing non-ASCII characters. Logged each time
    a vector database search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.TotalSearchTime" units="ms"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of milliseconds spent on the core of the vector database search.
    Logged each time a vector database search is performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.Search.UrlCount" units="urls"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The number of URLs searched. Logged each time a vector database search is
    performed.
  </summary>
</histogram>

<histogram name="History.Embeddings.StaleComputedEmbeddings" units="counts"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Number of embeddings that were computed for a tab that were stale by the
    time the computation completed, because the tab navigated away from the page
    in the mean time.
  </summary>
</histogram>

<histogram name="History.Embeddings.TaskDuration" units="ms"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time it took to compute embeddings for one service round trip. Logged
    each time the embeddings are successfully computed.
  </summary>
</histogram>

<histogram name="History.Embeddings.TaskDuration.Other" units="ms"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time it took to compute embeddings with a priority other than the
    priorities with specific histograms, for one service round trip. Logged each
    time the embeddings are successfully computed.
  </summary>
</histogram>

<histogram name="History.Embeddings.TaskDuration.Passive" units="ms"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time it took to compute embeddings with kPassive priority, for one
    service round trip. Logged each time the embeddings are successfully
    computed.
  </summary>
</histogram>

<histogram name="History.Embeddings.TaskDuration.Urgent" units="ms"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time it took to compute embeddings with kUrgent priority, for one
    service round trip. Logged each time the embeddings are successfully
    computed.
  </summary>
</histogram>

<histogram name="History.Embeddings.TaskDuration.UserInitiated" units="ms"
    expires_after="2027-07-19">
  <owner>wittman@chromium.org</owner>
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    The time it took to compute embeddings with kUserInitiated priority, for one
    service round trip. Logged each time the embeddings are successfully
    computed.
  </summary>
</histogram>

<histogram name="History.Embeddings.UserActions{UiSurface}"
    enum="EmbeddingsUserActions" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <owner>src/components/history_embeddings/OWNERS</owner>
  <summary>
    Tracks user actions related to History Embeddings in various bins within a
    single histogram.

    The first bucket of this histogram is logged for users with History
    Embeddings disabled too, to provide a baseline, and to serve as a guardian
    metric for the Embeddings experiments.
  </summary>
  <token key="UiSurface">
    <variant name="" summary="Unsliced"/>
    <variant name=".HistoryPage" summary="History page"/>
    <variant name=".SidePanel" summary="Side panel"/>
  </token>
</histogram>

<histogram name="History.Embeddings.VisibilityModelAvailableAtQuery"
    enum="Boolean" expires_after="2026-02-28">
  <owner>sophiechang@chromium.org</owner>
  <owner>zekunjiang@google.com</owner>
  <summary>
    Whether the visibility model was available to determine whether the search
    results should be shown to the user for a given query. Logged each time a
    query leveraging history embeddings is performed.
  </summary>
</histogram>

<histogram name="History.FaviconDatabaseSizeMB" units="MB" expires_after="M130">
  <owner>rogerm@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Size of the Favicons database in MB. This is calculated as the number of
    pages consumed by the database multiplied by the page size. Logged on
    initialization of the Favicon DB on 1% of starts.
  </summary>
</histogram>

<histogram name="History.ForeignVisitsLegacy" units="visits"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of foreign visits (i.e. visits coming from another device) in the
    DB table which came from &quot;legacy&quot; clients, i.e. those still using
    the Sessions sync integration. Recorded on initialization of the History DB
    on 1% of starts, only if any foreign visits exist (i.e. basically for users
    with History Sync on).
  </summary>
</histogram>

<histogram name="History.ForeignVisitsNotRemapped" units="visits"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of foreign visits (i.e. visits coming from another device) in the
    DB table which have an originator_from|opener_visit but are missing a
    corresponding local from|opener_visit. Recorded on initialization of the
    History DB on 1% of starts, only if any foreign visits exist (i.e. basically
    for users with History Sync on).
  </summary>
</histogram>

<histogram name="History.ForeignVisitsRemappableFrom" units="visits"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of foreign visits (i.e. visits coming from another device) in the
    DB table which have an originator_from_visit but are missing a corresponding
    local from_visit, and a matching visit actually exists in the DB. Recorded
    on initialization of the History DB on 1% of starts, only if any foreign
    visits exist (i.e. basically for users with History Sync on).
  </summary>
</histogram>

<histogram name="History.ForeignVisitsRemappableOpener" units="visits"
    expires_after="2027-01-17">
  <owner>treib@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of foreign visits (i.e. visits coming from another device) in the
    DB table which have an originator_opener_visit but are missing a
    corresponding local opener_visit, and a matching visit actually exists in
    the DB. Recorded on initialization of the History DB on 1% of starts, only
    if any foreign visits exist (i.e. basically for users with History Sync on).
  </summary>
</histogram>

<histogram name="History.ForeignVisitsTotal" units="visits"
    expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of foreign visits (i.e. visits coming from another device) in the
    DB table. Recorded on initialization of the History DB on 1% of starts, only
    if any foreign visits exist (i.e. basically for users with History Sync on).
  </summary>
</histogram>

<histogram name="History.HistoryPageView" enum="HistoryPageView"
    expires_after="2027-02-07">
  <owner>calamity@chromium.org</owner>
  <owner>src/chrome/browser/resources/history/OWNERS</owner>
  <component>1456716</component>
  <summary>
    The page of the History page shown to the user. Logged each time the user
    loads the History page or switches pages.

    This histogram expired on 2021-03-01, was renewed on 2021-09-01, and may
    have incomplete data within that range.
  </summary>
</histogram>

<histogram name="History.InitializationFailureStep" enum="HistoryInitStep"
    expires_after="2026-08-30">
  <owner>sky@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The phase of history initialization that failed. This histogram is only
    logged on database initialization failure.
    History.AttemptedToFixProfileError will tell how often initialization fails
    overall.
  </summary>
</histogram>

<histogram name="History.InMemoryDBItemCount" units="typed URLs"
    expires_after="2026-02-22">
  <owner>sky@chromium.org</owner>
  <owner>mpearson@chromium.org</owner>
  <component>1456716</component>
  <summary>
    The number of typed URLs in the history database that are read into the
    &quot;in memory&quot; history database. This in memory copy of the typed
    URLs is used for synchronous inline autocomplete on the UI thread, while the
    larger slower service is run off of disk on a background thread. Recorded on
    profile open.
  </summary>
</histogram>

<histogram name="History.InMemoryURLHistoryItems" units="items"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>chrome-omnibox-team@google.com</owner>
  <component>1456716</component>
  <summary>
    Number of history items in the in-memory url index. Recorded on profile open
    when restoring from a cache file and again shortly after profile open when
    rebuilding the in-memory url index from history.
  </summary>
</histogram>

<histogram name="History.Is4XXOr5XXStatusCode" enum="Boolean"
    expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    Whether HistoryTabHelper::DidFinishNavigation() encountered a navigation
    with a 4XX - 5XX status code. This value is recorded in both the chrome/ and
    ios/ code paths. This will help us determine the number of error navigations
    that could potentially be added to the HistoryDB if the early return is
    removed.
  </summary>
</histogram>

<histogram name="History.MetaTableExists" enum="Boolean"
    expires_after="2026-11-15">
  <owner>etienneb@chromium.org</owner>
  <owner>jpgravel@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Indicates whether an existing history database has a meta table or not.
    Logged each time the history table is initialized.
  </summary>
</histogram>

<histogram name="History.MigrateFailureFromVersion"
    enum="HistoryDatabaseVersion" expires_after="2026-09-13">
  <owner>etienneb@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <component>1456716</component>
  <summary>
    History database version from which history migration failed. If there are
    higher than normal migration failures, this histogram will indicate which
    migration step failed.

    Warning: this histogram was expired from M77 to M108; data may be missing.
  </summary>
</histogram>

<histogram name="History.MonthlyHostCount" units="hosts"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Unique hostnames in History database urls table with last-visit times in the
    last 30 days. Metrics are logged on initialization of the History DB on
    one-third of starts.
  </summary>
</histogram>

<histogram name="History.MonthlyURLCount" units="urls"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Unique URLs in History database urls table with last-visit times in the last
    30 days. Metrics are logged on initialization of the History DB on one-third
    of starts.
  </summary>
</histogram>

<histogram name="History.MostVisitedTilesVisualDeduplication" units="tiles"
    expires_after="2026-12-16">
  <owner>hitarthkothari@google.com</owner>
  <owner>ckitagawa@chromium.org</owner>
  <summary>
    Records the number of most visited site suggestions that are removed because
    they are considered visual duplicates of a higher-scoring suggestion. The
    deduplication logic is triggered when two tiles share the same hostname and
    have titles that are identical within the first 10 characters.

    This metric is recorded on the first call to
    VisitSegmentDatabase::QuerySegmentUsage during a browser session where the
    visual deduplication feature is active. This function is called each time
    the user loads the New Tab Page (NTP).
  </summary>
</histogram>

<histogram name="History.QueryAppDuration" units="ms"
    expires_after="2026-11-29">
  <owner>jinsukkim@google.com</owner>
  <owner>chrome-connective-tissue-team@google.com</owner>
  <component>1456716</component>
  <summary>
    The time in milliseconds the query takes to fetch the list of app IDs. The
    query is made to the local database only, not to the server side via
    network. This is called when history UI is opened. Only logged on Android.
  </summary>
</histogram>

<histogram name="History.QueryMostRepeatedQueriesTimeV2" units="ms"
    expires_after="2023-12-20">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-desktop-search@google.com</owner>
  <summary>
    The amount of time for HistoryBackend::QueryMostRepeatedQueriesForKeyword()
    to extract up to the requested number of search terms from the
    HistoryDatabase db_ and sort them by frecency scores to produce the most
    repeated search terms. Excludes the case where local HistoryDatabase db_ is
    unavailable, i.e. where the query doesn't really happen. Emitted on NTP load
    and on omnibox popup shown on Android where the repeatable queries are
    requested to be shown in the Most Visited tiles.
  </summary>
</histogram>

<histogram name="History.QueryMostVisitedURLsTime" units="ms"
    expires_after="2027-02-07">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-desktop-search@google.com</owner>
  <summary>
    The amount of time for HistoryBackend::QueryMostVisitedURLs() to extract up
    to the requested number of most visited URLs from the HistoryDatabase db_
    and sort them by descending frecency scores. Excludes the case where local
    HistoryDatabase db_ is unavailable and the query doesn't really happen.
    Emitted on NTP load and on Omnibox popup focus.
  </summary>
</histogram>

<histogram name="History.RemoveVisitsFromWebHistory.EntryCount" units="entries"
    expires_after="2026-12-27">
  <owner>treib@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the number of history entries that the user deleted via the history
    UI, when the deletions are sent to WebHistoryService (i.e. only for users
    who have history sync enabled). One history entry corresponds to one row (or
    checkbox) in the history UI, and represents all visits to a single URL on a
    given day. E.g. visiting a URL N times on the same day will have 1 row in
    the UI; and deleting that row will record 1 to this metric.
  </summary>
</histogram>

<histogram name="History.SearchResultClicked.Index{HistoryResultType}"
    units="index" expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <summary>
    Logs the zero-based index of the result clicked.

    For Embeddings and Traditional history types, this logs the index of the
    visit with respect to visits of the same type only. For example, the first
    matching Traditional visit has index 0, even though it's displayed below all
    Embeddings matches.

    For Grouped history, this logs the index of the visit WITHIN its containing
    cluster. This is to match the History.Clusters.UIActions UMAs.

    This does not log anything shown directly in the omnibox suggest surface.

    This UMA is further sliced into per-type slices, and the sum of those
    histograms equals the unsliced histogram. The maximum index is 99, and
    clicks above that are clamped to that maximum.
  </summary>
  <token key="HistoryResultType">
    <variant name="" summary="Clicks of all types, unsliced"/>
    <variant name=".Embeddings" summary="Embeddings search result"/>
    <variant name=".Grouped"
        summary="Grouped history search result (index within cluster)"/>
    <variant name=".Traditional"
        summary="Traditional history search result (reverse chronological
                 list)"/>
  </token>
</histogram>

<histogram name="History.SearchResultClicked.Type" enum="HistoryResultType"
    expires_after="2027-07-19">
  <owner>orinj@chromium.org</owner>
  <summary>
    Logs the type of the History result clicked from History UI surfaces. Note,
    this does NOT include any results clicked from the omnibox suggest surface,
    even if they are History or @history site search suggestions.
  </summary>
</histogram>

<histogram name="History.ShouldUpdateHistory" enum="Boolean"
    expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    Whether HistoryTabHelper::DidFinishNavigation() returned early due to
    !ShouldUpdateHistory() in chrome/ or IsError() in ios/. This will help us
    determine the number of navigations that could potentially be added to the
    HistoryDB if the early returns are removed.
  </summary>
</histogram>

<histogram name="History.TopSites.QueryFromHistoryTime" units="ms"
    expires_after="2025-06-08">
  <owner>mahmadi@chromium.org</owner>
  <owner>chrome-omnibox-team@google.com</owner>
  <summary>
    The amount of time it takes to asynchronously query the most visited URLs
    and the most repeated queries, if applicable, from the history service.
    Excludes the case where local HistoryDatabase db_ is unavailable, i.e. where
    the query doesn't really happen. Emitted on NTP load and on omnibox popup
    shown on Android where the Most Visited tiles are shown.
  </summary>
</histogram>

<histogram name="History.URLRowAddedAsHidden" enum="Boolean"
    expires_after="2027-01-24">
  <owner>svend@chromium.org</owner>
  <owner>kyraseevers@chromium.org</owner>
  <summary>
    Whether a newly added URLRow is hidden. Emitted when a URLRow is added to
    the History database. Intended to monitor how much the number of hidden rows
    added increases when saving page visits with HTTP response code 404 to the
    History database.
  </summary>
</histogram>

<histogram name="History.URLTableCount" units="URLs" expires_after="2027-01-17">
  <owner>mpearson@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Number of rows in urls table in History DB. Metrics are logged on
    initialization of the History DB on 1% of starts.
  </summary>
</histogram>

<histogram name="History.VisitAddedDueTo404" enum="Boolean"
    expires_after="2027-01-31">
  <owner>svend@chromium.org</owner>
  <owner>kyraseevers@chromium.org</owner>
  <summary>
    Whether a page visit recorded in the History DB was added due to a
    navigation with an HTTP response code of 404. Visits added due to a 404
    includes a) 404 visits themselves and b) redirects in chains that end in a
    404 visit. Recorded after a visit is successfully added to the History DB
    (because this includes redirects, one user-initiated navigation can result
    in multiple emissions). Intended to monitor what proportion of newly
    recorded visits are 404s when saving page visits with HTTP response code 404
    to the History database. See also
    `History.VisitedLinks.AdditionCausedBy404`.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.AdditionCausedBy404" enum="Boolean"
    expires_after="2027-01-24">
  <owner>svend@chromium.org</owner>
  <owner>kyraseevers@chromium.org</owner>
  <summary>
    When we attempt to add a VisitedLink to the in-memory partitioned hashtable,
    records whether that record is added due to a visit with an HTTP response
    code 404. Recorded on every attempt to write a VisitedLink entry, including
    those for redirects (i.e., for a redirect chain ending in a 404, there will
    be one emission per redirect, all emitted as true, since the 404 is what is
    causing the redirects' addition to the hashtable). Intended to monitor the
    proportion of VisitedLink entries that are for 404s, after allowing 404
    visits to be saved to History. See also `History.VisitAddedDueTo404`.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.HashTableLengthOnReaderInit"
    units="entries" expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    When VisitedLinkReader's in-memory hashtable is initialized, this metric
    records the value for table_length_ (the maximum number of entries that can
    be held in that hashtable).
  </summary>
</histogram>

<histogram name="History.VisitedLinks.HashTableSizeOnTableCreate" units="MB"
    expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    When a new in-memory hashtable is created in VisitedLinkWriter, this metric
    records the size of the memory allocated for that new hashtable in MB.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.HashTableUsageOnLinkAdded"
    units="fingerprints" expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    When a new URL fingerprint is added to the VisitedLink hashtable, this
    metric logs value for used_items_ (the number of entries in the hashtable
    containing an actual fingerprint value rather than a placeholder).
  </summary>
</histogram>

<histogram name="History.VisitedLinks.NumSaltsForNavigationsDuringBuild"
    units="salts" expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    After the partitioned hashtable has completed building on the DB thread, we
    return to the main thread and determine the per-origin salts corresponding
    to each navigation that took place during the build. The VisitedLinkUpdater
    then sends those salts to their corresponding VisitedLinkReader instance.
    Each time a VisitedLinkUpdater sends per-origin salts, this histogram
    records how many salts were in the map.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.TryToAddFingerprint"
    enum="AddFingerprint" expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    When VisitedLinkWriter is asked to add a URL, it calculates that URL's
    fingerprint and tries to add that fingerprint to the hashtable. This metric
    records the result of that function: AddFingerprint(). If the fingerprint is
    already in the table, we record kAlreadyVisited. If we haven't seen this
    fingerprint before and it can be successfully stored in the hashtable, we
    record kNewVisit. Any other outcomes due to table sizing errors are recorded
    as kTableError.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.VisitLoggedFromMainFrame" enum="Boolean"
    expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    For each visit being logged in the VisitedLinks hashtable by the
    HistoryService, record whether its ui::PageTransition type came from the
    main frame.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.VisitLoggedFromTransition"
    enum="PageTransitionForVisitedLinks" expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <summary>
    For each visit being logged in the VisitedLinks hashtable by the
    HistoryService, record its PageTransitionForVisitedLinks type. This enum
    represents our ui::PageTransition types of interest (link vs. typed vs.
    subframe) and a catch-all other bucket.
  </summary>
</histogram>

<histogram name="History.VisitedLinks.WebView.LookupCollisionCount2"
    units="collisions" expires_after="2027-07-21">
  <owner>tiffanysong@google.com</owner>
  <owner>kyraseevers@chromium.org</owner>
  <summary>
    WebView collapses the triple-key space into a flat 1D key-space and hashes
    using a static constant salt, meaning the database loses the natural entropy
    of Chrome's randomized salt scheme. This metric monitors if the static salt
    causes hash clustering by recording the collision count for each visited
    link lookup. Recorded on every visited link lookup in Android WebView.
  </summary>
</histogram>

<histogram name="History.VisitedLinkTableCount" units="VisitedLinks"
    expires_after="2027-03-01">
  <owner>kyraseevers@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <component>1456589</component>
  <summary>
    Number of rows in visited_links table in History DB. Metrics are logged on
    initialization of the History DB on 1% of starts.
  </summary>
</histogram>

<histogram name="History.VisitTableCount" units="visits"
    expires_after="2027-02-07">
  <owner>mpearson@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Number of rows in visits table in History DB. Metrics are logged on
    initialization of the History DB on 1% of starts.
  </summary>
</histogram>

<histogram name="History.WebHistory.QueryHistoryResultsCount" units="visits"
    expires_after="2027-01-03">
  <owner>treib@chromium.org</owner>
  <owner>src/components/history/OWNERS</owner>
  <component>1456716</component>
  <summary>
    Recorded whenever a QueryHistory request in WebHistoryService completes
    successfully. Records the number of visits that were returned.
  </summary>
</histogram>

<histogram name="History.WebHistory.QueryWebAndAppActivityResult"
    enum="BooleanOptedIn" expires_after="2027-01-03">
  <owner>treib@chromium.org</owner>
  <owner>src/components/history/OWNERS</owner>
  <component>1456716</component>
  <summary>
    Recorded whenever a QueryWebAndAppActivity request in WebHistoryService
    completes successfully. Records the outcome, i.e. whether the user is opted
    in to web and app activity.
  </summary>
</histogram>

<histogram name="History.WebHistoryRequestOutcome.{RequestType}"
    enum="WebHistoryRequestOutcome" expires_after="2027-02-07">
  <owner>treib@chromium.org</owner>
  <owner>src/components/history/OWNERS</owner>
  <component>1456716</component>
  <summary>
    Recorded whenever a {RequestType} request finishes in WebHistoryService.
    Records the outcome (success/failure) of the request.
  </summary>
  <token key="RequestType">
    <variant name="ExpireHistory" summary="ExpireHistory"/>
    <variant name="QueryHistory" summary="QueryHistory"/>
    <variant name="QueryWebAndAppActivity" summary="QueryWebAndAppActivity"/>
  </token>
</histogram>

<histogram name="History.WeeklyHostCount" units="hosts"
    expires_after="2027-01-17">
  <owner>mpearson@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Unique hostnames in History database urls table with last-visit times in the
    last 7 days. Metrics are logged on initialization of the History DB on
    one-third of starts.
  </summary>
</histogram>

<histogram name="History.WeeklyURLCount" units="URLs"
    expires_after="2027-02-14">
  <owner>mpearson@chromium.org</owner>
  <owner>sky@chromium.org</owner>
  <component>1456716</component>
  <summary>
    Unique URLs in History database urls table with last-visit times in the last
    7 days. Metrics are logged on initialization of the History DB on one-third
    of starts.
  </summary>
</histogram>

<histogram name="HistoryPage.ActorContextMenuActions"
    enum="VisitContextMenuAction" expires_after="2027-01-31">
  <owner>zalmashni@google.com</owner>
  <owner>chrome-browser-privacy-team@google.com</owner>
  <summary>
    Recorded for each context menu action click on an actor-annotated visit in
    the chrome://history page.
  </summary>
</histogram>

<histogram name="HistoryPage.ActorItemsShown" enum="BooleanVisible"
    expires_after="2027-01-31">
  <owner>zalmashni@google.com</owner>
  <owner>chrome-browser-privacy-team@google.com</owner>
  <summary>
    Records if actor-annotated visits are contained in the history items shown
    on the chrome://history page. Recorded every time the history page queries
    for history.
  </summary>
</histogram>

<histogram name="HistoryPage.CriticalAction.Click" enum="CriticalActionType"
    expires_after="2026-11-01">
  <owner>kalinino@google.com</owner>
  <owner>polonium@google.com</owner>
  <summary>
    Records the category of critical action (e.g. form fill, password manager
    login, federated login, download, or OTP) opened from the chrome://history
    page. Recorded in WebUI when the user clicks an action linkout row under an
    agent-annotated visit to navigate to its external management surface.
  </summary>
</histogram>

<histogram name="HistoryPage.CriticalActionsPerVisitCount" units="actions"
    expires_after="2026-11-01">
  <owner>kalinino@google.com</owner>
  <owner>polonium@google.com</owner>
  <summary>
    Records the total number of critical actions attached to a single
    agent-annotated browsing history visit item on the chrome://history page.
    Recorded for each agent-annotated visit whenever browsing history entries
    are retrieved and prepared for display (on initial page load, search, or
    infinite scroll).
  </summary>
</histogram>

<histogram name="HistoryPage.CriticalActionsQueryTime" units="ms"
    expires_after="2026-11-01">
  <owner>kalinino@google.com</owner>
  <owner>polonium@google.com</owner>
  <summary>
    Records the time (in milliseconds) taken to query and retrieve critical
    actions from the local database for agent-annotated history visits. Recorded
    each time chrome://history receives a batch of history results containing
    agent visits and completes fetching their corresponding critical actions.
  </summary>
</histogram>

<histogram name="HistoryPage.NonActorContextMenuActions"
    enum="VisitContextMenuAction" expires_after="2027-01-31">
  <owner>zalmashni@google.com</owner>
  <owner>chrome-browser-privacy-team@google.com</owner>
  <summary>
    Recorded for each context menu action click on a regular (non-actor
    annotated) visit in the chrome://history page.
  </summary>
</histogram>

<histogram name="HistoryPage.OtherDevicesMenu" enum="OtherSessionsActions"
    expires_after="never">
<!-- expires-never: part of top-line metric (internal: go/chrome-browser-nsm) -->

  <owner>rpop@google.com</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <component>1456716</component>
  <summary>
    Histogram for usage of the section in the history page that allows the user
    to access tabs from other devices.

    OtherSessionsActions.OPENED_LINK_VIA_CONTEXT_MENU was added for M-76.

    This histogram is of special interest to the chrome-analysis-team@. Do not
    change its semantics or retire it without talking to them first.
  </summary>
</histogram>

<histogram name="HistoryPage.QueryHistoryTotalTime.{HasCriticalActions}"
    units="ms" expires_after="2026-11-01">
  <owner>kalinino@google.com</owner>
  <owner>polonium@google.com</owner>
  <summary>
    Records the total round-trip time (in milliseconds) taken to query,
    assemble, and deliver browsing history results to the chrome://history page.
    Recorded each time the history page requests history data (on initial page
    load, when performing a search, or when scrolling down to load more items).
    Recorded for queries where {HasCriticalActions}.
  </summary>
  <token key="HasCriticalActions" variants="HasCriticalActions"/>
</histogram>

</histograms>

</histogram-configuration>
