<!--
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 Search 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="AuxiliarySearchDataType">
  <variant name="" summary="All Requests"/>
  <variant name=".Bookmarks" summary="Bookmarks"/>
  <variant name=".Tabs" summary="Tabs"/>
</variants>

<histogram name="Search.Ambient.Query" enum="AmbientSearchEntryPoint"
    expires_after="2024-02-11">
  <owner>juanmojica@google.com</owner>
  <owner>schechter@google.com</owner>
  <owner>stanfield@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    Records ambient search queries enumerated by the entry point used to make
    the query. This is recorded every time the user makes a query regardless of
    whether the query succeeds.
  </summary>
</histogram>

<histogram name="Search.AuxiliarySearch.DeleteTime{AuxiliarySearchDataType}"
    units="ms" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>Time taken for deleting contents from the auxiliary search.</summary>
  <token key="AuxiliarySearchDataType" variants="AuxiliarySearchDataType"/>
</histogram>

<histogram
    name="Search.AuxiliarySearch.DeletionFailure{AuxiliarySearchDataType}"
    units="count" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>
    Records the count of failed deletions from the auxiliary search.
  </summary>
  <token key="AuxiliarySearchDataType" variants="AuxiliarySearchDataType"/>
</histogram>

<histogram
    name="Search.AuxiliarySearch.DeletionRequestStatus{AuxiliarySearchDataType}"
    enum="AuxiliarySearchRequestStatus" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>
    Records the status of the request of the Auxiliary Search content deletion.
    Recorded twice for every deletion request: once to capture the request sent,
    and once to capture the consumer's response.
  </summary>
  <token key="AuxiliarySearchDataType" variants="AuxiliarySearchDataType"/>
</histogram>

<histogram name="Search.AuxiliarySearch.DonateTime" units="ms"
    expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>Time taken for donating contents to the auxiliary search.</summary>
</histogram>

<histogram
    name="Search.AuxiliarySearch.DonationFailure{AuxiliarySearchDataType}"
    units="count" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>
    Records the count of failed donations from the auxiliary search.
  </summary>
  <token key="AuxiliarySearchDataType" variants="AuxiliarySearchDataType"/>
</histogram>

<histogram name="Search.AuxiliarySearch.DonationRequestStatus"
    enum="AuxiliarySearchRequestStatus" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>
    Records the status of the request of the Auxiliary Search content donation.
    Recorded twice for every donation request: once to capture the request sent,
    and once to capture the consumer's response.
  </summary>
</histogram>

<histogram name="Search.AuxiliarySearch.DonationSent{AuxiliarySearchDataType}"
    units="count" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>
    Records the count of contents which are sent to the auxiliary search.
  </summary>
  <token key="AuxiliarySearchDataType" variants="AuxiliarySearchDataType"/>
</histogram>

<histogram name="Search.AuxiliarySearch.QueryTime{AuxiliarySearchDataType}"
    units="ms" expires_after="M130">
  <owner>gangwu@chromium.org</owner>
  <owner>chrome-mobile-search@google.com</owner>
  <summary>Time taken for query contents for the auxiliary search.</summary>
  <token key="AuxiliarySearchDataType" variants="AuxiliarySearchDataType"/>
</histogram>

<histogram name="Search.ChoiceScreenEvents"
    enum="SearchEngineChoiceScreenEvents" expires_after="2024-03-31">
  <owner>samarchehade@chromium.org</owner>
  <owner>chrome-waffle-eng@google.com</owner>
  <summary>
    Records that the search engine choice screen was displayed, and whether this
    happened as part of the FRE. Also records when the user clicks/taps the 'Set
    as Default' button and if this selection was in the FRE or not. On Desktop,
    if the choice screen is shown simultaneously in multiple browsers that all
    have the same profile, the display event is only recorded once.
  </summary>
</histogram>

<histogram name="Search.ChoiceScreenNavigationConditions"
    enum="SearchEngineChoiceScreenConditions" expires_after="2024-03-31">
  <owner>dgn@chromium.org</owner>
  <owner>muellerj@chromium.org</owner>
  <owner>chrome-waffle-eng@google.com</owner>
  <summary>
    Records the conditon state at page navigation for whether to display the
    search engine choice screen. This is recorded every time the eligibility
    state is being checked, which might be as often as every page navigation.
    The enum is shared with ChoiceScreenProfileInitConditions, and individual
    enum members might appear in only one histogram.
  </summary>
</histogram>

<histogram name="Search.ChoiceScreenProfileInitConditions"
    enum="SearchEngineChoiceScreenConditions" expires_after="2024-03-31">
  <owner>dgn@chromium.org</owner>
  <owner>muellerj@chromium.org</owner>
  <owner>chrome-waffle-eng@google.com</owner>
  <summary>
    Records the conditon state at profile initialization for displaying the
    search engine choice screen that the profile is in. The enum is shared with
    ChoiceScreenNavigationConditions, and individual enum members might appear
    in only one histogram.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.All.ResultsSeen" enum="Boolean"
    expires_after="never">
<!-- expires-never: dashboard metric (internal: go/cs-metrics-dashboard) -->

<!-- expires-never: part of top-line metric (internal: go/chrome-browser-nsm) -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <summary>
    Records whether the user opened the panel when it was shown. Recorded for
    all gestures for all users when the UX is hidden. Implemented for Android.

    The user action Search.ContextualSearch.All.ResultsSeen.true is also logged
    in the case that true is logged to this histogram.

    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="Search.ContextualSearch.All.Searches"
    enum="BooleanBottomSearchKind" expires_after="2024-02-25">
