<!--
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 StartSurface 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>

<histogram name="StartSurface.ColdStartup.IsLastActiveTabNtp" enum="Boolean"
    expires_after="2024-03-17">
  <owner>hanxi@chromium.org</owner>
  <owner>xinyiji@chromium.org</owner>
  <summary>
    Records whether the last active tab is a NewTabPage during tab restore in
    cold startup when Start surface is showing. The histogram is logged in
    deferred startup tasks.
  </summary>
</histogram>

<histogram name="StartSurface.Module.Click" enum="ModuleTypeOnStartAndNTP"
    expires_after="2024-03-17">
  <owner>hanxi@chromium.org</owner>
  <owner>xinyiji@chromium.org</owner>
  <summary>
    Record the total count of clicks on different modules of the Start surface
    page. For most visited tiles: is recorded when 1) user clicks on most
    visited tiles; 2) long press on most visited tiles to open in a new tab or a
    new incognito tab or to download the link. This is consistent with
    MobileNTPMostVisited. For feeds: is recorded when 1) user clicks on feeds;
    2) long press on feeds to open in a new tab or open in a new incognito tab
    or check about this source and topic; 3) click the learn more button on the
    top of the feeds section. For omnibox: is recorded every time when user uses
    Omnibox or voice search on Omnibox to navigate. This is consistent with
    MobileOmniboxUse. For single tab card: is recorded every time when user
    clicks on the single tab card. For tab switcher button: is recorded every
    time when user clicks on the tab switcher button. For profile button: is
    recorded when user clicks on the profile button. For menu button: is
    recorded when user clicks on the menu button. The histogram is logged on
    Start surface and is Android-only.
  </summary>
</histogram>

<histogram name="StartSurface.Show.State" enum="StartSurfaceState"
    expires_after="2024-03-17">
  <owner>hanxi@chromium.org</owner>
  <owner>xinyiji@chromium.org</owner>
  <summary>
    Records the StartSurfaceState when Start surface or Grid tab switcher is
    showing due to ChromeTabbedActivity#showOverview() is called. It includes
    showing at cold or warm startup, or when users bringing Chrome from
    background to foreground, or via back operations from a Tab etc. The
    histogram doesn't include the cases of showing overview page due to the
    transition between Start surface and Tab switcher.
  </summary>
</histogram>

<histogram name="StartSurface.SpareTab.TimeBetweenShowAndCreate" units="ms"
    expires_after="2024-03-17">
  <owner>sreejakshetty@chromium.org</owner>
  <owner>hanxi@chromium.org</owner>
  <summary>
    Records the time between showing the start surface and starting the spare
    tab creation. It does not include the time spent creating the spare tab.
    Every time a spare tab is created for the start surface, this is recorded.
  </summary>
</histogram>

<histogram name="StartSurface.TimeSpent" units="ms" expires_after="2024-03-17">
  <owner>hanxi@chromium.org</owner>
  <owner>xinyiji@chromium.org</owner>
  <summary>
    The time spent on the start surface as measured from when it was loaded or
    last brought to the foreground until it was navigated away from or hidden.
    Only measured on Android.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
