<!--
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 histograms owned
by the Commercial Identity team 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="AccountManager.AccountAdditionSource"
    enum="AccountManagerAccountAdditionSource" expires_after="2027-06-25">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2025-12-28 to 2026-06-30; data may
    be missing.

    Records the source of in-session account addition (or re-authentication)
    triggers on Chrome OS. This is recorded whenever an in-session account
    addition (or re-authentication) is triggered - either explicitely by the
    user, or automatically by Gaia (for accounts requiring immediate
    re-authentication).
  </summary>
</histogram>

<histogram name="AccountManager.AccountUpsertionResultStatus"
    enum="AccountManagerAccountUpsertionResultStatus"
    expires_after="2027-06-25">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <owner>diwux@google.com</owner>
  <summary>
    Records the result of in-session account upsertion (addition or
    re-authentication) triggers on Chrome OS. This is recorded whenever an
    in-session account addition or re-authentication is triggered and the user
    finishes or cancels the flow.
  </summary>
</histogram>

<histogram name="AccountManager.EduCoexistence.FetchAccessTokenResult"
    enum="GoogleServiceAuthError" expires_after="2027-06-25">
  <owner>longbowei@google.com</owner>
  <owner>zhangwenyu@google.com</owner>
  <owner>cros-families-eng@google.com</owner>
  <summary>
    The result of fetching an access token for the child with `accounts.reauth`
    scope in secondary EDU account addition flow. Recorded after parent enters
    their password. This metric covers both v1 and v2 of EduCoexistence.
  </summary>
</histogram>

<histogram name="AccountManager.EduCoexistenceV2.InSessionFlowResult"
    enum="EduCoexistenceFlowV2Result" expires_after="2027-06-25">
  <owner>longbowei@google.com</owner>
  <owner>zhangwenyu@google.com</owner>
  <owner>cros-families-eng@google.com</owner>
  <summary>
    Records the last completed step in the EDU account addition flow. Allows to
    track the drop rate by important states during the in session flow.
  </summary>
</histogram>

<histogram name="AccountManager.EduCoexistenceV2.OnboardingFlowResult"
    enum="EduCoexistenceFlowV2Result" expires_after="2027-06-25">
  <owner>longbowei@google.com</owner>
  <owner>zhangwenyu@google.com</owner>
  <owner>cros-families-eng@google.com</owner>
  <summary>
    Records the last completed step in the EDU account addition flow. Allows to
    track the drop rate by important states during onboarding.
  </summary>
</histogram>

<histogram name="AccountManager.InitializationTime" units="microseconds"
    expires_after="2027-06-25">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-11-01 to 2026-06-30; data may
    be missing.

    Measures the time taken to fully initialize Chrome OS Account Manager. This
    is recorded once per user session, at login time. This metric only reports
    from Chrome OS, which has a high resolution clock.
  </summary>
</histogram>

<histogram name="AccountManager.ManageAccountsServiceType"
    enum="GaiaServiceType" expires_after="2027-06-25">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2024-11-01 to 2026-06-30; data may
    be missing.

    Tracks the service type received with the mirror response header.
  </summary>
</histogram>

<histogram name="AccountManager.MojoDisconnections.AccountManagerRemote"
    units="count" expires_after="2024-11-01">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <summary>
    Tracks the number of Mojo pipe disconnections observed by the Account
    Manager Mojo remote in `AccountManagerFacadeImpl`. This is logged at the end
    of the destruction of `AccountManagerFacadeImpl`. Since
    `AccountManagerFacadeImpl` is a singleton, this is logged once per session
    (Per browser session for Lacros and per user session for Ash). This is
    logged for Ash - ChromeOS and Lacros - ChromeOS.
  </summary>
</histogram>

<histogram name="AccountManager.NumAccounts" units="count"
    expires_after="2027-06-25">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <summary>
    Tracks the number of accounts stored in Chrome OS Account Manager by a given
    user. This is recorded only once per session, at login time.
  </summary>
</histogram>

<histogram name="AccountManager.TokenLoadStatus"
    enum="AccountManagerTokenLoadStatus" expires_after="2027-06-25">
  <owner>sinhak@chromium.org</owner>
  <owner>emaamari@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2025-01-05 to 2026-06-30; data may
    be missing.

    Tracks the status of token loads from disk by Chrome OS Account Manager, for
    a given user. This is recorded only once per session, at login time.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