<!-- TODO(donnd): change expires_after to "never" once established and
       approved. -->

  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    Records that a Search Result page was shown in a bottom sheet for either
    Contextual Search or Related Searches. Each entry corresponds to exactly one
    search of the indicated kind. Related Searches are recorded when the SERP is
    shown to the user, and Contextual Searches are recorded when the panel is
    closed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.CardTag"
    enum="ContextualSearchCardTag" expires_after="never">
<!-- expires-never: tracks key server results returned to the user. -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The type of card returned in the Search Term Resolution Response from the
    server when a search is resolved in response to a Tap gesture that uses
    surrounding text to determine the best search. This characterises what we'll
    show in the Bar. Recorded when the panel is closed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.CardTagSeen"
    enum="ContextualSearchCardTag" expires_after="never">
<!-- expires-never: tracks key server results returned to the user. -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The type of card shown in the Bar when the panel has been opened. Recorded
    when the panel is closed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Counted.Event"
    enum="ContextualSearchCountedEvent" expires_after="2023-04-16">
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    Records that a Search was done and whether the search was unintelligent or
    intelligent, and whether it was likely counted by Rasta. Recorded for all
    users when the panel is closed after being opened. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Counted.Searches" enum="Boolean"
    expires_after="2023-04-16">
<!-- TODO(donnd): change expires_after to "never" once established and
         approved. -->

  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    Records that a Contextual Search was initiated by the user, and whether that
    search should be counted as a real user-viewed search or not.

    The true bucket is designed to match what Rasta counts in its queries(event)
    metric as a real user search.

    The false bucket includes all the other cases where the Contextual Search
    was started but not counted by Rasta because the user has not been able to
    view the Search Result Page. Usually this is because the user did not expand
    the panel beyond the peeking state, but occasionally because it did not
    render. Recorded when the panel is closed for all users. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.NetError" enum="NetErrorCodes"
    expires_after="2024-03-17">
  <owner>donnd@chromium.org</owner>
  <owner>basiaz@google.com</owner>
  <summary>
    Network status codes recorded for each Contextual Search request after the
    url loader calls the completion callback. Recorded value is the absolute
    value of the received net::Error value.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.OutcomesDuration" units="days"
    expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records the duration of persisted outcomes between the time they were stored
    and the time that they were sent back to the server. Recorded when persisted
    data is sent to the server. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.FeaturesAvailable"
    enum="Boolean" expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Logs that the UX has entered a state where features are available to be
    recorded to Ranker. A value of true indicates that the available features
    include outcomes, false if they are just features at inference-time. Use to
    correlate with what actually gets recorded in the Search.
    ContextualSearch.Ranker.Recorded histogram. Recorded when a tap gesture is
    recognized that might trigger our UX (for pure features), and when the UX is
    actually shown (for outcomes). Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Model.Status"
    enum="RankerModelStatus" expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <owner>charleszhao@chromium.org</owner>
  <summary>Tracks the outcome of attempts to download a Ranker Model.</summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.NotSuppressed.ResultsSeen"
    enum="ContextualSearchResultsSeen" expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether the user opened the panel when a tap was not suppressed by
    Ranker. Recorded when the UX is hidden. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Recorded" enum="Boolean"
    expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Logs that features were recorded to Ranker and whether it was an outcome or
    not. Recorded when the UX is shown or hidden. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.RecordedNative" enum="Boolean"
    expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Logs that features were recorded to Ranker from native code and whether it
    was an outcome or not. Recorded when the UX is shown or hidden. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Suppressed" enum="Boolean"
    expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records Ranker's prediction about whether a tap should be suppressed or not.
    Recorded when the UX is hidden. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Timer.DownloadModel" units="ms"
    expires_after="M81">
  <owner>charleszhao@chromium.org</owner>
  <owner>donnd@chromium.org</owner>
  <summary>
    Time taken for the Ranker Model Loader to download its model from the
    configured URL, in ms.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Timer.ParseModel" units="ms"
    expires_after="M77">
  <owner>charleszhao@chromium.org</owner>
  <owner>donnd@chromium.org</owner>
  <summary>
    Time taken for the Ranker Model Loader to parse its model, in ms.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Timer.ReadModel" units="ms"
    expires_after="M85">
  <owner>charleszhao@chromium.org</owner>
  <owner>donnd@chromium.org</owner>
  <summary>
    Time taken for the Ranker Model Loader to read its model from local storage
    (cache), in ms.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.Timer.WriteModel" units="ms"
    expires_after="M85">
  <owner>charleszhao@chromium.org</owner>
  <owner>donnd@chromium.org</owner>
  <summary>
    Time taken for the Ranker Model Loader to write its model to local storage,
    in ms.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.WasAbleToPredict"
    enum="Boolean" expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether Ranker was able to make a prediction about tap suppression.
    Recorded when the UX is triggered by tap. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Ranker.WouldSuppress.ResultsSeen"
    enum="ContextualSearchResultsSeen" expires_after="M104">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether the user opened the panel when a tap would be suppressed by
    Ranker if suppression was enforced. Recorded when the UX is hidden.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.ResolveReceived" enum="Boolean"
    expires_after="M94">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records that a resolve response was received from the server, and whether
    that was due to a Tap gesture or not (vs longpress). Recorded when the user
    triggers the feature and the server responds. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.ResolveRequested"
    enum="ContextualSearchGestureIsTap" expires_after="2023-02-12">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records that a resolve request was sent to the server, and whether that was
    due to a Tap or not (vs longpress). Recorded when the user triggers the
    feature. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.SelectionExpanded"
    enum="ContextualSearchGestureIsTap" expires_after="2024-03-17">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records that a resolve request from the server caused the selection to be
    expanded, and whether that original selection was due to a Tap or not (vs
    longpress). Recorded when the qualifying server response is received.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.SuppressedViewTooSmall" enum="Boolean"
    expires_after="M106">
  <owner>donnd@chromium.org</owner>
  <owner>gangwu@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    Records whether triggering the Touch To Search feature was suppressed due to
    the base page view being too small. This may happen in landscape mode, on
    very small phones, when a Partial Height Custom Tab is being displayed, or
    when muliwindow is in use with a small window. The intent is to capture in
    the log how many searches we lose when the gating Feature is enabled.
    Recorded when a gesture that would normally trigger TTS suppresses the
    bottom sheet from showing. Android only.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Tap.ResultsSeen" enum="Boolean"
    expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether the user opened the panel when it was shown in response to a
    tap gesture, for all users. Recorded when the UX is hidden. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.Tap.SyncEnabled.ResultsSeen"
    enum="Boolean" expires_after="M76">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether the user opened the panel when it was shown for sync-enabled
    users only (this is an approximation for the population that logs to UKM).
    Recorded for all gestures for users with sync enabled when the UX is hidden.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.TranslationNeeded"
    enum="ContextualSearchGestureIsTap" expires_after="M106">
  <obsolete>
    Removed 08/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    Records that a translation is needed for the current Contextual Search, and
    whether the selection was originally created by a Tap gesture. This is
    recorded regardless of whether the user will actually be shown a translation
    or not. Recorded any time a selection is established or changed with the
    Contextual Search Translations feature enabled. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.TranslationsOptInIPHShown"
    enum="BooleanPreviouslyShown" expires_after="2022-04-04">
  <obsolete>
    Removed 01/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    Records whether an IPH promoting the Opt-in for the Translations experiment
    has ever been shown for the current user. Recorded when the Overlay Panel is
    closed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.TranslationsOptInIPHWorked"
    enum="BooleanOptedIn" expires_after="2022-04-04">
  <obsolete>
    Removed 01/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    Records whether the user actually did Opt-in right after seeing the IPH for
    the Translations experiment. Recorded when the Overlay Panel is closed.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.UnifiedConsent.PreviouslyUndecided"
    enum="Boolean" expires_after="2019-01-30">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records the previous state of the user's enabled preference to indicate
    whether they were decided or undecided about fully enabling this feature.
    Recorded during the rollout of Unified Consent when the Contextual Search
    preference is changed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.UnifiedConsent.ThrottledRequests"
    enum="Boolean" expires_after="2019-01-30">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether throttling for Unified Consent was done for all requests.
    Recorded when the user taps on text and the system would like the server to
    suggest what to search for using page context, regardless of feature-enabled
    state. Recorded multiple times for each request. Supports the rollout of
    Unified Consent for Contextual Search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearch.UnifiedConsent.ThrottleEligible"
    enum="Boolean" expires_after="2019-01-30">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Records whether this user had a request throttled or not when needed.
    Recorded when the user taps on text and the system would like the server to
    suggest what to search for using page context, and throttling is in effect
    for this user. Supports the rollout of Unified Consent for Contextual
    Search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchContextualCardsIntegration.DataShown"
    enum="Boolean" expires_after="never">
