<!--
Copyright 2022 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 Views 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="BubbleName">
  <variant name="All" summary="Aggregated metrics for all bubbles"/>
  <variant name="DownloadBubbleContentsView"
      summary="Aggregated metrics DownloadBubbleContentsView bubbles"/>
  <variant name="ExtensionsMenuView"
      summary="Aggregated metrics for ExtensionsMenuView bubbles"/>
  <variant name="PageInfoBubbleViewBase"
      summary="Aggregated metrics for PageInfoBubbleViewBase bubbles"/>
  <variant name="PermissionPromptBaseView"
      summary="Aggregated metrics for PermissionPromptBaseView bubbles"/>
  <variant name="ProfileMenuViewBase"
      summary="Aggregated metrics for ProfileMenuViewBase bubbles"/>
</variants>

<histogram name="Bubble.{BubbleName}.CloseReason" enum="WidgetClosedReason"
    expires_after="2024-09-01">
  <owner>kerenzhu@chromium.org</owner>
  <owner>dayeung@chromium.org</owner>
  <owner>temao@chromium.org</owner>
  <owner>yuhengh@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>robliao@chromium.org</owner>
  <summary>Records the reason a bubble was closed.</summary>
  <token key="BubbleName" variants="BubbleName"/>
</histogram>

<histogram name="Bubble.{BubbleName}.CreateToPresentationTime" units="ms"
    expires_after="2024-09-01">
  <owner>temao@chromium.org</owner>
  <owner>yuhengh@chromium.org</owner>
  <owner>kerenzhu@chromium.org</owner>
  <owner>dayeung@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>robliao@chromium.org</owner>
  <summary>
    Records the time it takes from a bubble construction to when the compositor
    finishes the first presentation.
  </summary>
  <token key="BubbleName" variants="BubbleName"/>
</histogram>

<histogram name="Bubble.{BubbleName}.CreateToVisibleTime" units="ms"
    expires_after="2024-09-01">
  <owner>temao@chromium.org</owner>
  <owner>yuhengh@chromium.org</owner>
  <owner>kerenzhu@chromium.org</owner>
  <owner>dayeung@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>robliao@chromium.org</owner>
  <summary>
    Records the time it takes from a bubble construction to when the bubble
    becomes visible.
  </summary>
  <token key="BubbleName" variants="BubbleName"/>
</histogram>

<histogram name="Bubble.{BubbleName}.TimeVisible" units="ms"
    expires_after="2024-09-01">
  <owner>yuhengh@chromium.org</owner>
  <owner>kerenzhu@chromium.org</owner>
  <owner>dayeung@chromium.org</owner>
  <owner>temao@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>robliao@chromium.org</owner>
  <summary>Records the time a bubble is visible.</summary>
  <token key="BubbleName" variants="BubbleName"/>
</histogram>

<histogram name="Views.ColorProviderCacheSize" units="entries"
    expires_after="2024-02-25">
  <owner>pkasting@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>skau@chromium.org</owner>
  <summary>
    Records the size of the ColorProviderManager cache when a new ColorProvider
    is generated. New entries are generated when a client requests a
    ColorProvider with a Key that is not in the cache. Since the cache size is
    capped, a distribution with too many results at the tail indicate that the
    cache is too small.
  </summary>
</histogram>

<histogram
    name="Views.{Process}.NumColorProvidersInitializedDuringOnNativeThemeUpdated"
    units="providers" expires_after="2024-04-16">
  <owner>pkasting@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>skau@chromium.org</owner>
  <summary>
    Records the number of ColorProvider instances constructed and initialized by
    the ColorProviderManager following a NativeTheme update in a {Process}
    process. Emitted after the NotifyOnNativeThemeUpdated() event has been
    processed.
  </summary>
  <token key="Process">
    <variant name="Browser"/>
    <variant name="NonBrowser"/>
  </token>
</histogram>

<histogram name="Views.{Process}.TimeSpentInitializingColorProvider" units="ms"
    expires_after="2024-04-16">
  <owner>pkasting@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>skau@chromium.org</owner>
  <summary>
    Records the time spent initializing a newly constructed ColorProvider
    instance in a {Process} process. The timer starts immediately before the
    ColorProvider is constructed and emitted immediately after initialization
    (i.e. all mixers are run and the ColorMap is created).
  </summary>
  <token key="Process">
    <variant name="Browser"/>
    <variant name="NonBrowser"/>
  </token>
</histogram>

<histogram name="Views.{Process}.TimeSpentProcessingOnNativeThemeUpdatedEvent"
    units="ms" expires_after="2024-04-16">
  <owner>pkasting@chromium.org</owner>
  <owner>tluk@chromium.org</owner>
  <owner>skau@chromium.org</owner>
  <summary>
    Records the time spent synchronously processing the the
    NotifyOnNativeThemeUpdated() event in a {Process} process. The timer starts
    as soon as the event handler is entered and emitted when code returns from
    the event handler.
  </summary>
  <token key="Process">
    <variant name="Browser"/>
    <variant name="NonBrowser"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
