<!--
Copyright 2026 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 Critical User Journeys 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="CriticalUserJourneyStepAction">
  <variant name="StepAborted" summary="aborted"/>
  <variant name="StepReached" summary="reached"/>
</variants>

<variants name="JourneyNames">
  <variant name="ClearBrowsingHistoryJourney"/>
  <variant name="PinExtensionJourney"/>
  <variant name="ViewDownloadedFileFromAppMenuJourney"/>
  <variant name="ViewDownloadedFileJourney"/>
<!-- Add new journeys here! -->

</variants>

<histogram name="CriticalUserJourney.ClearBrowsingHistoryJourney.{StepAction}"
    enum="ClearBrowsingHistoryJourneySteps" expires_after="2027-01-01">
  <owner>stluong@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Recorded when a step is {StepAction} in the ClearBrowsingHistoryJourney.
  </summary>
  <token key="StepAction" variants="CriticalUserJourneyStepAction"/>
</histogram>

<histogram name="CriticalUserJourney.PinExtensionJourney.{StepAction}"
    enum="PinExtensionJourneySteps" expires_after="2027-01-01">
  <owner>stluong@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Recorded when a step is {StepAction} in the PinExtensionJourney.
  </summary>
  <token key="StepAction" variants="CriticalUserJourneyStepAction"/>
</histogram>

<histogram
    name="CriticalUserJourney.ViewDownloadedFileFromAppMenuJourney.{StepAction}"
    enum="ViewDownloadedFileFromAppMenuJourneySteps" expires_after="2027-01-01">
  <owner>dljames@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Recorded when a step is {StepAction} in the
    ViewDownloadedFileFromAppMenuJourney.
  </summary>
  <token key="StepAction" variants="CriticalUserJourneyStepAction"/>
</histogram>

<histogram name="CriticalUserJourney.ViewDownloadedFileJourney.{StepAction}"
    enum="ViewDownloadedFileJourneySteps" expires_after="2027-01-01">
  <owner>dljames@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Recorded when a step is {StepAction} in the ViewDownloadedFileJourney.
  </summary>
  <token key="StepAction" variants="CriticalUserJourneyStepAction"/>
</histogram>

<histogram name="CriticalUserJourney.{JourneyName}.HaTSSurveyEvent"
    enum="CriticalUserJourneyHaTSEvent" expires_after="2027-01-01">
  <owner>dljames@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Tracks the lifecycle of the HaTS survey triggered by the {JourneyName}
    critical user journey.

    Triggered: The request to show the survey was sent to the HaTS service (this
    happens immediately upon journey completion). Shown: The survey was
    successfully displayed to the user (confirmed via success callback). Failed:
    The survey request failed or was rejected by the HaTS service (e.g. due to
    rate limiting or cooldown).
  </summary>
  <token key="JourneyName" variants="JourneyNames"/>
</histogram>

<histogram name="CriticalUserJourney.{JourneyName}.OverallDuration" units="ms"
    expires_after="2027-01-01">
  <owner>dljames@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Records the total time taken to complete the {JourneyName} critical user
    journey.
  </summary>
  <token key="JourneyName" variants="JourneyNames"/>
</histogram>

<histogram name="CriticalUserJourney.{JourneyName}.Result"
    enum="CriticalUserJourneyResult" expires_after="2027-01-01">
  <owner>dljames@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Records the final outcome (Completed, Aborted, or Timed out) of the
    {JourneyName} critical user journey.
  </summary>
  <token key="JourneyName" variants="JourneyNames"/>
</histogram>

<histogram
    name="CriticalUserJourney.{JourneyName}.Step{FromStep}ToStep{ToStep}Duration"
    units="ms" expires_after="2027-01-01">
  <owner>dljames@chromium.org</owner>
  <owner>top-chrome-desktop-ui@google.com</owner>
  <summary>
    Records the time taken by the user to transition from step {FromStep} to
    step {ToStep} in the {JourneyName} journey.
  </summary>
  <token key="JourneyName" variants="JourneyNames"/>
  <token key="FromStep">
    <variant name="1"/>
    <variant name="2"/>
    <variant name="3"/>
    <variant name="4"/>
  </token>
  <token key="ToStep">
    <variant name="2"/>
    <variant name="3"/>
    <variant name="4"/>
    <variant name="5"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