<!-- expires-never: key metric on usefulness of Touch to Search. -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether Contextual Cards data was shown in the Contextual Search Bar.
    Contextual Cards data is included with the search term resolution response.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchDurationBetweenTriggerAndScrollNotSeen"
    units="ms" expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The duration between the panel being triggered and the panel being dismissed
    due to a scroll when search results were not seen. Implemented for Android.
    Prior to M57 this was recorded on tap and longpress; on M57+ it is only
    recorded on tap.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchDurationBetweenTriggerAndScrollSeen"
    units="ms" expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The duration between the panel being triggered and the panel being dismissed
    due to a scroll when search results were seen. Implemented for Android.
    Prior to M57 this was recorded on tap and longpress; on M57+ it is only
    recorded on tap.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchDurationSeen" units="ms"
    expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time from initiating to ending a contextual search, when results were
    seen as part of the search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchDurationUnseen" units="ms"
    expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time from initiating to ending a contextual search, when results were
    not seen as part of the search and the search did not end with the beginning
    of another contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchDurationUnseenChained" units="ms"
    expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time from initiating to ending a contextual search, when results were
    not seen as part of the search and the search ended with the beginning of
    another contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchEnterClosed"
    enum="ContextualSearchEnterClosedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (previous state and reason) of the first entry into the closed
    panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchEnterExpanded"
    enum="ContextualSearchEnterExpandedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (previous state and reason) of the first entry into the expanded
    panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchEnterMaximized"
    enum="ContextualSearchEnterMaximizedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (previous state and reason) of the first entry into the
    maximized panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchEnterPeeked"
    enum="ContextualSearchEnterPeekedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (previous state and reason) of the first entry into the peeked
    panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchEntitySeen"
    enum="ContextualSearchResultsSeen" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether search results were seen as part of a Contextual Search when a tap
    was on a word that we think is an entity. Recorded when Contextual Search is
    dismissed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchExitClosed"
    enum="ContextualSearchExitClosedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (destination state and reason) of the first exit out of the
    closed panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchExitExpanded"
    enum="ContextualSearchExitExpandedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (destination state and reason) of the first exit out of the
    expanded panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchExitMaximized"
    enum="ContextualSearchExitMaximizedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (destination state and reason) of the first exit out of the
    maximized panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchExitPeeked"
    enum="ContextualSearchExitPeekedStateChange" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The details (destination state and reason) of the first exit out of the
    peeked panel state within a contextual search. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchFallbackSearchRequestStatus"
    enum="ContextualSearchSearchRequestStatus" expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The status of the Contextual Search fallback Search request. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchFirstRunPanelSeen"
    enum="ContextualSearchFirstRunPanelSeen" expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether the first run flow's panel was seen as part of a contextual search.
    Only logged when the user triggered the first run flow yet exited the search
    still in the undecided preference state. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchIPHShown" enum="Boolean"
    expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <owner>mahmoudi@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The number of times the Contextual Search panel is opened, categorized by
    whether In-Product Help for Contextual Search was shown before. Logged when
    the panel is opened. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchLiteralSearchDuration" units="ms"
    expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time from starting a literal search until the results in the SERP start
    to become viewable. Applies only to prefetched requests. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchLowPrioritySearchRequestStatus"
    enum="ContextualSearchSearchRequestStatus" expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The status of the Contextual Search low priority Search request. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchNormalPrioritySearchRequestStatus"
    enum="ContextualSearchSearchRequestStatus" expires_after="M105">
  <obsolete>
    Removed 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The status of the Contextual Search normal priority Search request.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPanelOpenDuration" units="ms"
    expires_after="M106">
  <obsolete>
    Removed 08/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    The time from opening the panel beyond peek until the panel is closed.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPanelOpenedIPHShown" enum="Boolean"
    expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <owner>mahmoudi@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The number of times the Contextual Search panel is opened, categorized by
    whether In-Product Help for opening the panel was shown before. Logged when
    the panel is opened. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPreferenceState"
    enum="ContextualSearchPreferenceState" expires_after="never">
<!-- expires-never: dashboard metric (internal: go/cs-metrics-dashboard) -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The state of the Contextual Search Preference. Can be logged multiple times.
    Used to determine the population size (user view). Logged whenever the
    Chrome application is paused. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPreferenceStateChange"
    enum="ContextualSearchPreferenceState" expires_after="never">
<!-- expires-never: dashboard metric (internal: go/cs-metrics-dashboard) -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The Contextual Search preference state after a modification from the
    preference menu. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPrivacyOptInPreferenceStateChange"
    enum="BooleanOptedIn" expires_after="2023-10-15">
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    The Contextual Search privacy opt-in preference state after a modification
    from the preference menu. Recorded when the opt-in switch in Settings page
    is toggled. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoCardChoice" enum="BooleanOptedIn"
    expires_after="2023-05-07">
  <owner>donnd@chromium.org</owner>
  <owner>contextual-search-eng@google.com</owner>
  <summary>
    The user's choice in the Contextual Search promo card. Recorded when the 'No
    thanks' or 'Turn on' button on the Contextual Search Promo Card is chosen.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoOpenCount" units="opens"
    expires_after="M104">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The total count of times that the bar with the promo has been opened. Once
    the user decides, this counter is no longer updated.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoOpenCount2" units="opens"
    expires_after="2023-06-26">
  <owner>gangwu@chromium.org</owner>
  <owner>contextual-search-eng@chromium.org</owner>
  <summary>
    The total count of times that the revised promo has been shown. Once the
    user decides, this counter is no longer updated. Logged for each show of the
    promo card. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoSeenByGesture"
    enum="ContextualSearchSeenByGesture" expires_after="M106">
  <obsolete>
    Removed as of 08/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether the promo was seen, broken down by original triggering gesture.
    Logged each time the promo was activated. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoTapsBeforeFirstOpen" units="taps"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The historic number of taps that showed a peeking bar with the opt-out promo
    before the first time the user opened the panel.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoTapsForNeverOpened" units="taps"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The historic number of taps that showed a peeking bar with the opt-out promo
    for users who have never opened the panel. This count may be limited by the
    Finch config param promo_on_limited_taps.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchPromoTapsRemaining" units="taps"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The number of remaining taps that can trigger the promo for this user.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchQuickActions.Category"
    enum="ContextualSearchQuickActionCategory" expires_after="2023-10-22">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The category of quick actions shown in the Contextual Search bar. Recorded
    when the quick action is set. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchQuickActions.Clicked"
    enum="BooleanClicked" expires_after="never">
<!-- expires-never: indicates completion of a user journey. -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether a quick action in the Contextual Search bar was clicked, which
    activates the associated intent. Recorded when Contextual Search is
    dismissed due to a click on a QuickAction in the Bar. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchQuickActions.IntentResolution"
    enum="ContextualSearchQuickActionIntentResolution" expires_after="M81">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether a Contextual Search quick action intent resolved to zero, one, or
    many apps. Recorded when the quick action intent URI is resolved.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchQuickActions.ResultsSeen"
    enum="ContextualSearchResultsSeen" expires_after="M81">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether search results were seen as part of a Contextual Search when a quick
    action was shown. Recorded when Contextual Search is dismissed. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchQuickActions.Shown" enum="BooleanShown"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether a quick action was shown in the Contextual Search bar. Recorded when
    the quick action is set. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchQuickAnswerSeen"
    enum="ContextualSearchQuickAnswerSeen" expires_after="M104">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether a Quick Answer was activated, considered an answer, and seen.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchRecentScrollSuppression"
    enum="ContextualSearchTapSuppression" expires_after="M104">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether showing the Tap to Search UX in response to a Tap was suppressed by
    a recent scroll. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchResolutionDuration" units="ms"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time from starting a resolving search until the Search Term Resolves.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchResolvedSearchDuration" units="ms"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time from starting a resolving search until the results in the SERP
    start to become viewable. Applies only to prefetched requests. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchResultsSeen"
    enum="ContextualSearchResultsSeen" expires_after="never">
<!-- expires-never: dashboard metric (internal: go/cs-metrics-dashboard) -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether search results were seen as part of a contextual search. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchResultsSeenByGesture"
    enum="ContextualSearchSeenByGesture" expires_after="never">
<!-- expires-never: dashboard metric (internal: go/cs-metrics-dashboard) -->

  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether search results were seen, broken down by original triggering
    gesture. Only includes users that have enabled. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchScreenTopSuppressed"
    enum="ContextualSearchTapSuppression" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether Taps near the top of the screen was suppressed. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchSecondTapMlOverrideSeen" enum="Boolean"
    expires_after="M77">
  <obsolete>
    Removed as of 01/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether results were seen for a second tap that was allowed to override ML
    Tap Suppression. Recorded when the UX is hidden. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchSelectionLengthNotSeen" units="chars"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The length of the triggering selection when search results were not seen.
    Only logged when contextual search is triggered due to a tap. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchSelectionLengthSeen" units="chars"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The length of the triggering selection when search results were seen. Only
    logged when contextual search is triggered due to a tap. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchSelectionLengthSuppression"
    enum="ContextualSearchTapSuppression" expires_after="M104">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether a Tap was suppressed because the selection length was less than the
    minimum selection length. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchSelectionValid"
    enum="ContextualSearchSelectionValid" expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether a Contextual Search selection was valid. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapDurationNotSeen" units="ms"
    expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The duration of a tap that triggered a Contextual Search when the user does
    not open the panel. Implemented for Android. Logged when the panel closes
    after being triggered by a tap.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapDurationSeen" units="ms"
    expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The duration of a tap that triggered a Contextual Search when the user does
    open the panel. Implemented for Android. Logged when the panel closes after
    being triggered by a tap and subsequently opened.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapIPHShown" enum="Boolean"
    expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <owner>mahmoudi@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The number of times the Contextual Search is triggered by tapping,
    categorized by whether In-Product Help for tapping was shown before. Logged
    when Contextual Search is triggered by tapping. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapLongDurationSeen"
    enum="ContextualSearchResultsSeen" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether results were seen for a Tap that was of long duration. Recorded when
    the UX is hidden. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapShortDurationSeen"
    enum="ContextualSearchResultsSeen" expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether results were seen for a Tap that was of short duration. Recorded
    when the UX is hidden. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapsSinceOpenDecided" units="taps"
    expires_after="M104">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The count of taps that showed a peeking bar without the opt-out promo since
    this user has last opened the panel.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTapsSinceOpenUndecided" units="taps"
    expires_after="M104">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The count of taps that showed a peeking bar with the opt-out promo since
    this user has last opened the panel.
  </summary>
</histogram>

<histogram
    name="Search.ContextualSearchTapSuppressionSeen.AnyHeuristicSatisfied"
    enum="ContextualSearchSuppressionResultsSeen" expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    Whether results were seen for a Tap and whether any suppression heuristic
    was satisifed. Recorded when the UX is still shown (suppression not enabled,
    only logged). Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTimeToSearch" units="ms"
    expires_after="M105">
  <obsolete>
    Removed as of 06/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The time between tapping on a word and performing a search. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTopLocationNotSeen" units="dps"
    expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The DPs count histogram for Taps that were not seen. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTopLocationSeen" units="dps"
    expires_after="M103">
  <obsolete>
    Removed as of 05/2022
  </obsolete>
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The DPs count histogram for Taps that were seen. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.ContextualSearchTranslateCondition" enum="Boolean"
    expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    For each contextual search that is triggered by tap, records whether the
    translation conditions are met. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.DefaultSearchProviderType"
    enum="OmniboxSearchEngineType" expires_after="2023-02-12">
  <obsolete>
    Logged on profile open, including for profiles that do not allow the user to
    search such as &quot;system&quot; profiles. When logged in such cases,
    reported the default value. Replaced in M-108 with the histogram
    Search.DefaultSearchProviderType2, which is similar but not emitted on for
    some of those unusual/inappropriate profiles.
  </obsolete>
  <owner>mpearson@chromium.org</owner>
  <owner>csharp@chromium.org</owner>
  <summary>
    The type of the default search engine that is loaded when a profile is
    opened or after a profile reset. Due to an error, there was a period from
    roughly May 9 2014 to May 23 2014 during which this was not being logged.
  </summary>
</histogram>

<histogram name="Search.DefaultSearchProviderType2{Population}"
    enum="OmniboxSearchEngineType" expires_after="2024-07-18">
  <owner>mpearson@chromium.org</owner>
  <owner>ftirelo@chromium.org</owner>
  <summary>
    The type of the default search engine that is loaded when a regular, guest,
    or ChromeOS sign-in screen profile is opened or after a profile reset. (A
    profile reset can only happen to a regular profile.) Not logged when an
    Incognito profile is opened because that inherits the settings from its
    parent profile. As such, it's not necessary to log the Incognito profile's
    settings.

    The fact that this is logged when the ChromeOS sign-on screen profile is
    opened means this is recorded when the ChromeOS sign-in screen is initially
    shown. The value recorded is the default value for the ChromeOS install; the
    default search engine used in this profile cannot be changed. Also note that
    people cannot search / browse the web using this profile. As such, the
    default search engine setting for this profile does not have any practical
    meaning.

    {Population}
  </summary>
  <token key="Population">
    <variant name="" summary="Reported for all users."/>
    <variant name=".SetByEnterprisePolicy"
        summary="Reported for users with DSP set by Enterprise policy."/>
  </token>
</histogram>

<histogram name="Search.GsaAccountChangeNotificationSource"
    enum="GsaAccountChangeNotificationSource" expires_after="M77">
  <owner>lizeb@chromium.org</owner>
  <summary>
    On Android, when GSA tells Chrome about an account change, what is the
    notification mechanism used, which is either the service connection, or a
    broadcast. Recorded once per account change.
  </summary>
</histogram>

<histogram name="Search.GsaBroadcastsAccountChanges"
    enum="BooleanAccountChange" expires_after="M77">
  <owner>lizeb@chromium.org</owner>
  <summary>
    On Android, whether GSA tells Chrome about account changes through the
    service or through a broadcast. This is reported at most once per Chrome
    startup.
  </summary>
</histogram>

<histogram name="Search.HistoryReport.UsageReportsBuffer.LevelDBEntries"
    units="entries" expires_after="2019-06-01">
  <owner>wychen@chromium.org</owner>
  <owner>yusufo@chromium.org</owner>
  <summary>
    The number of entries in the usage report level DB for Icing. This is
    measured on cold start.
  </summary>
</histogram>

<histogram name="Search.IcingContextReportingStatus"
    enum="IcingContextReportingStatus" expires_after="M77">
  <owner>donnd@chromium.org</owner>
  <summary>
    Records the reason why a context report to Icing failed, every time Chrome
    attemps to record the current context (tab switching, navigations, etc).
    Also records reasons why context reporting might be disabled. Recorded on
    Android only.
  </summary>
</histogram>

<histogram name="Search.Image.Camera.Open" enum="CameraOpenEntryPoint"
    expires_after="2024-02-04">
  <owner>juanmojica@google.com</owner>
  <owner>schechter@google.com</owner>
  <owner>stanfield@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    Records all intents fired to open the Lens viewfinder enumerated by entry
    point, regardless of whether the intent was successful.
  </summary>
</histogram>

<histogram name="Search.Image.Camera.Result" enum="CameraResult"
    expires_after="2024-03-24">
  <owner>juanmojica@google.com</owner>
  <owner>schechter@google.com</owner>
  <owner>stanfield@google.com</owner>
  <owner>hujasonx@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    Records camera results such as successful image capture, user exited, etc.
    This is recorded every time the user opens the Lens viewfinder camera.
  </summary>
</histogram>

<histogram name="Search.iOS.SelectDefaultSearchEngine"
    enum="OmniboxSearchEngineType" expires_after="2024-01-28">
  <owner>sczs@chromium.org</owner>
  <owner>gambard@chromium.org</owner>
  <summary>
    When an iOS user changes the default search engine in chrome Settings,
    records the search engine's type.
  </summary>
</histogram>

<histogram name="Search.Lens.PingDuration" units="ms"
    expires_after="2023-08-07">
  <owner>hujasonx@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    When the user performs a Lens search on Desktop, records the time elapsed
    from when a Lens Ping was sent and the response was received. Recorded if
    enable-lens-ping and ping-lens-sequentially are both true. If the ping was
    never received, or was an unexpected type, such as a non 204 response code,
    this event will not be logged.
  </summary>
</histogram>

<histogram name="Search.Lens.ViewportDimensionsSent.Success" units="Boolean"
    expires_after="2024-03-31">
  <owner>mercerd@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    When the user performs a Lens search on Desktop, records if the viewport
    dimensions of the side panel were included in the request. A false value
    indicates either the viewport width or height were not included in the
    request. A true value is recorded if and only if both the `vpw` and `vph`
    url params were added to the request with non-zero values.
  </summary>
</histogram>

<histogram name="Search.PartnershipSearchPerformed" enum="SearchEntryPoint"
    expires_after="M85">
  <owner>yusufo@chromium.org</owner>
  <summary>
    The entry point used for all searches performed under partnership after the
    Android search engine promo dialog was shown. This is a dialog prompting the
    user to pick a default search engine. This metric is collected for every
    search query performed.
  </summary>
</histogram>

<histogram base="true" name="Search.QueryTiles.Bitmap.Available"
    enum="BooleanAvailable" expires_after="2022-10-31">
<!-- Name completed by histogram_suffixes name="TileUiSurface" -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Indicates whether or not a bitmap could be shown for a tile.
  </summary>
</histogram>

<histogram base="true" name="Search.QueryTiles.Bitmap.FetchDuration" units="ms"
    expires_after="2022-04-01">
<!-- Name completed by histogram_suffixes name="TileUiSurface" -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the time taken to fetch a bitmap for a tile when a bitmap could be
    found. It includes the time starting from the UI layer requesting the
    backend till the backend returns the associated bitmap.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.Fetcher.FirstFlowDuration" units="hours"
    expires_after="2023-01-01">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records duration from time when first task scheduled to time the fetch task
    completed.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.Fetcher.Start" units="hours"
    expires_after="2023-03-05">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>Records the hour (0-23) when the TileFetcher task starts.</summary>
</histogram>

<histogram name="Search.QueryTiles.FetcherHttpResponseCode"
    enum="HttpResponseCode" expires_after="2023-09-10">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>Records the HTTP response code get from TileFetcher.</summary>
</histogram>

<histogram name="Search.QueryTiles.FetcherNetErrorCode" enum="NetErrorCodes"
    expires_after="2023-08-31">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>Records the net error code get from TileFetcher.</summary>
</histogram>

<histogram name="Search.QueryTiles.Group.PruneReason"
    enum="QueryTilesGroupPruneReason" expires_after="2022-12-11">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the reasons caused the tile group pruned in TileManager.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.GroupStatus" enum="QueryTilesGroupStatus"
    expires_after="2023-02-12">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the TileManager status after initialized and loaded completed.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.ImagePreloadingEvent"
    enum="QueryTilesImageLoadingEvent" expires_after="2022-04-01">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the image preloading events when the query tile images are fetched
    from the background task.
  </summary>
</histogram>

<histogram base="true" name="Search.QueryTiles.NoBitmap.FetchDuration"
    units="ms" expires_after="2022-04-01">
<!-- Name completed by histogram_suffixes name="TileUiSurface" -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the time taken by the bitmap request for a tile when no bitmap could
    be found. It includes the time starting from the UI layer requesting the
    backend till the backend returns the associated bitmap.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.RequestStatus"
    enum="QueryTilesRequestStatus" expires_after="2023-04-16">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the TileFetcher status after request send to server and response
    received.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.ShowQueryTilesSegmentationResult"
    enum="ShowQueryTilesSegmentationResult" expires_after="2023-08-31">
  <owner>haileywang@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <summary>
    Records the result from segmentation platform that determines whether or not
    to show Query Tiles on NTP. When segmentation model is finch enabled, this
    is recorded every time the user navigates to NTP and the current Query Tiles
    decision is inexistant or expired. For cases where segmentation model is not
    finch enabled see ShowQueryTilesSegmentationResultComparison.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.ShowQueryTilesSegmentationResultComparison"
    enum="ShowQueryTilesSegmentationResultComparison"
    expires_after="2023-10-22">
  <owner>haileywang@chromium.org</owner>
  <owner>ssid@chromium.org</owner>
  <summary>
    Records the comparison of result from segmentation model and code logic for
    when to show Query Tiles on NTP. When segmentation model is not finch
    enabled, this is recorded every time the user navigates to NTP and the
    current Query Tiles decision is inexistant or expired. For cases where
    segmentation model is finch enabled see ShowQueryTilesSegmentationResult.
  </summary>
</histogram>

<histogram base="true" name="Search.QueryTiles.Tile.Clicked" units="index"
    expires_after="2023-08-31">
<!-- Name completed by histogram_suffixes name="TileUiSurface" -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records the index of the tile that was clicked. The index refers to the
    position of the tile in the carousel.
  </summary>
</histogram>

<histogram base="true" name="Search.QueryTiles.Tile.Clicked.IsTopLevel"
    enum="BooleanIsTopLevel" expires_after="2022-04-01">
<!-- Name completed by histogram_suffixes name="TileUiSurface" -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>Indicates whether the tile clicked was a top level tile.</summary>
</histogram>

<histogram base="true" name="Search.QueryTiles.TileCount" units="tiles"
    expires_after="2023-08-31">
<!-- Name completed by histogram_suffixes name="TileUiSurface" -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Indicates the number of tiles displayed in the UI after the backend was
    loaded.
  </summary>
</histogram>

<histogram name="Search.QueryTiles.TrendingTileEvent" enum="TrendingTileEvent"
    expires_after="2024-03-17">
  <owner>qinmin@chromium.org</owner>
  <owner>chrome-upboarding-eng@google.com</owner>
  <summary>
    Records events related to trending tiles, including display, removal and
    click, after the events occur.
  </summary>
</histogram>

<histogram name="Search.RegionSearch.Lens.RegionAspectRatio"
    enum="LensRegionSearchAspectRatio" expires_after="2024-02-25">
  <owner>juanmojica@google.com</owner>
  <owner>benwgold@google.com</owner>
  <owner>stanfield@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    Records an enum representing the aspect ratio of the region selected after
    using the Lens Region Search feature.
  </summary>
</histogram>

<histogram name="Search.RegionSearch.Lens.RegionViewportProportion" units="pct"
    expires_after="2024-02-25">
  <owner>juanmojica@google.com</owner>
  <owner>benwgold@google.com</owner>
  <owner>stanfield@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    Records a percentage to represent the proportion of the selected region to
    the screen after selecting a region with the Lens Region Search feature.
  </summary>
</histogram>

<histogram name="Search.RegionSearch.Lens.Result"
    enum="LensRegionSearchCaptureResult" expires_after="2024-02-11">
  <owner>juanmojica@google.com</owner>
  <owner>benwgold@google.com</owner>
  <owner>stanfield@google.com</owner>
  <owner>lens-chrome-eng@google.com</owner>
  <summary>
    Records an enum representing the result of the capture of the region for
    Lens Region Search feature.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.AllUserPermissions"
    enum="ContextualSearchPermissions" expires_after="2022-12-11">
  <owner>donnd@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    Enumerates all users by the permissions needed in order to use the Related
    Searches feature. This tells us the potential user pool if we were to remove
    one of the current requirements (which are sending page content and sending
    the URL to Google). Logged whenever the Chrome application is paused. NOTE:
    Use the Count unique clients option to count users since multiple events are
    logged for each user. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.CarouselLastVisibleItemPosition"
    units="position" expires_after="2024-03-03">
  <owner>donnd@chromium.org</owner>
  <owner>gangwu@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    The last visible position index for a chip in the carousel. the index is 0
    based. Ex. There are 10 chips, and only 2 chips are shown completely, and 1
    chip is shown half, in this case, 2 will be reported. Recorded every time
    the carousel is shown, or the carousel content is updated. Implemented for
    Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.CarouselScrollAndClick"
    enum="ScrollAndClickStatus" expires_after="2024-02-11">
  <owner>donnd@chromium.org</owner>
  <owner>gangwu@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    Records whether and how the user interacted with the carousel. Recorded when
    the presentation UI is dismissed while the carousel is shown. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.CarouselScrolled" enum="Boolean"
    expires_after="2024-03-03">
  <owner>donnd@chromium.org</owner>
  <owner>gangwu@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    Records whether the user scrolled the carousel when it was shown, this can
    help us to find users who discover carousel scroll gesture. Recorded when
    the presentation UI is dismissed while the carousel is shown. Implemented
    for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.CTR" enum="BooleanClicked"
    expires_after="2022-08-07">
  <owner>donnd@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    Records the click through rate for Related Searches. This is the rate that
    at least one suggestion was chosen by the user when any were shown. Records
    false whenever Related Searches suggestions were shown to the user but none
    were selected, and true whenever the user has clicked on any suggestion to
    view the suggested query. Only records one entry per botton-sheet session.
    Recorded when the presentation UI is dismissed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.NumberOfSuggestionsClicked2"
    units="selected" expires_after="2024-02-25">
  <owner>donnd@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    The number of suggestions that were chosen by the user in a bottom-sheet
    session when the user chose any Related Searches. Written when the
    suggestions UI is closed. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.QualifiedUsers" enum="Boolean"
    expires_after="2024-03-03">
  <owner>donnd@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    Records true for every user that is qualified for the Related Searches
    experiment regardless of whether that feature is enabled or not. Never logs
    false. Used to validate that population sizes are relatively equal (since
    only a subset is actually qualified). Logged whenever a user triggers
    Contextual Search in way that could activate Related Searches (i.e. sends
    context). NOTE: Use the Count unique clients option to count users since
    multiple events are logged for each user. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.SelectedCarouselIndex" units="position"
    expires_after="2023-10-22">
  <owner>donnd@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    The display position index for a chip in the carousel when it was selected
    by the user. Written when a Related Searches suggestion chip is clicked.
    Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.RelatedSearches.SelectedSuggestionIndex"
    units="position" expires_after="2023-10-22">
  <owner>donnd@chromium.org</owner>
  <owner>related-searches-vteam@google.com</owner>
  <summary>
    The display position index for a suggestion when it was selected by the
    user. The suggestion at location 0 is always the default selection search,
    which may not be a possible position in some implementations. All indecies
    from 1 on are true Related Searches suggestions. Written when a Related
    Searches suggestion in the UI is selected. Implemented for Android.
  </summary>
</histogram>

<histogram name="Search.SearchEngineListedInPromoDialog"
    enum="OmniboxSearchEngineType" expires_after="M81">
<!-- Name completed by histogram_suffixes name="SearchEnginePromoOrdering" and name="SearchEnginePromoDeviceType" -->

  <owner>yusufo@chromium.org</owner>
  <summary>
    The search engines listed in the options for search engine promo. This is an
    Android specific dialog prompting the user to pick a default search engine.
    The dialog was shown on a device that had Chrome before it was first
    introduced.
  </summary>
</histogram>

<histogram name="Search.SearchEngineSelectionInPromoDialog"
    enum="OmniboxSearchEngineType" expires_after="M81">
  <owner>yusufo@chromium.org</owner>
  <summary>
    The search engine selected by the user from the search engine promo. This is
    an Android specific dialog prompting the user to pick a default search
    engine. The dialog was shown on a device that had Chrome before it was first
    introduced.
  </summary>
</histogram>

<histogram name="Search.SearchWidgetUseAndDeviceInfo"
    enum="SearchWidgetUseInfo" expires_after="2020-02-16">
  <owner>yusufo@chromium.org</owner>
  <summary>
    The current state for search widget use and whether the device is a
    partnership device related with the Android Search Widget. Collected on
    every cold start.
  </summary>
</histogram>

<histogram name="Search.TemplateURL.Events" enum="SearchTemplateURLEvent"
    expires_after="2023-05-01">
  <obsolete>
    Expired and removed 05/2023.
  </obsolete>
  <owner>tommycli@chromium.org</owner>
  <owner>chrome-omnibox-team@google.com</owner>
  <summary>
    Records when TemplateURL encounters specific events, particularly during
    Sync or startup. There's a bunch of edge cases being handled by complicated
    code within TemplateURLService, and we'd like to learn how often they
    actually occur in the wild.
  </summary>
</histogram>

<histogram name="SearchAnswer.AnswerVisibleTime" units="ms"
    expires_after="2021-09-01">
  <owner>mmourgos@chromium.org</owner>
  <owner>newcomer@chromium.org</owner>
  <summary>Time between showing and hiding the answer card.</summary>
</histogram>

<histogram name="SearchAnswer.LoadingTime" units="ms" expires_after="M85">
  <owner>newcomer@chromium.org</owner>
  <summary>
    Time between sending an answer server request and the end of loading of the
    answer card. Failed requests and requests not returning an answer are not
    counted.
  </summary>
</histogram>

<histogram name="SearchAnswer.NavigationTime" units="ms" expires_after="M85">
  <owner>newcomer@chromium.org</owner>
  <summary>
    Time between sending an answer server request and successful finish of
    navigation. Failed requests and requests not returning an answer are not
    counted.
  </summary>
</histogram>

<histogram name="SearchAnswer.RequestResult" enum="SearchAnswerRequestResult"
    expires_after="M85">
  <owner>newcomer@chromium.org</owner>
  <summary>Result of a answer server request.</summary>
</histogram>

<histogram name="SearchAnswer.ResizeAfterLoadTime" units="ms"
    expires_after="M85">
  <owner>newcomer@chromium.org</owner>
  <summary>
    Time between successfully loading an answer card request and updating its
    preferred size. There might be no or more than one size update per card
    load. Size updates that happen before the card finishes loading are ignored
    since they are not visible.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
