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

<!-- LINT.IfChange(AccessTokenFetchFailureError) -->

<variants name="AccessTokenFetchFailureError">
  <variant name="AccountNotFound" summary="account not found"/>
  <variant name="ChallengeResponseRequired"
      summary="challenge response required"/>
  <variant name="ConnectionFailed" summary="connection failed"/>
  <variant name="DeviceManagementError" summary="device management error"/>
  <variant name="InvalidGaiaCredentials" summary="invalid gaia credentials"/>
  <variant name="RequestCanceled" summary="request canceled"/>
  <variant name="ScopeLimitedUnrecoverableError"
      summary="scope limited unrecoverable error"/>
  <variant name="ServiceError" summary="service error"/>
  <variant name="ServiceUnavailable" summary="service unavailable"/>
  <variant name="UnexpectedServiceResponse"
      summary="unexpected service response"/>
</variants>

<!-- LINT.ThenChange(//components/signin/public/identity_manager/access_token_fetcher.cc:ErrorToString) -->

<variants name="AccountIndex">
  <variant name="Account0" summary="Metric recorded for Account 0"/>
  <variant name="Account1" summary="Metric recorded for Account 1"/>
  <variant name="Account2" summary="Metric recorded for Account 2"/>
  <variant name="Account3" summary="Metric recorded for Account 3"/>
  <variant name="Account4" summary="Metric recorded for Account 4"/>
</variants>

<variants name="AccountInvestigationReportingType">
  <variant name="_OnChange"
      summary="Driven from a change in signin status or change in content
               area GAIA accounts."/>
  <variant name="_Periodic" summary="Emitted once per 24 hours."/>
</variants>

<!--LINT.IfChange(BoundSessionOrigin) -->

<variants name="BoundSessionOrigin">
  <variant name="" summary="Recorded for all sessions, no matter the origin."/>
  <variant name=".FromOAuthMultiLogin"
      summary="Recorded only for sessions originated from the OAuthMultilogin
               flow."/>
  <variant name=".FromRegistration"
      summary="Recorded only for sessions originated from the DBSC
               registration flow."/>
</variants>

<!-- LINT.ThenChange(//chrome/browser/signin/bound_session_credentials/bound_session_params_util.cc:GetSessionOriginHistogramSuffix) -->

<!-- LINT.IfChange(BoundSessionRefreshCookieFetcherTrigger) -->

<variants name="BoundSessionRefreshCookieFetcherTrigger">
  <variant name=""
      summary="Recorded every time a cookie rotation request is performed."/>
  <variant name=".BlockedRequest"
      summary="Recorded only for cookie rotation requests triggered because a
               request to the bound site was missing a bound cookie and thus
               was blocked."/>
  <variant name=".ConnectionChanged"
      summary="Recorded only for cookie rotation requests triggered by a
               connection change."/>
  <variant name=".CookieExpired"
      summary="Recorded only for cookie rotation requests triggered by a
               bound cookie update that expired the cookie."/>
  <variant name=".NewSession"
      summary="Recorded only for cookie rotation requests triggered by a new
               session creation."/>
  <variant name=".Other"
      summary="Recorded only for cookie rotation requests that don't fall
               into any of other categories."/>
  <variant name=".PreemptiveRefresh"
      summary="Recorded only for preemptive cookie rotation requests."/>
  <variant name=".RetryWithBackoff"
      summary="Recorded only for cookie rotation requests triggered by a
               retry with backoff during a server outage."/>
  <variant name=".Startup"
      summary="Recorded only for cookie rotation requests triggered on Chrome
               startup."/>
</variants>

<!-- LINT.ThenChange(//chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc:GetRotationHistogramTriggerSuffix) -->

<!-- LINT.IfChange(CrossDeviceSigninPromoEntryPointVariant) -->

<variants name="CrossDeviceSigninPromoEntryPoint">
  <variant name="HistoryPage" summary="History Page entry point"/>
  <variant name="ProfileMenu" summary="Profile Menu entry point"/>
</variants>

<!-- LINT.ThenChange(//chrome/browser/signin/cross_device_signin_promo_manager.cc:CrossDeviceSigninPromoEntryPointVariant) -->

<!-- LINT.IfChange(ExternalEntryPoint) -->

<variants name="ExternalEntryPoint">
  <variant name="" summary="Aggregated view across all external entry points"/>
  <variant name=".DesktopDefault"
      summary="Desktop default entry point (1), supported in V1"/>
  <variant name=".Unknown"
      summary="Fallback UI, shown because an unknown external entry point
               value was provided"/>
</variants>

<!-- LINT.ThenChange(//components/signin/public/base/signin_deep_link_payload.h:ExternalEntryPoint) -->

<!-- LINT.IfChange(PartitionSuffix) -->

<variants name="PartitionSuffix">
  <variant name="" summary="Overall result across all partitions."/>
  <variant name=".ContextualTasks"
      summary="For the ContextualTasks partition."/>
  <variant name=".Default" summary="For the default partition."/>
  <variant name=".Glic" summary="For the Glic partition."/>
</variants>

<!-- LINT.ThenChange(//components/signin/public/identity_manager/accounts_cookie_mutator.h:PartitionSuffix) -->

<!-- LINT.IfChange(ReauthFlowEvent) -->

<variants name="ReauthFlowEvent">
  <variant name="Cancelled" summary="cancelled by the user"/>
  <variant name="Completed" summary="completed"/>
  <variant name="Error" summary="finished with an error"/>
  <variant name="Interrupted" summary="interrupted"/>
  <variant name="Started" summary="started"/>
</variants>

<!-- LINT.ThenChange(//components/signin/public/base/signin_metrics.h:ReauthFlowEvent) -->

<variants name="SigninAccountStatus">
  <variant name=".NewAccountExistingAccount"
      summary="Using a new account, in the sign-in promo, while Chrome knows
               about other accounts."/>
  <variant name=".NewAccountNoExistingAccount"
      summary="Using a new account, in the sign-in promo, while Chrome does
               not know about other accounts."/>
  <variant name=".NewAccountPreDice"
      summary="Using a new account on Desktop, pre-Dice."/>
  <variant name=".NotDefault"
      summary="Using not the default account, in the sign-in promo."/>
  <variant name=".WithDefault"
      summary="Using the default account, in the sign-in promo."/>
</variants>

<!-- LINT.IfChange(SigninPromoAccessPoint) -->

<variants name="SigninPromoAccessPoint">
  <variant name="AutofillAndPasswords" summary="autofill and passwords page"/>
  <variant name="Bookmarks" summary="bookmark page"/>
  <variant name="HistoryPage" summary="history page"/>
  <variant name="Ntp" summary="new tab page"/>
  <variant name="RecentTabs" summary="recent tabs page"/>
  <variant name="Settings" summary="settings page"/>
</variants>

<!-- LINT.ThenChange(/chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninPreferencesManager.java:SigninPromoAccessPointId) -->

<!-- LINT.IfChange(SigninPromoAction) -->

<variants name="SigninPromoAction">
  <variant name="Continued"
      summary="the user presses on any button (except the dismiss cross) on"/>
  <variant name="Dismissed"
      summary="the user dismisses via dismiss [x] button"/>
  <variant name="Shown" summary="Chrome shows"/>
  <variant name="SigninUndone"
      summary="the user reverses signin via signed-in snackbar button"/>
</variants>

<!-- LINT.ThenChange(/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/signin_promo/SigninPromoMediator.java:Event) -->

<!-- TODO(crbug.com/432174785): Mark this histogram as never_expires. -->

<histogram name="Signin.AccessTokenFetch.Failure.{Error}"
    enum="OAuthConsumerId" expires_after="2027-02-07">
  <owner>triploblastic@google.com</owner>
  <owner>bsazonov@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the failure events with {Error} when fetching access tokens. The
    events are bucketed by OAuthConsumerId. Recorded on every access token fetch
    request failure.
  </summary>
  <token key="Error" variants="AccessTokenFetchFailureError"/>
</histogram>

<!-- TODO(crbug.com/432174785): Mark this histogram as never_expires. -->

<histogram name="Signin.AccessTokenFetch.Success" enum="OAuthConsumerId"
    expires_after="2027-01-03">
  <owner>triploblastic@google.com</owner>
  <owner>bsazonov@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the success events when fetching access tokens. The events are
    bucketed by OAuthConsumerId. Recorded on every access token fetch request
    success.
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.CanSignInToChrome.FetchDuration"
    units="ms" expires_after="2027-05-01">
  <owner>ddac@chromium.org</owner>
  <owner>ljjlee@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the duration of fetching the can_sign_in_to_chrome capability for
    age mismatch checks. Recorded when the fetch completes (either succeeds or
    times out).
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.CanSignInToChrome.FetchResult"
    enum="CanSignInToChromeCapabilityResult" expires_after="2027-05-01">
  <owner>ddac@chromium.org</owner>
  <owner>ljjlee@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of the capability fetch in AgeMismatchCapabilitiesFetcher
    (False, True, or Timeout). Recorded once on the completion of each fetch
    attempt.
  </summary>
</histogram>

<histogram
    name="Signin.AccountCapabilities.ExternalPrivacyContextBuildDuration"
    units="ms" expires_after="2026-12-27">
  <owner>ddac@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the duration it takes to build the External Privacy Context for an
    identity. Recorded when the asynchronous EPC build operation finishes. (iOS
    only).
  </summary>
</histogram>

<histogram
    name="Signin.AccountCapabilities.ExternalPrivacyContextBuildErrorCode"
    units="ErrorCode" expires_after="2027-01-03">
  <owner>ddac@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the error code when the External Privacy Context build fails.
    Recorded when the asynchronous EPC build operation finishes with an error.
    (iOS only).
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.ExternalPrivacyContextBuildSuccess"
    enum="BooleanSuccess" expires_after="2026-12-27">
  <owner>ddac@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the External Privacy Context build was successful or not.
    Recorded when the asynchronous EPC build operation finishes. (iOS only).
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.FetchLatency" units="ms"
    expires_after="2027-02-07">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Measures time that the users will most likely spend actively waiting for the
    Account Capabilities to load, when they were not available. Contrary to
    Signin.AccountCapabilities.UserVisibleLatency, this metric is more closely
    tracking the actual latency of the fetch of AccountCapabilities, by the
    means of impact on the user interface that had to present a loading spinner
    of similar view.

    Recorded when an extended account info is updated and the account info has
    Capabilities during displaying of the sync consent screen.

    Pre-stable M132 and M133 Desktop binaries have missing data.
  </summary>
</histogram>

<histogram
    name="Signin.AccountCapabilities.GetFromSystemLibraryDuration{Caller}"
    units="ms" expires_after="2027-01-31">
  <owner>fernandex@google.com</owner>
  <owner>msarda@chromium.org</owner>
  <owner>triploblastic@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records the time it takes to fetch account capabilities from
    the system library {Caller}.
  </summary>
  <token key="Caller">
    <variant name="" summary="on every call (Android and iOS only)"/>
    <variant name=".SigninUpgradePromo"
        summary="when attempting to show the full screen sync promo (iOS
                 only)"/>
  </token>
</histogram>

<histogram name="Signin.AccountCapabilities.GetFromSystemLibraryResult"
    enum="AccountCapabilitiesGetFromSystemLibraryResult"
    expires_after="2027-01-17">
  <owner>fernandex@google.com</owner>
  <owner>msarda@chromium.org</owner>
  <owner>triploblastic@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records the outcome of the account capabilities fetch
    operation. This is recorded only on Android and iOS where Chrome fetches the
    account capabilities from the system library.
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.ImmediatelyAvailable"
    enum="BooleanAvailable" expires_after="2027-02-07">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Indicates whether the Account Capabilities were immediately available when
    requested. Together with Signin.AccountCapabilities.UserVisibleLatency, they
    are tracking the time and the type of fetch (synchronous or asynchronous)
    from the user's perspective.

    Recorded when the following conditions hold: a sync consent screen is
    displayed, the user is signed in and not syncing, and the primary account
    info has Capabilities.

    Pre-stable M132 and M133 Desktop binaries have missing data.
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.UserVisibleLatency" units="ms"
    expires_after="2027-02-07">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Measures time that the users will most likely spend actively waiting for the
    Account Capabilities to load. This metric is not tracking the actual latency
    of the fetch of AccountCapabilities, but only the time when those
    capabilities are required but not available yet.

    Example use case of this metric is to track time needed to wait for the
    Account Capabilities before presenting the Signin consent screen.

    See Signin.AccountCapabilities.ImmediatelyAvailable to analyse what portion
    of data in this metric was recorded as immediately available (0ms). See
    Signin.AccountCapabilities.FetchLatency to analyse time spent by users that
    for whom the UI was blocked until the Capabilities were ready.

    Recorded in two situations. 1. When an extended account info is updated and
    the account info has Capabilities while the sync consent screen is
    displayed. 2. When the following conditions hold: a sync consent screen is
    displayed, the user is signed in and not syncing, and the primary account
    info has Capabilities.

    Pre-stable M132 and M133 Desktop binaries have missing data.
  </summary>
</histogram>

<histogram name="Signin.AccountCapabilities.{Priority}.FetchDuration.{Result}"
    units="ms" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records the fetch duration every time Chrome {Result} account
    capabilities from network. This is recorded for {Priority}. This is recorded
    only on Desktop platforms where Chrome implements its own account
    capabilities fetcher.
  </summary>
  <token key="Priority">
    <variant name="Background"
        summary="background fetches that are treated as best-effort, and do
                 not have user-visible impact"/>
    <variant name="Foreground"
        summary="foreground fetches that are treated with high priority, and
                 may have user-visible impact"/>
  </token>
  <token key="Result">
    <variant name="Failure" summary="fails to fetch"/>
    <variant name="Success" summary="successfully fetches"/>
  </token>
</histogram>

<histogram name="Signin.AccountCapabilities.{Priority}.FetchResult"
    enum="AccountCapabilitiesFetchResult" expires_after="2027-01-31">
  <owner>alexilin@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records the outcome of the account capabilities fetch
    operation, for {Priority}. This is recorded only on Desktop platforms where
    Chrome implements its own account capabilities fetcher.
  </summary>
  <token key="Priority">
    <variant name="Background"
        summary="background fetches that are treated as best-effort and do
                 not have user-visible impact"/>
    <variant name="Foreground"
        summary="foreground fetches that are treated with high priority and
                 may have user-visible impact"/>
  </token>
</histogram>

<histogram name="Signin.AccountConsistencyPromoAction"
    enum="AccountConsistencyPromoAction" expires_after="2027-01-31">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records the action taken by user after receiving the header
    from Gaia in the web sign-in flow. Currently only recorded on mobile.
  </summary>
</histogram>

<histogram name="Signin.AccountConsistencyPromoAction.{PromoEvent}"
    enum="SigninAccessPoint" expires_after="2027-01-31">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the action taken by user after receiving the header from Gaia in the
    web sign-in flow. This histogram is another version of
    |Signin.AccountConsistencyPromoAction|, where the original one logs the
    promo events directly, and this histogram creates a variant for every promo
    event, and logs its access points instead.
  </summary>
  <token key="PromoEvent">
    <variant name="AddAccountCompleted"
        summary="User has completed the account addition flow triggered from
                 the bottom sheet."/>
    <variant name="AddAccountCompletedWithNoDeviceAccount"
        summary="User has added an account from a state without any on-device
                 account."/>
    <variant name="AddAccountStarted"
        summary="User has tapped |Add account to device| from expanded
                 account list."/>
    <variant name="AddAccountStartedWithNoDeviceAccount"
        summary="User has tapped |Sign In…| from the no-default-account
                 promo, starting an add-account flow."/>
    <variant name="AuthErrorShown"
        summary="The auth error screen was shown to the user."/>
    <variant name="ConfirmManagementAccepted"
        summary="User accepted management on signin."/>
    <variant name="ConfirmManagementShown"
        summary="User was shown the confirm management screen on signin."/>
    <variant name="DismissedBack"
        summary="User has dismissed the promo by tapping back button."/>
    <variant name="DismissedButton"
        summary="User has dismissed the promo by tapping on the dismissal
                 button in the bottom sheet."/>
    <variant name="DismissedOther"
        summary="User has dismissed the promo by other means."/>
    <variant name="DismissedScrim"
        summary="User has dismissed the promo by tapping on the scrim above
                 the bottom sheet."/>
    <variant name="DismissedSwipeDown"
        summary="User has dismissed the promo by swiping down the bottom
                 sheet."/>
    <variant name="GenericErrorShown"
        summary="The generic error screen was shown to the user."/>
    <variant name="Shown" summary="The promo was shown to user."/>
    <variant name="ShownWithNoDeviceAccount"
        summary="The promo was shown to a user without an existing on-device
                 account."/>
    <variant name="SignedInWithAddedAccount"
        summary="User has added an account and signed in with this account."/>
    <variant name="SignedInWithDefaultAccount"
        summary="User has selected the default account and signed in with it."/>
    <variant name="SignedInWithNoDeviceAccount"
        summary="User has signed in to Chrome, from a state without any
                 on-device account."/>
    <variant name="SignedInWithNonDefaultAccount"
        summary="User has selected one of the non default accounts and signed
                 in with it."/>
    <variant name="SignInFailed"
        summary="AuthenticationFlow on iOS is cancelled or failed to sign-in."/>
    <variant name="SigninStartedWithManagedAccount"
        summary="User started sign-in with a managed account in the
                 consistency promo."/>
    <variant name="SigninStartedWithNonManagedAccount"
        summary="User started sign-in with a non-managed account in the
                 consistency promo."/>
    <variant name="SuppressedAlreadySignedIn"
        summary="The web sign-in is not shown because the user is already
                 signed in."/>
    <variant name="SuppressedConsecutiveDismissals"
        summary="The bottom sheet was suppressed as the user hit consecutive
                 active dismissal limit."/>
    <variant name="SuppressedNoAccounts"
        summary="The promo was suppressed as there were no accounts on the
                 device."/>
    <variant name="SuppressedSigninNotAllowed"
        summary="Promo is not shown due to sign-in being disallowed either by
                 an enterprise policy or by |Allow Chrome sign-in| toggle."/>
    <variant name="TimeoutErrorShown"
        summary="The timeout error was shown to the user."/>
  </token>
</histogram>

<histogram name="Signin.AccountFetcher.AccountUserInfoFetchTime" units="ms"
    expires_after="2027-02-19">
  <owner>triploblastic@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The time it takes to fetch the account information (except avatar) for one
    account in AccountFetcherService. This is recorded when user info fetch
    succeeds.
  </summary>
</histogram>

<histogram name="Signin.AccountInPref.AssignedId" units="id"
    expires_after="2027-05-26">
  <owner>pmeuleman@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the stable integer ID assigned to a Google account when it is first
    allocated for UMA metrics tracking. This assigns stable IDs from 0 to 99,
    and value 100 represents the cap/overflow bucket.
  </summary>
</histogram>

<histogram name="Signin.AccountInPref.MatchingFetchedAccount" enum="Boolean"
    expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records whether the fetched account and the stored account in
    preferences have matching account Ids. Recorded whenever a fetched account
    is retreived from the server.
  </summary>
</histogram>

<histogram name="Signin.AccountInPref.StartupState.{AccountType}"
    enum="AccountStartupState" expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records whether the {AccountType} account is known in the
    preferences along with the validity of the refresh token. The value is
    recorded on profile load when loading the account information.
  </summary>
  <token key="AccountType">
    <variant name="Primary" summary="primary"/>
    <variant name="Secondary" summary="account"/>
  </token>
</histogram>

<histogram name="Signin.AccountInPref.State" enum="AccountInPrefState"
    expires_after="2027-01-24">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records the state of the account that is stored in the
    preferences; whether it is fully or partially known. Recorded whenever a
    fetched account is retrieved succesfully from the server.
  </summary>
</histogram>

<histogram name="Signin.AccountManagementType"
    enum="AccountManagedStatusFinderOutcome" expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records, for each account in the IdentityManager at profile startup, the
    &quot;type&quot; of account, i.e. whether it's a consumer or enterprise/EDU
    account. If the check doesn't finish before shutdown, nothing may be
    recorded. See also &quot;Signin.AccountManagementTypesSummary&quot; for a
    combined view of all existing accounts.
  </summary>
</histogram>

<histogram name="Signin.AccountManagementTypesSummary"
    enum="AccountManagementTypesSummary" expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the numbers of consumer and enterprise/EDU accounts in the
    IdentityManager at profile startup. Accounts for which the type check failed
    or timed out are not counted. If the check for any account doesn't finish
    before shutdown, nothing may be recorded. See also
    &quot;Signin.AccountManagementType&quot; for the more detailed type of each
    individual account.
  </summary>
</histogram>

<histogram name="Signin.AccountPref.RemovedCount{SigninState}" units="accounts"
    expires_after="2027-02-07">
  <owner>droger@chromium.org</owner>
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of accounts removed from account-keyed signin
    preferences. Recorded when accounts are removed from preferences (e.g.
    clearing cookies or removing signed out accounts from the web), and the user
    is {SigninState} Chrome at the browser level.
  </summary>
  <token key="SigninState">
    <variant name="" summary="signed in or signed out of"/>
    <variant name=".SignedIn" summary="signed in to"/>
    <variant name=".SignedOut" summary="signed out of"/>
  </token>
</histogram>

<histogram
    name="Signin.AccountPreview.NonPeriodicFetchesUntilNextPeriodicRefresh"
    units="count" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of non-periodic full fetch triggers that resulted in at
    least one fetch request, logged and reset once every 24 hours (when a
    periodic refresh is triggered).
  </summary>
</histogram>

<histogram name="Signin.AccountPreview.PercentAccountsToFetch" units="%"
    expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the percentage of signed-in accounts that required a network fetch
    relative to the total number of signed-in accounts during a fetch trigger.
    Recorded for triggers where at least one account required fetching.
  </summary>
</histogram>

<histogram name="Signin.AccountPreview.SingleRequestRateLimited"
    enum="BooleanRateLimited" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records when a single account preview preference request (e.g. from UI) is
    denied because the service is currently rate-limited due to a previous HTTP
    429 error.
  </summary>
</histogram>

<histogram
    name="Signin.AccountPreview.TriggerCauseAccountsUnchangedSinceLastFetch"
    enum="AccountPreviewFetchTriggerCause" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This records causes that did not result in any actual network fetches
    because the accounts were the ones already used for the last preference
    computation.
  </summary>
</histogram>

<histogram name="Signin.AccountPreview.TriggerCauseRateLimited"
    enum="AccountPreviewFetchTriggerCause" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the trigger cause of a fetch cycle that was denied and not performed
    because the service is currently rate-limited due to a previous HTTP 429
    error.
  </summary>
</histogram>

<histogram name="Signin.AccountPreview.TriggerCauseWithAllCachesAvailable"
    enum="AccountPreviewFetchTriggerCause" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the initial trigger cause of a fetch cycle that did not result in
    any actual network fetches because the data for all accounts was already
    fully cached.
  </summary>
</histogram>

<histogram name="Signin.AccountPreview.{State}FetchTriggerCause"
    enum="AccountPreviewFetchTriggerCause" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the trigger cause for a sync preview data fetch cycles. Recorded for
    {State} fetches.
  </summary>
  <token key="State">
    <variant name="All" summary="all initiated"/>
    <variant name="Successful"
        summary="successful (that lead to a network call)"/>
  </token>
</histogram>

<histogram name="Signin.AccountPreviewData.FetchDuration.{Result}" units="ms"
    expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Measures the duration of fetching sync preview data (including token
    fetching and network requests) for a signed-in account, split by {Result}
    fetches. Recorded when the fetch finishes.
  </summary>
  <token key="Result">
    <variant name="Failure" summary="failed (network requests failed)"/>
    <variant name="Success" summary="successful (at least some data returned)"/>
    <variant name="TokenFailure" summary="failed during access token fetch"/>
  </token>
</histogram>

<histogram name="Signin.AccountPreviewData.FetchHit429" enum="BooleanHit"
    expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether a sync preview data fetch attempt for a signed-in account
    encountered an HTTP 429 (Too Many Requests) response from either endpoint
    (statistics or entities previews). Recorded whenever a network fetch
    completes.
  </summary>
</histogram>

<histogram name="Signin.AccountPreviewData.FetchState"
    enum="AccountPreviewDataFetchState" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the progress and outcome of fetching sync preview data (statistics
    and entities previews) for a signed-in account. Recorded at various steps:
    when the fetch is requested, when statistics or entities previews complete,
    and when the overall fetch finishes.
  </summary>
</histogram>

<histogram name="Signin.AccountProfileStartupState2"
    enum="AccountProfileStartupState" expires_after="2027-02-07">
  <owner>jood@google.com</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the account profile mapping state on startup for the primary account
    in each profile. iOS only.
  </summary>
</histogram>

<histogram name="Signin.AccountReconcilorState.OnGaiaResponse"
    enum="SigninAccountReconcilorState" expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the state of the account reconcilor when GAIA returns a specific
    response. The data in the &quot;Inactive&quot; bucket might be incorrect
    prior to M111.
  </summary>
</histogram>

<histogram name="Signin.AccountTracker.CountOfLoadedAccounts" units="Accounts"
    expires_after="never">
<!-- expires-never: used to monitor how many accounts are loaded from profile
prefs when the profile is loaded.  -->

  <owner>msarda@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <summary>
    Number of accounts loaded from preferences by the AccountTracker. Invalid
    accounts are not counted.

    This is recorded on each profile load.
  </summary>
</histogram>

<histogram name="Signin.AccountTracker.GaiaIdMigrationState"
    enum="OAuth2LoginAccountRevokedMigrationState" expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>sdefresne@chromium.org</owner>
  <summary>
    This histogram records the AccountTracker account ID migration status from
    email to GAIA ID after the data is loaded from disk. It is more general than
    OAuth2Login.AccountRevoked.MigrationState that only record the event in case
    of errors and only on Android.

    This histogram will be used to check whether the migration has completed for
    all active installs on a given platform or not (and whether the code can be
    removed).

    This is recorded on each profile load.
  </summary>
</histogram>

<histogram
    name="Signin.AccountTracker.RefreshAccountInfo.IsAlreadyTrackingAccount"
    enum="Boolean" expires_after="2027-01-03">
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Indicates whether the account was seeded when the account info needs to be
    refreshed.

    This histogram will be used to decide whether the account needs to be seeded
    during while refreshing the account info.
  </summary>
</histogram>

<histogram name="Signin.AccountTracker.SeedAccountInfo.IsAccountIdEmpty"
    enum="BooleanEmpty" expires_after="2024-12-08">
  <owner>msarda@chromium.org</owner>
  <owner>sinhak@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Indicates if the account being seeded by AccountTracker has an empty account
    id. This is in general an error as the account with an empty id cannot be
    tracked.

    This histogram will be used to decide the severity of AccountTracker
    receiving malformed account ids during the seeding process.
  </summary>
</histogram>

<histogram name="Signin.AccountType.SigninConsent" enum="SigninAccountType"
    expires_after="2027-02-14">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@chromium.org</owner>
  <summary>
    Records the sign-in by regular Gmail account or managed account. Recorded
    when the user signs in (iOS only).
  </summary>
</histogram>

<histogram name="Signin.AddAccountState" enum="SigninAndroidAddAccountState"
    expires_after="2027-01-03">
  <owner>triploblastic@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records states in the add account process launched from
    Chrome on Android.
  </summary>
</histogram>

<histogram name="Signin.AddAccountToDevice.HostedDomainFetchDuration.{Status}"
    units="ms" expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    This histogram records the time to load the hosted domain.

    Recorded right after an account was added by the user action when {Status}.

    Only logged on iOS.
  </summary>
  <token key="Status">
    <variant name="Failed" summary="add account failed"/>
    <variant name="Success" summary="add account succeeded"/>
  </token>
</histogram>

<histogram
    name="Signin.AddAccountToDevice.IsSubjectToEnterprisePoliciesFetchDuration.{Status}"
    units="ms" expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    This histogram records the time to load IsSubjectToEnterprisePolicies
    account capability.

    Recorded right after an account was added by the user action when {Status}.

    Only logged on iOS.
  </summary>
  <token key="Status">
    <variant name="Failed" summary="add account failed"/>
    <variant name="Success" summary="add account succeeded"/>
  </token>
</histogram>

<histogram name="Signin.AddAccountToDevice.Result"
    enum="SigninAddAccountToDeviceResult" expires_after="2027-02-07">
  <owner>jlebel@google.com</owner>
  <owner>msarda@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the result of adding an account to the device. It is logged as soon as
    the add account to device operation finishes.

    The flow to add account to device is explicitly triggered in Chrome by the
    user in the following cases: a) a signed out user attempts to sign in to
    Chrome; b) a Chrome signed in user adds a secondary account.

    Note: This histogram is only logged for account that are added to the device
    from Chrome. If the users adds the account from another app, then this
    histogram is not logged.

    Only logged on iOS.
  </summary>
</histogram>

<histogram name="Signin.AddAccountToDevice.{Result}.Duration" units="ms"
    expires_after="2027-02-07">
  <owner>jlebel@google.com</owner>
  <owner>msarda@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the duration of the operation of adding an account to the device when
    the operation {Result}. It is logged as soon as the add account to device
    operation finishes.

    The flow to add account to device is explicitly triggered in Chrome by the
    user in the following cases: a) a signed out user attempts to sign in to
    Chrome; b) a Chrome signed in user adds a secondary account.

    Note: This histogram is only logged for account that are added to the device
    from Chrome. If the users adds the account from another app, then this
    histogram is not logged.

    Only logged on iOS.
  </summary>
  <token key="Result">
    <variant name="CancelledByUser" summary="is cancelled by the user"/>
    <variant name="Error" summary="fails with an error"/>
    <variant name="Interrupted" summary="is interrupted"/>
    <variant name="Success" summary="is successful"/>
  </token>
</histogram>

<histogram name="Signin.AgeMismatchSignout.Action"
    enum="AgeMismatchSignoutAction" expires_after="2027-05-01">
  <owner>ddac@chromium.org</owner>
  <owner>ljjlee@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the user choice in the Age Mismatch Sign-Out dialog (Use another
    account, Use without an account). Logged when the user taps one of the
    buttons.
  </summary>
</histogram>

<histogram name="Signin.AgeMismatchSignout.PromptMode"
    enum="AgeMismatchPromptMode" expires_after="2027-05-01">
  <owner>ddac@chromium.org</owner>
  <owner>ljjlee@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the mode of the Age Mismatch Sign-Out dialog. &quot;Standard&quot;
    mode is used when the check is triggered outside of a sign-in flow (e.g. on
    app foreground). &quot;Signin Flow&quot; mode is used when the check is part
    of a sign-in operation. Logged when the dialog is presented.
  </summary>
</histogram>

<histogram name="Signin.AgeMismatchSignout.StaySignedOutButtonState"
    enum="AgeMismatchStaySignedOutButtonState" expires_after="2027-05-01">
  <owner>ddac@chromium.org</owner>
  <owner>ljjlee@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the 'Stay signed out' button is shown or hidden in the Age
    Mismatch prompt because the user is already signed in to a primary account.
    Logged when the prompt is displayed.
  </summary>
</histogram>

<histogram name="Signin.AgeMismatchSignout.TimeToProperSignin" units="ms"
    expires_after="2027-05-01">
  <owner>ddac@chromium.org</owner>
  <owner>ljjlee@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the total time duration from the first age-mismatch sign-out until
    the user successfully signs in with the can_sign_in_to_chrome capability
    confirmed as true. The timestamp is stored in Local State (app-level), so
    the duration is measured across all profiles. The timestamp is not updated
    on subsequent consecutive age-mismatch sign-outs, representing the total
    continuous time spent without a valid/eligible account. Logged on iOS when
    the user successfully signs in with the can_sign_in_to_chrome capability
    true.
  </summary>
</histogram>

<histogram name="Signin.Android.AccountManagementAcceptedBeforeUserPolicyFetch"
    enum="Boolean" expires_after="2027-01-13">
  <owner>shadmehr@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Indicates whether the user had accepted account management when attempting
    to sign in to a managed account on Android, recorded before the policy
    registration request is dispatched.
  </summary>
</histogram>

<histogram name="Signin.Android.FRESigninEvents" enum="FRESigninEvents"
    expires_after="2027-02-07">
  <owner>mthiesse@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records an enum at various points throughout the FRE signin flow. Useful to
    track at what point users drop off.
  </summary>
</histogram>

<histogram name="Signin.AndroidAccountReauth.Event"
    enum="AccountReauthenticationEvent" expires_after="2026-07-01">
  <owner>twellington@chromium.org</owner>
  <owner>clhager@google.com</owner>
  <summary>
    Records an event when the user starts account reauthentication and the
    result of such reauthentication.
  </summary>
</histogram>

<histogram name="Signin.AndroidDeviceAccountsNumberWhenEnteringFRE"
    units="count" expires_after="2027-04-29">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Number of Android accounts on device when entering the First Run Experience
    sign-in screen.
  </summary>
</histogram>

<histogram name="Signin.AndroidGetAccountIdsTime" units="ms"
    expires_after="2027-01-24">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The time it takes to retrieve Gaia ids for all accounts from GoogleAuthUtil.
  </summary>
</histogram>

<histogram name="Signin.AndroidGetAccountsTime{AndroidGetAccountsTypes}"
    units="ms" expires_after="2027-02-14">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    The time it takes to retrieve the list of accounts from the system.
    {AndroidGetAccountsTypes}
  </summary>
  <token key="AndroidGetAccountsTypes">
    <variant name="" summary="Using any API"/>
    <variant name="_AccountManager" summary="Using Android AccountManager API"/>
    <variant name="_GoogleAuthClient" summary="Using GoogleAuthClient API"/>
    <variant name="_GoogleAuthUtil" summary="Using GoogleAuthUtil API"/>
  </token>
</histogram>

<histogram name="Signin.AndroidNumberOfDeviceAccounts" units="accounts"
    expires_after="2027-01-17">
  <owner>triploblastic@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The number of Android accounts present on the device. Recorded on startup.
  </summary>
</histogram>

<histogram name="Signin.APIKeyMatchesFeatureOnStartup" enum="Boolean"
    expires_after="2027-03-31">
  <owner>alexilin@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the API key matches the value passed via the experiment
    feature. Recorded once on startup.

    Note: This histogram is meaningful only when feature OverrideAPIKey is
    enabled. It should thus only be used from the Finch tab of the UMA
    dashboard.
  </summary>
</histogram>

<histogram name="Signin.AuthError" enum="GoogleServiceAuthError"
    expires_after="2027-01-17">
  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Log the type of GAIA authentication error that occur whenever the error
    state changes.
  </summary>
</histogram>

<histogram
    name="Signin.AvatarPillPromo.AcceptedAtShownCount.{AvatarPillPromoType}"
    units="ShowCount" expires_after="2027-02-07">
  <owner>anthie@google.com</owner>
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team-desktop@google.com</owner>
  <summary>
    Records the count of the {AvatarPillPromoType} was shown when the user has
    intereacted with it. Recorded when that interaction was made.
  </summary>
  <token key="AvatarPillPromoType">
<!-- LINT.IfChange(AvatarPillPromoType) -->

    <variant name="BatchUpload"
        summary="Batch Upload Promo on the Avatar Pill, that lead to
                 performing a Batch Upload,"/>
    <variant name="BatchUploadBookmarks"
        summary="Batch Upload (Bookmarks specific) Promo on the Avatar Pill,
                 that lead to performing a Batch Upload,"/>
    <variant name="BatchUploadWindows10Depreciation"
        summary="Batch Upload (Windows10 Depreciation specific) Promo on the
                 Avatar Pill, that lead to performing a Batch Upload,"/>
    <variant name="HistorySync"
        summary="History Sync promo on the Avatar Pill, that lead to turning
                 history sync on,"/>
    <variant name="Signin"
        summary="Signin Promo no the Avatar Pill, that lead to signing in,"/>
    <variant name="Sync"
        summary="Sync Promo on the Avatar Pill, that lead to turning Sync on,"/>
<!-- LINT.ThenChange(//chrome/browser/signin/signin_promo_util.cc:AvatarPillPromoType) -->

  </token>
</histogram>

<histogram name="Signin.AvatarPillPromo.DurationBeforeClick" units="ms"
    expires_after="2027-02-14">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the time between when a promo is shown on the avatar pill and the
    user interacts with it (clicks on it). If the user doesn't click the avatar
    pill, the histogram should not be recorded.
  </summary>
</histogram>

<histogram name="Signin.AvatarPillPromo.Shown"
    enum="ProfileMenuAvatarButtonPromoType" expires_after="2027-02-14">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the promo type shown on the Avatar pill. Recorded when the promo is
    shown.
  </summary>
</histogram>

<histogram name="Signin.Bookmarks.SyncTurnedOnWithAccountStorageEnabled"
    enum="BooleanOccurred" expires_after="2026-12-27">
  <owner>amelies@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that sync was turned on while the user had account storage for
    bookmarks enabled. The record happens when the user opts in to sync.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.CookieRotationGenerateAssertionDuration"
    units="ms" expires_after="2026-10-25">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how long the generation of assertion for the cookie rotation request
    in a bound session has taken. Recorded every time a server-challenge is
    required to rotate bound cookies.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.CookieRotationGenerateAssertionResult"
    enum="BoundSessionCredentialsCookieRotationGenerateAssertionResult"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of the assertion generation for the cookie rotation
    request in a bound session. Recorded at the attempt to sign a given
    server-challenge in order to rotate bound cookies.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.CookieRotationHttpResult.{ChallengeType}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result (network error or an HTTP response code) of a cookie
    rotation request triggered by the bound session credentials feature.

    Recorded every time a cookie rotation request is performed, only if the
    request {ChallengeType} challenge response.

    Cookie rotation is triggered if there is a bound session on startup, bound
    cookies soon to expire/expired and/or requests to the bound site are blocked
    on bound cookies.
  </summary>
  <token key="ChallengeType">
    <variant name="WithCachedChallenge" summary="contained a cached"/>
    <variant name="WithFreshChallenge" summary="contained a freshly generated"/>
    <variant name="WithoutChallenge" summary="didn't contain any"/>
  </token>
</histogram>

<histogram name="Signin.BoundSessionCredentials.CookieRotationNetError"
    enum="NetErrorCodes" expires_after="2026-12-27">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the network error occured during a cookie rotation request triggered
    by the bound session credentials feature. Recorded every time a cookie
    rotation request completes with a connection error.

    Cookie rotation is triggered if there is a bound session on startup, bound
    cookies soon to expire/expired and/or requests to the bound site are blocked
    on bound cookies.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.CookieRotationOutageAttempts{Interval}"
    units="requests" expires_after="2026-11-05">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how many failed cookie rotation attempts were made during a cookie
    rotation endpoint outage for a bound session within the same user session
    (reset on startup). Server 5xx errors are considered to be an outage after a
    number of successive failures. {Interval}.
  </summary>
  <token key="Interval">
    <variant name=""
        summary="Recorded when an outage is fixed (cookie rotation success,
                 bound cookie becoming fresh) or session shutdown,
                 overriden/terminated while an outage is ongoing"/>
    <variant name="Periodic"
        summary="Recorded periodically every
                 (kNumberOfErrorsToIgnoreForBackoff + 1) cookie rotation
                 failures during an outage"/>
  </token>
</histogram>

<histogram name="Signin.BoundSessionCredentials.CookieRotationOutageDuration"
    units="ms" expires_after="2026-10-25">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how long a cookie rotation endpoint outage has taken for a bound
    session within the same user session (reset on startup). Server 5xx errors
    are considered to be an outage after a number of successive failures.
    Recorded when an outage is fixed (cookie rotation success, bound cookie
    becoming fresh) or session shutdown, overriden/terminated while an outage is
    ongoing.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.CookieRotationResult{SessionOrigin}{Trigger}"
    enum="BoundSessionCredentialsCookieRotationResult"
    expires_after="2027-02-14">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of the cookie rotation request triggered by the bound
    session credentials feature. {SessionOrigin} {Trigger}

    Cookie rotation is triggered if there is a bound session on startup, bound
    cookies soon to expire/expired and/or requests to the bound site are blocked
    on bound cookies.
  </summary>
  <token key="SessionOrigin" variants="BoundSessionOrigin"/>
  <token key="Trigger" variants="BoundSessionRefreshCookieFetcherTrigger"/>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.CookieRotationTotalDuration{Trigger}"
    units="ms" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how long the cookie rotation flow has taken. {Trigger}

    Cookie rotation is triggered if there is a bound session on startup, bound
    cookies soon to expire/expired and/or requests to the bound site are blocked
    on bound cookies.
  </summary>
  <token key="Trigger" variants="BoundSessionRefreshCookieFetcherTrigger"/>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.Covered{Type}RequestWasDeferred{Result}"
    enum="BooleanWasDeferred" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether a request was deferred due to a missing bound cookie.
    Recorded every time a request covered by a bound session completes with
    {Result}.

    &quot;Covered by a bound session&quot; means that a request will be deferred
    if it's missing a bound cookie.

    {Type}
  </summary>
  <token key="Type">
    <variant name="" summary="Includes all requests."/>
    <variant name="Navigation"
        summary="Includes only main frame navigation requests."/>
  </token>
  <token key="Result">
    <variant name="" summary="either a success or a failure"/>
    <variant name=".Failure" summary="a failure"/>
    <variant name=".Success" summary="a success"/>
  </token>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.DeferredRequestUnblockTrigger.{Result}"
    enum="ResumeBlockedRequestsTrigger" expires_after="2027-01-03">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    In a bound session, requests are throttled when required bound cookies are
    stale and cookie refresh hasn't completed. This histogram records what
    triggered resuming a throttled request. Recorded for every throttled request
    that eventually completed {Result}.

    If a request was throttled by multiple bound sessions, this histogram will
    record the most &quot;important&quot; value determined by the
    `GetResumeBlockedRequestsTriggerPriority()` function.
  </summary>
  <token key="Result">
    <variant name="Failure" summary="with an error"/>
    <variant name="Success" summary="successfully"/>
  </token>
</histogram>

<histogram name="Signin.BoundSessionCredentials.Deferred{Type}RequestDelay"
    units="ms" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records for how long a request was delayed due to a missing bound cookie.
    Recorded every time a request was deferred by the bound session credentials
    throttle, right before the request is resumed or canceled.

    {Type}
  </summary>
  <token key="Type">
    <variant name="" summary="Includes all requests."/>
    <variant name="Navigation"
        summary="Includes only main frame navigation requests."/>
  </token>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.OAuthMultilogin.BindingKeyMissing"
    enum="Boolean" expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded every time OAuthMultilogin response contains new bound session(s)
    to register but the binding key is missing. This should never happen given
    that the server responds with bound session(s) data only if the client
    proved the possession of the binding key.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.OAuthMultilogin.InvalidParams"
    units="params" expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of invalid bound session params in successful
    OAuthMultilogin response. Recorded every time successful OAuthMultilogin
    response contains new bound session(s) to register.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.OAuthMultilogin.ParsingError"
    enum="OAuthMultiloginDeviceBoundSessionParsingError"
    expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records an error (or lack of any) that occured during parsing the device
    bound sessions data from the OAuthMultilogin API response. Recorded upon
    receiving a successful response from OAuthMultilogin API only if the cookie
    parsing completed successfully and the response contained extra information
    about device bound cookies.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.OAuthMultilogin.RegisteredSessions"
    units="sessions" expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of bound sessions registered by OAuthMultilogin. Recorded
    after cookies from a successful OAuthMultilogin response are set. Only
    recorded for Chrome instances that support OAuthMultilogin cookies binding.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.OAuthMultilogin.UnknownDomain"
    units="domains" expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of unknown domains in the device bound sessions data from
    the OAuthMultilogin API response. Recorded upon receiving a successful
    response from OAuthMultilogin API only if the cookie parsing and the device
    bound sessions parsing completed successfully.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.ResumeThrottledRequestsTrigger"
    enum="ResumeBlockedRequestsTrigger" expires_after="2027-02-14">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    In a bound session, requests are throttled when required bound cookies are
    stale and cookie refresh hasn't completed. This histogram records what
    triggered resuming throttled requests. Recorded every time a batch of
    throttled requests are resumed.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.SessionCountOnInit"
    units="DBSC sessions" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of bound sessions after initializing them from storage on
    Chrome startup. Recorded only when the device bound session credentials
    feature is enabled.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.SessionRegistrationGenerateRegistrationTokenDuration"
    units="ms" expires_after="2026-10-25">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how long the generation of a registration token for the bound
    session registration has taken. Recorded every time Chrome attempts to
    register a bound session after an invitation from the server via an HTTP
    header. This will not be recorded if Chrome couldn't parse the server
    invitation or just decided to ignore it.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.SessionRegistrationGenerateRegistrationTokenResult"
    enum="BoundSessionCredentialsRegistrationTokenResult"
    expires_after="2027-09-06">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of generating a registration token for a bound session
    registration. Recorded every time Chrome attempts to register a bound
    session after an invitation from the server via an HTTP header. This will
    not be recorded if Chrome couldn't parse the server invitation or just
    decided to ignore it.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.SessionRegistrationResult"
    enum="BoundSessionCredentialsSessionRegistrationResult"
    expires_after="2027-01-03">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of the bound session registration request. Recorded every
    time Chrome attempts to register a bound session after an invitation from
    the server via an HTTP header. This will not be recorded if Chrome couldn't
    parse the server invitation or just decided to ignore it.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.SessionRegistrationTotalDuration"
    units="ms" expires_after="2026-10-25">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how long the bound session registration flow has taken. Recorded
    every time Chrome attempts to register a bound session after an invitation
    from the server via an HTTP header. This will not be recorded if Chrome
    couldn't parse the server invitation or just decided to ignore it.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.SessionTerminationDebugReportFetcherHttpResult"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2026-11-05">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of an HTTP request (network error or an HTTP response
    code) that Chrome sends to report about the bound session termination.
    Chrome sends this requests immediately after terminating a bound session.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.SessionTerminationTrigger{SessionOrigin}"
    enum="SessionTerminationTrigger" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the trigger for a bound session termination on the Chrome side (e.g.
    Clear cookie). Recorded immediately after the session is terminated.
    {SessionOrigin}
  </summary>
  <token key="SessionOrigin" variants="BoundSessionOrigin"/>
</histogram>

<histogram name="Signin.BoundSessionCredentials.StorageReadError"
    enum="BoundSessionParamsReadError" expires_after="2026-11-05">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records errors encountered while reading device bound sessions from disk at
    Chrome startup. Recorded once per bound session stored on disk. Not recorded
    for off-the-record profiles since they don't store bound session data on
    disk.
  </summary>
</histogram>

<histogram name="Signin.BoundSessionCredentials.StorageWriteError"
    enum="BoundSessionParamsWriteError" expires_after="2026-11-05">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records errors encountered while saving device bound sessions to disk.
    Recorded once per bound session whenever it's saved to disk. This mainly
    happens when Chrome registers a new bound session but it also may happen
    during data migrations. Not recorded for off-the-record profiles since they
    don't store bound session data on disk.
  </summary>
</histogram>

<histogram
    name="Signin.BoundSessionCredentials.ThrottledRequestsSuccessiveTimeout"
    units="timeouts" expires_after="2026-10-25">
  <owner>alexilin@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records how many successive batches of throttled network requests has timed
    out without the cookie being fresh in between. Recorded when cookies become
    fresh or on session termination/shutdown if any requests has hit the
    timeout.
  </summary>
</histogram>

<histogram name="Signin.CctAccountMismatch" enum="CctAccountMismatchType"
    expires_after="2027-02-04">
  <owner>samarchehade@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    When CCT is launched by AGA, records whether there is a mismatch between the
    account signed in to Chrome and the account signed in to the app that
    launched Chrome. This can happen if the user is signed in to Chrome but not
    the 1P app, or vice-versa, or if the user is signed in to both apps but with
    different accounts.
  </summary>
</histogram>

<histogram name="Signin.CctAccountMismatchNoticeSuppressed"
    enum="SuppressedReason" expires_after="2027-01-03">
  <owner>samarchehade@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    When CCT is launched from an eligible 1P app and there is a mismatch between
    the account signed in to Chrome and the account signed in to the app that
    launched Chrome, a mismatch notice might be displayed. However, this notice
    might be suppressed for a number of reasons. Records when the CCT account
    mismatch notice is suppressed and why.
  </summary>
</histogram>

<histogram
    name="Signin.ChromeOS.IsEstimateNewSignInUsersWithFinchAvailablePopulationEnabled"
    enum="Boolean" expires_after="2027-02-01">
  <owner>mmrashad@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the state of the EstimateNewSignInUsersWithFinchAvailablePopulation
    feature flag (True if enabled, False if disabled). Recorded exactly once per
    device-level user during their first sign-in (profile initialization), when
    the primary account is established for the first time. This tracks
    operating-system level user accounts, not secondary Google Accounts added
    via Settings. ChromeOS only.
  </summary>
</histogram>

<histogram name="Signin.ChromeSignoutConfirmationPrompt.{Variant}"
    enum="ChromeSignoutConfirmationChoice" expires_after="2027-02-07">
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the user choice on the Chrome signout confrmation prompt, for the
    version of the dialog that is shown when {Variant}.
  </summary>
  <token key="Variant">
    <variant name="NoUnsynced"
        summary="the user has valid credentials and no unsynced data"/>
    <variant name="SupervisedProfile" summary="the user is supervised"/>
    <variant name="Unsynced"
        summary="the user has valid credentials and unsynced data"/>
    <variant name="UnsyncedBookmarks"
        summary="the user has unsynced bookmarks data"/>
    <variant name="UnsyncedReauth"
        summary="the user has invalid credentials and unsynced data"/>
  </token>
</histogram>

<histogram name="Signin.CookieBinding.NeedsUpgradeStatus"
    enum="CookieBindingUpgradeStatus" expires_after="2026-12-06">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the outcome of evaluating cookie binding upgrade preconditions on
    the first account reconcilor run on startup. Recorded exactly once per
    profile load.
  </summary>
</histogram>

<histogram name="Signin.CookieBinding.UpgradeCreateBoundSessionsResult"
    enum="DeviceBoundSessionCreateSessionsResult" expires_after="2026-12-06">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the device bound session creation result triggered by
    OAuthMultilogin response to a cookie binding upgrade request. Recorded upon
    completion.
  </summary>
</histogram>

<histogram name="Signin.CookieBinding.UpgradeOAuthMultiloginDuration"
    units="ms" expires_after="2026-12-06">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the total duration of the OAuthMultilogin network request and DBSC
    session registration for cookie upgrade operations. Recorded upon
    completion.
  </summary>
</histogram>

<histogram name="Signin.CookieBinding.UpgradeReconciliationDeferredOnStartup"
    enum="Boolean" expires_after="2026-12-06">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the first startup reconciliation run had to be deferred
    because DBSC sessions were not yet fetched from the network process.
    Recorded only when preconditions for the cookie binding upgrade are met.
  </summary>
</histogram>

<histogram name="Signin.CookieBinding.UpgradeSessionFetchDuration" units="ms"
    expires_after="2026-12-06">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the latency of querying the network process for existing DBSC
    sessions on startup for cookie binding upgrades. Recorded upon successfully
    receiving the list of DBSC sessions from the network process, once per
    profile load.
  </summary>
</histogram>

<histogram
    name="Signin.CookieJar.ChromeAccountRelation2{AccountInvestigationReportingType}"
    enum="AccountRelation" expires_after="never">
<!-- expires-never: this histogram gives important user information about user
  signin behavior, and is often used in UX design decisions -->

  <owner>droger@chromium.org</owner>
  <owner>skym@chromium.org</owner>
  <summary>
    The relation between the account signed into chrome, and the account(s) in
    the cookie jar. This metric is never recorded when not signed into chrome.
    The version 1 of this histogram was recorded when the user was syncing ; the
    version 2 is recorded for all signed in users (including non-syncing).
    {AccountInvestigationReportingType}
  </summary>
</histogram>

<histogram
    name="Signin.CookieJar.SignedInCountWithPrimary{UnconsentedPrimaryAccountType}"
    units="accounts" expires_after="2026-11-29">
  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The number of signed in accounts in the cookie jar for users that have a
    (possibly unconsented) primary account. Reported at most every 24 hours
    (using a persistent timer). Reporting is split based on the type of the
    primary account. {UnconsentedPrimaryAccountType}
  </summary>
  <token key="UnconsentedPrimaryAccountType">
    <variant name=".NoSyncConsumer" summary="A consumer account, no sync."/>
    <variant name=".NoSyncEnterprise"
        summary="An enterprise account, no sync."/>
    <variant name=".SyncConsumer" summary="A consumer account, syncing."/>
    <variant name=".SyncEnterprise" summary="An enterprise account, syncing."/>
  </token>
</histogram>

<histogram
    name="Signin.CookieJar.SignedInCount{AccountInvestigationReportingType}"
    units="accounts" expires_after="never">
<!-- expires-never: this histogram gives important user information about user
  signin behavior, and is often used in UX design decisions -->

  <owner>droger@chromium.org</owner>
  <owner>skym@chromium.org</owner>
  <summary>
    The number of signed in accounts in the cookie jar.
    {AccountInvestigationReportingType}
  </summary>
</histogram>

<histogram
    name="Signin.CookieJar.SignedOutCount{AccountInvestigationReportingType}"
    units="accounts" expires_after="never">
<!-- expires-never: this histogram gives important user information about user
  signin behavior, and is often used in UX design decisions -->

  <owner>droger@chromium.org</owner>
  <owner>skym@chromium.org</owner>
  <summary>
    The number of signed out accounts in the cookie jar.
    {AccountInvestigationReportingType}
  </summary>
</histogram>

<histogram name="Signin.CookieJar.StableAge{AccountInvestigationReportingType}"
    units="seconds" expires_after="never">
<!-- expires-never: this histogram gives important user information about user
  signin behavior, and is often used in UX design decisions -->

  <owner>droger@chromium.org</owner>
  <owner>skym@chromium.org</owner>
  <summary>
    The amount of time since the cookie jar last changed.
    {AccountInvestigationReportingType}
  </summary>
</histogram>

<histogram
    name="Signin.CookieJar.TotalCount{AccountInvestigationReportingType}"
    units="accounts" expires_after="never">
<!-- expires-never: this histogram gives important user information about user
  signin behavior, and is often used in UX design decisions -->

  <owner>droger@chromium.org</owner>
  <owner>skym@chromium.org</owner>
  <summary>
    The total number of accounts in the cookie jar.
    {AccountInvestigationReportingType}
  </summary>
</histogram>

<histogram name="Signin.CrossDevice.InitialAccountsNumber{ExternalEntryPoint}"
    units="accounts" expires_after="2027-05-25">
  <owner>lbarczynski@google.com</owner>
  <owner>myuu@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the total number of Google accounts present on the device at the
    moment the cross-device sign-in flow starts. Recorded for
    {ExternalEntryPoint}.
  </summary>
  <token key="ExternalEntryPoint" variants="ExternalEntryPoint"/>
</histogram>

<histogram name="Signin.CrossDevice.InitialState{ExternalEntryPoint}"
    enum="SigninCrossDeviceInitialState" expires_after="2027-05-25">
  <owner>lbarczynski@google.com</owner>
  <owner>myuu@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the initial state of the device and accounts after successfully
    parsing the cross-device sign-in deep link, but before the actual flow
    starts. Recorded for {ExternalEntryPoint}.
  </summary>
  <token key="ExternalEntryPoint" variants="ExternalEntryPoint"/>
</histogram>

<histogram name="Signin.CrossDevice.UrlDetected" units="entry point id"
    expires_after="2027-05-25">
  <owner>lbarczynski@google.com</owner>
  <owner>myuu@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the raw external entry point ID detected from the cross-device
    sign-in URL (e.g., from a QR code scan). It's recorded only if the full URL
    is valid and was parsed successfully.
  </summary>
</histogram>

<histogram
    name="Signin.CrossDeviceSigninPromo.DismissedAtShownCount.{CrossDeviceSigninPromoEntryPoint}"
    units="count" expires_after="2027-06-26">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-desktop@google.com</owner>
  <summary>
    Records the shown count of the cross-device sign-in promo when it was
    dismissed by the user. Recorded for {CrossDeviceSigninPromoEntryPoint}.
  </summary>
  <token key="CrossDeviceSigninPromoEntryPoint"
      variants="CrossDeviceSigninPromoEntryPoint"/>
</histogram>

<histogram name="Signin.CrossDeviceSigninPromo.OpenedQrCodeBubble"
    enum="CrossDeviceSigninPromoEntryPoint" expires_after="2027-06-26">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-desktop@google.com</owner>
  <summary>
    Records that the cross-device sign-in QR Code bubble was opened, categorized
    by the entry point it was opened from.
  </summary>
</histogram>

<histogram
    name="Signin.CrossDeviceSigninPromo.ShouldShowResult.{CrossDeviceSigninPromoEntryPoint}"
    enum="CrossDeviceSigninPromoShouldShowResult" expires_after="2027-06-26">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-desktop@google.com</owner>
  <summary>
    Records the decision (allow to show or block reason) for showing the
    cross-device sign-in promo. Recorded for {CrossDeviceSigninPromoEntryPoint}.
  </summary>
  <token key="CrossDeviceSigninPromoEntryPoint"
      variants="CrossDeviceSigninPromoEntryPoint"/>
</histogram>

<histogram
    name="Signin.CrossDeviceSigninPromo.ShownCount.{CrossDeviceSigninPromoEntryPoint}"
    units="count" expires_after="2027-06-26">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-desktop@google.com</owner>
  <summary>
    Records the new shown count of the cross-device sign-in promo after it is
    shown. Recorded for {CrossDeviceSigninPromoEntryPoint}.
  </summary>
  <token key="CrossDeviceSigninPromoEntryPoint"
      variants="CrossDeviceSigninPromoEntryPoint"/>
</histogram>

<histogram name="Signin.DelayedNetworkCallQueueSize.{EffectiveConnectionType}"
    units="callbacks" expires_after="2027-02-07">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the size of the delayed network call queue when the effective
    connection type is {EffectiveConnectionType}. This is used to understand how
    often network calls are delayed despite having a valid network connection.
    This metric is emitted every 30 minutes.
  </summary>
  <token key="EffectiveConnectionType">
    <variant name="2G"/>
    <variant name="3G"/>
    <variant name="4G"/>
    <variant name="Offline"/>
    <variant name="Slow-2G"/>
    <variant name="Unknown"/>
  </token>
</histogram>

<histogram
    name="Signin.DeviceBoundSessions.OAuthMultilogin.CreateSessionsResult{PartitionSuffix}"
    enum="DeviceBoundSessionCreateSessionsResult" expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records result of the attempt to create device bound sessions
    with the server-provided session(s) data from OAuthMultilogin. Only recorded
    for Chrome instances that support DBSC standard and OAuthMultilogin cookies
    binding. {PartitionSuffix}
  </summary>
  <token key="PartitionSuffix" variants="PartitionSuffix"/>
</histogram>

<histogram
    name="Signin.DeviceBoundSessions.OAuthMultilogin.SessionCreationError{PartitionSuffix}"
    enum="DeviceBoundSessionError" expires_after="2027-02-07">
  <owner>ernn@google.com</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records errors returned by the network process while creating
    device bound sessions with the server-provided session(s) data from
    OAuthMultilogin. It is recorded for every single session. A batch operation
    result is recorded in
    `Signin.DeviceBoundSessions.OAuthMultilogin.CreateSessionsResult`. Only
    recorded for Chrome instances that support DBSC standard and OAuthMultilogin
    cookies binding. {PartitionSuffix}
  </summary>
  <token key="PartitionSuffix" variants="PartitionSuffix"/>
</histogram>

<histogram name="Signin.Dice.InvalidPrimaryConnectedInUnsignedProfile"
    enum="Boolean" expires_after="2027-04-01">
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether Gaia sends primary_is_connected=true in the linked accounts
    metadata when the profile has no primary account (unsigned profile). Emitted
    whenever primary_is_connected=true is processed in a DICE signin response.
  </summary>
</histogram>

<histogram name="Signin.DiceAuthorizationCode" enum="BooleanPresent"
    expires_after="never">
<!-- expires-never: used to monitor OAuth outages in Dice.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Recorded when a Dice signin response is received and indicates whether the
    authorization code was present or not.
  </summary>
</histogram>

<histogram name="Signin.DiceEnableSyncHeaderAccountInfoIsPresent"
    enum="BooleanPresent" expires_after="2027-02-11">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the AccountInfo is Present or Missing when processing a Dice
    &quot;ENABLE_SYNC&quot; header. Missing AccountInfo can happen during OAuth
    outages where the previous signin header didn't contain an authorization
    code.
  </summary>
</histogram>

<histogram name="Signin.DiceLinkedAccountsMetaHeaderStatus"
    enum="DiceLinkedAccountsMetaHeaderStatus" expires_after="2027-04-01">
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the parsing status of the
    X-Chrome-ID-Consistency-Linked-Accounts-Meta header during a DICE web
    sign-in request. Emitted once per sign-in if the header is present, or if
    the response contains multiple accounts (even if the header is missing).
  </summary>
</histogram>

<histogram name="Signin.DiceMigration.ForceMigrated" enum="Boolean"
    expires_after="2026-12-20">
  <owner>ankushkush@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records whether a user was force migrated out of the DICe state. This is
    recorded once per profile load for all users.
  </summary>
</histogram>

<histogram name="Signin.DiceResponseHeader" enum="SigninDiceResponseHeader"
    expires_after="never">
<!-- expires-never: used to monitor the health of the Dice feature and for troubleshooting.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>Records Dice responses (signin and signout).</summary>
</histogram>

<histogram name="Signin.DiceTokenBindingOutcome" enum="DiceTokenBindingOutcome"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>ahijazi@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Outcome of the token binding in Dice signin. Recorded upon a successful
    token fetch during Dice signin. Not recorded if the token fetch failed.
  </summary>
</histogram>

<histogram name="Signin.DiceTokenFetchResult" enum="SigninDiceTokenFetchResult"
    expires_after="never">
<!-- expires-never: used to monitor the health of the Dice feature and for troubleshooting.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>Outcome of the token fetch in Dice signin.</summary>
</histogram>

<histogram name="Signin.Enterprise.WorkProfile.ProfileCreatedWithPolicySet"
    enum="BooleanCreated" expires_after="2027-06-17">
  <owner>ydago@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <summary>
    Warning: this histogram was expired from 2025-07-01 to 2026-04-15; data may
    be missing.

    Whether the user chose to create a new work profile after a signin while
    profile separation is enforced by policy. This is recorded after the user
    accepts or refuses to create a new profile when shown the enterprise profile
    confirmation dialog and enterprise profile separation is enforced by policy.
  </summary>
</histogram>

<histogram name="Signin.Enterprise.WorkProfile.ProfileCreatedwithPolicyUnset"
    enum="BooleanCreated" expires_after="2027-06-17">
  <owner>ydago@chromium.org</owner>
  <owner>pastarmovj@chromium.org</owner>
  <summary>
    Warning: this histogram was expired from 2025-07-01 to 2026-04-15; data may
    be missing.

    Whether the user chose to create a new work profile after a signin while
    profile separation is not enforced by policy. This is recorded after the
    user accepts or refuses to create a new profile when shown the enterprise
    profile confirmation dialog and enterprise profile separation is not
    enforced by policy.
  </summary>
</histogram>

<histogram name="Signin.ExplicitSigninDatatypeMigration"
    enum="ExplicitSigninDatatypeMigrationState" expires_after="2027-01-01">
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded on every startup (towards the end of primary account manager
    initialization) for users who are signed in but not syncing.

    It records 3 buckets: signed in users, signed in users with explicit
    bookmarks enabled, and signed in users with explicit extensions enabled.
    This helps track the migration of users to the explicit bookmarks and
    extensions prefs.
  </summary>
</histogram>

<histogram name="Signin.Extensions.AccountExtensionsSignoutChoice"
    enum="AccountExtensionsSignoutChoice" expires_after="2027-02-14">
  <owner>kelvinjiang@chromium.org</owner>
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logged if the user has account extensions when making a choice on the Chrome
    signout confirmation prompt. Records if the user has chosen to either keep
    or uninstall all of their account extensions upon signing out, or if the
    signout was cancelled.
  </summary>
</histogram>

<histogram name="Signin.Extensions.ExplicitSigninFromAnyAccessPoint"
    enum="BooleanIsNewOptIn" expires_after="2027-02-21">
  <owner>amelies@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the user explicitly signed in for the first time or if they
    have previously done so before in the same profile. Recorded upon signing in
    through any access point.
  </summary>
</histogram>

<histogram name="Signin.Extensions.ExplicitSigninFromExtensionInstallBubble"
    enum="BooleanIsNewOptIn" expires_after="2026-12-27">
  <owner>kelvinjiang@chromium.org</owner>
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the user explicitly signed in through the extension install
    bubble entry point for the first time or if they have previously done so
    before in the same profile. Recorded upon signing in through the extension
    install bubble entry point only.
  </summary>
</histogram>

<histogram name="Signin.Extensions.GetAuthTokenResult{GetAuthTokenType}"
    enum="GetAuthTokenResult" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Result of the chrome.identity.getAuthToken() extension API call. Recorded
    right before returning the result to an extension. Desktop only.
    {GetAuthTokenType}
  </summary>
  <token key="GetAuthTokenType">
    <variant name=""/>
    <variant name=".RemoteConsentApproved"
        summary="The remote consent has been approved for the getAuthToken()
                 call."/>
  </token>
</histogram>

<histogram name="Signin.Extensions.LaunchWebAuthFlowResult"
    enum="LaunchWebAuthFlowResult" expires_after="2027-08-27">
  <owner>alexilin@chromium.org</owner>
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Result of the chrome.identity.launchWebAuthFlow() extension API call.
    Recorded right before returning the result to an extension. Desktop only.
  </summary>
</histogram>

<histogram name="Signin.ForcedDiceMigration.BrowserInstanceAvailableAfterTimer"
    enum="BooleanAvailable" expires_after="2026-12-27">
  <owner>ankushkush@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records whether the browser instance was available after the timer to show
    the toast was fired. The toast is shown to confirm the user's migration to
    explicitly signed-in state, which happens early during the startup. This is
    recorded for all implicitly signed-in users with account management enabled.
    Since this is recorded during the migration of implicitly signed-in users to
    explicitly signed-in state which can happen only once per user lifetime,
    this histogram is recorded exactly once per user lifetime.
  </summary>
</histogram>

<histogram name="Signin.ForcedDiceMigration.HasAcceptedAccountManagement"
    enum="Boolean" expires_after="2026-12-27">
  <owner>ankushkush@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records whether the user has account management enabled. This is recorded
    for all implicitly signed-in users early during the startup. Since this is
    recorded during the migration of implicitly signed-in users to explicitly
    signed-in state which can happen only once per user lifetime, this histogram
    is recorded exactly once per user lifetime.
  </summary>
</histogram>

<histogram name="Signin.GaiaAuthFetcherIOS.CookiesState"
    enum="SigninGaiaAuthFetcherIOSCookiesState" expires_after="2026-12-27">
  <owner>msarda@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <summary>
    Records whether the requests started from GaiaAuthFetcher include secure and
    insecure cookies. This is required to investigate the issue
    crbug.com/531646858.

    Only logged on iOS.
  </summary>
</histogram>

<histogram name="Signin.GaiaCookieManager.Logout"
    enum="SigninGaiaCookieManagerLogout" expires_after="never">
<!-- expires-never: monitors logout requests to http://accounts.google.com/Logout endpoint -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    The number of requests initiated by the browser to log the user out from
    Google web. The Chrome account reconcilor enforces account consistency for
    Google accounts between the browser and web. In some cases it must force
    logout the user from Google web and then it sends a request to the Gaia
    logout endpoint. The expectation is that brower initiated logout is a rare
    event and should only occur in the following cases: a) it to be triggered
    when the browser fails to exchange an auth code for refresh tokens after a
    web sign-in (events which is counted by histogram
    Signin.DiceTokenFetchResult), b) when all refresh tokens are invalid (e.g
    when they cannot be loaded from disk).
  </summary>
</histogram>

<histogram name="Signin.GaiaPageVisited" enum="GaiaPage"
    expires_after="2027-01-03">
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded whenever a Gaia page (i.e. https://accounts.google.com/) was
    visited. The buckets distinguish various well-known pages. Not recorded in
    Incognito. iOS only.
  </summary>
</histogram>

<histogram name="Signin.GetAccessTokenFinished" enum="GoogleServiceAuthError"
    expires_after="2027-02-07">
  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Records finished access token requests during Chrome reconcile, both
    successful or not, and return the GoogleAuthError state NONE is a success,
    other values are failures.
  </summary>
</histogram>

<histogram name="Signin.GetAccounts.Android.Result"
    enum="GetAccountsAndroidResult" expires_after="2027-01-10">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the outcome of fetching the list of accounts from the
    platform-specific API that happens in the AccountManagerFacade. Android
    only.
  </summary>
</histogram>

<histogram name="Signin.GetAccounts.AndroidApiAvailability" enum="Boolean"
    expires_after="2027-01-10">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records whether API that fetches the list of accounts is available for use.
    Recorded when the availability check completes. Android only.
  </summary>
</histogram>

<histogram
    name="Signin.GetAccounts.AndroidApiAvailabilityLatency.{Availability}"
    units="ms" expires_after="2027-01-10">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Tracks the latency of the account list API availability check.Recorded when
    the availability check completes. Android only.
  </summary>
  <token key="Availability">
    <variant name="Available" summary="The API is available"/>
    <variant name="Unavailable" summary="The API is unavailable"/>
  </token>
</histogram>

<histogram name="Signin.GetAccountsBackoffRetries" units="retries"
    expires_after="2027-04-01">
  <owner>samarchehade@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Android only. The number of backoff retries necessary before fetching user
    accounts information from Google Play services succeeded. Recorded after
    every successful accounts fetching.
  </summary>
</histogram>

<histogram name="Signin.GetAccountsBackoffSuccess"
    enum="BooleanGetAccountsSucceeded" expires_after="2026-12-27">
  <owner>samarchehade@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Android only. Whether account fetching succeeded or not. Recorded either
    after user accounts were successfully retrieved from Google Play or after
    failing after a maximum number of retries.
  </summary>
</histogram>

<histogram name="Signin.HatsSurveyAndroid.TriedShowing"
    enum="SigninSurveyTrigger" expires_after="2027-02-07">
  <owner>triploblastic@google.com</owner>
  <owner>bsazonov@chromium.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records that a signin HaTS survey may have been shown to the user. It means
    that we got a valid survey config and the user is eligible to be shown a
    survey. The survey may not get shown in the end due to external restrictions
    such as survey limit within 24 hours being reached. (Android only).
  </summary>
</histogram>

<histogram name="Signin.HatsSurveyAndroid.TriggerRegistered"
    enum="SigninSurveyTrigger" expires_after="2027-02-07">
  <owner>triploblastic@google.com</owner>
  <owner>bsazonov@chromium.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records that a trigger for signin HaTS survey was registered. This is
    registered only once per chrome run. (Android only).
  </summary>
</histogram>

<histogram name="Signin.HistoryAlreadyOptedInAccessPoint.{ConsentLevel}"
    enum="SigninAccessPoint" expires_after="2026-11-30">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>treib@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the signin access point at the moment when the user is
    {ConsentLevel} Chrome, if they're already opted in to history sync. See also
    `Signin.HistoryOptInState.*`.
  </summary>
  <token key="ConsentLevel">
    <variant name="OnSignin" summary="signing in to"/>
    <variant name="OnSync" summary="enabling sync in"/>
  </token>
</histogram>

<histogram name="Signin.HistoryOptInState.{ConsentLevel}" enum="BooleanOptedIn"
    expires_after="2026-11-30">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>treib@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the user's history opt-in state, at the moment when the user is
    {ConsentLevel} Chrome. For `ConsentLevel::kSync` users, this is true by
    default, but may be false if the user had previously enabled sync and turned
    history off. Conversely, for `ConsentLevel::kSignin` users, it's false by
    default, unless the same user was previously signed in and has opted in
    then. Note that, depending on the signin entry point and other conditions,
    the user may be presented with a history opt-in right after this histogram
    records a &quot;false&quot; sample - for those cases, see
    `Signin.HistorySyncOptIn.Completed`. See also
    `Signin.HistoryAlreadyOptedInAccessPoint.*`, which for the &quot;true&quot;
    samples in this histogram records their signin access point.
  </summary>
  <token key="ConsentLevel">
    <variant name="OnSignin" summary="signing in to"/>
    <variant name="OnSync" summary="enabling sync in"/>
  </token>
</histogram>

<histogram
    name="Signin.HistorySyncOptin.SyncStartupAwaitTime.{SyncStartupEvent}"
    units="ms" expires_after="2027-01-03">
  <owner>anthie@google.com</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Records the time spent until {SyncStartupEvent}. It is recorded when the
    sync service reaches a transport state past the initialization or when we
    exceed a given timeout and the sync service transport has not been updated.
  </summary>
  <token key="SyncStartupEvent">
    <variant name="Complete"
        summary="the sync engine completes its initialization"/>
    <variant name="Timeout"
        summary="we timeout waiting for the sync engine to initialize"/>
  </token>
</histogram>

<histogram name="Signin.HistorySyncOptIn.{OptInFlowEvent}"
    enum="SigninAccessPoint" expires_after="2027-01-31">
  <owner>myuu@google.com</owner>
  <owner>bsazonov@chromium.org</owner>
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that {OptInFlowEvent}, and logs the original access point associated
    with this event.
  </summary>
<!-- LINT.IfChange(Signin.HistorySyncOptIn) -->

  <token key="OptInFlowEvent">
    <variant name="Aborted"
        summary="the history sync screen has been dismissed due to some
                 reasons (identity disappears during the flow, user swipped
                 down to dismiss the screen, Chrome shutdown)"/>
    <variant name="AlreadyOptedIn"
        summary="the history sync screen has been skipped since the user has
                 already opted-in for history sync previously"/>
    <variant name="Completed"
        summary="the user completed the flow to enable history sync by
                 tapping on the accept button in the history sync screen"/>
    <variant name="Declined"
        summary="the user declined the flow to enable history sync by tapping
                 on the decline button in the history sync screen"/>
    <variant name="Offered"
        summary="the user was shown a button that would start the flow to
                 enable history sync (only recorded on Desktop)"/>
    <variant name="Skipped"
        summary="the history sync screen has been skipped due to enterprise
                 policies disabling sync, history sync, or tabs sync; or if
                 user is signed out (note: on Desktop, skipped is only
                 recorded if the history sync optin flow has been attempted;
                 it is not recorded for flows that check in advance if
                 history sync cannot be enabled and prevent the history
                 screen flow from starting)"/>
    <variant name="Started"
        summary="the user started the flow to enable history sync"/>
  </token>
<!-- LINT.ThenChange(//chrome/browser/ui/webui/signin/history_sync_optin_helper.cc:FlowEventToString) -->

</histogram>

<histogram name="Signin.IdentityConfirmationSnackbarDecision"
    enum="IdentityConfirmationSnackbarDecision" expires_after="2027-01-24">
  <owner>jlebel@chromium.org</owner>
  <owner>jood@google.com</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the decision whether to show an identity confirmation snackbar (and
    the reason for not showing it), whenever the app is foregrounded. iOS only.
  </summary>
</histogram>

<histogram name="Signin.IdentitySnackbarHadUserName" enum="BooleanAvailable"
    expires_after="2025-10-01">
  <owner>arthurmilchior@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded when the identity snackbar is displayed. It records whether the
    name was available to display. iOS only.
  </summary>
</histogram>

<histogram name="Signin.Intercept.AccountPreview.ResponseTime" units="ms"
    expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the duration between requesting account preview preferences for an
    intercepted account and receiving the preference response (or reaching the
    timeout). Recorded before showing the interception bubble.
  </summary>
</histogram>

<histogram name="Signin.Intercept.AccountPreview.TimedOut"
    enum="BooleanTimedOut" expires_after="2027-06-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether requesting account preview preferences for an intercepted
    account timed out before receiving the preference response. Recorded before
    showing the interception bubble.
  </summary>
</histogram>

<histogram name="Signin.Intercept.BubbleDismissReason{Type}"
    enum="SigninInterceptionDismissReason" expires_after="2026-09-06">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the reason for dismissing {Type} bubble. This is recorded when a
    dismiss action is done. It could either be by pressing the Escape key when
    the bubble is shown or by pressing on the identity pill button.
  </summary>
  <token key="Type">
    <variant name="" summary="an intercept"/>
    <variant name=".ChromeSignin" summary="the Chrome Signin"/>
    <variant name=".MultiUser" summary="the Profile Creation"/>
    <variant name=".Switch" summary="the Profile Switch"/>
  </token>
</histogram>

<histogram name="Signin.Intercept.ChromeSignin.DismissesBefore{Action}"
    units="attempts" expires_after="2026-11-09">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of times the user dismisses the Chrome Signin Intercept
    Bubble before {Action} it. The value is recorded when the user is {Action}
    the Chrome Signin intercept bubble. No value is recorded when the bubble is
    dismissed/ignored.
  </summary>
  <token key="Action">
    <variant name="Accept" summary="accepting"/>
    <variant name="Decline" summary="declining"/>
  </token>
</histogram>

<histogram name="Signin.Intercept.ChromeSignin.NumberOfDaysSinceLastDecline"
    units="Days" expires_after="2026-11-22">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the number of days that passed since the last time Chrome Signin
    Bubble was declined. This value is recorded when a reprompt is displayed.
    The value is not recorded if the Chrome Signin setting is explicitly set by
    the user.
  </summary>
</histogram>

<histogram name="Signin.Intercept.ChromeSignin.RepromptCount" units="reprompts"
    expires_after="2026-10-25">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the number of reprompts for the Chrome Signin Bubble. This value is
    recorded when a reprompt is displayed. The first bubble impression is not
    recorded here. The first reprompt (follow up impression) will first be
    recorded as 1.
  </summary>
</histogram>

<histogram name="Signin.Intercept.ChromeSignin.ResponseTime{Result}" units="ms"
    expires_after="2026-11-09">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the time between the display of the Chrome Signin intercept bubble
    and the user {Result} response by interacting with the bubble UI.
  </summary>
  <token key="Result">
    <variant name="Accepted" summary="accepted"/>
    <variant name="Declined" summary="declined"/>
    <variant name="Dismissed" summary="dismissed"/>
  </token>
</histogram>

<histogram name="Signin.Intercept.FRE.Event"
    enum="SigninInterceptFREDialogEvent" expires_after="2027-01-12">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Warning: this histogram was expired from 2026-04-12 to 2026-08-26; data may
    be missing.

    Records various events that occur during the first run experience after the
    sign-in interception.
  </summary>
</histogram>

<histogram name="Signin.Intercept.Heuristic.SupervisionState.{InterceptType}"
    enum="SinginInterceptSupervisionState" expires_after="2026-07-26">
  <owner>anthie@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the supervision state of the intercepted user when the sign-in
    interception bubble is displayed, for different interception types that
    suport supervised user parametrization. This histograms records values for
    interceptions that happen when {InterceptType}.
  </summary>
  <token key="InterceptType">
    <variant name="ChromeSignin"
        summary="the user signs in to a local profile."/>
    <variant name="MultiUser"
        summary="the user signs in an existing profile of the primary user
                 and a new profile is created for them."/>
    <variant name="Switch"
        summary="the user signs in to an existing profile of the primary user
                 and a profile for this user already exists."/>
  </token>
</histogram>

<histogram name="Signin.Intercept.HeuristicOutcome"
    enum="SigninInterceptHeuristicOutcome" expires_after="2026-11-29">
  <owner>droger@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <summary>
    Records the outcome of the signin interception heuristic, which runs for
    each signin interception.
  </summary>
</histogram>

<histogram name="Signin.InterceptResult.ChromeSignin{State}"
    enum="SigninInterceptResult" expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the outcome of the signin interception bubble. Recorded when the
    bubble is closed, either after the user did an explicit action through the
    bubble or when the bubble was closed because it was dismissed or ignored
    (browser is closed while the bubble was showing).

    This histogram records values for the Chrome Signin bubble, with the users
    {State}.
  </summary>
  <token key="State">
    <variant name="" summary="in any state"/>
    <variant name=".CookiesDeletedOnExit"
        summary="that have Clear Cookies on Exit enabled"/>
  </token>
</histogram>

<histogram name="Signin.InterceptResult.Enterprise{Mode}.{Status}"
    enum="SigninInterceptResult" expires_after="2026-09-27">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the outcome of the signin interception bubble. Recorded when the
    bubble is closed, either after the user did an explicit action through the
    bubble or when the bubble was closed because it was dismissed or ignored
    (browser is closed while the bubble was showing).

    This histogram records values for the Enterprise {Mode}, with the {Status}
    account being enterprise.
  </summary>
  <token key="Mode">
    <variant name="" summary="bubble"/>
    <variant name="Forced" summary="dialog"/>
  </token>
  <token key="Status">
    <variant name="NewIsEnterprise" summary="new"/>
    <variant name="PrimaryIsEnterprise" summary="primary"/>
  </token>
</histogram>

<histogram name="Signin.InterceptResult.{InterceptType}{SigninState}"
    enum="SigninInterceptResult" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the outcome of the signin interception bubble. Recorded when the
    bubble is closed, either after the user did an explicit action through the
    bubble or when the bubble was closed because it was dismissed or ignored
    (browser is closed while the bubble was showing).

    This histogram records values for the {InterceptType}, with the users
    {SigninState}.
  </summary>
  <token key="InterceptType">
    <variant name="Enterprise" summary="Enterprise bubble"/>
    <variant name="EnterpriseForced" summary="Enterprise dialog"/>
    <variant name="EnterpriseOIDC" summary="Enterprise dialog for OIDC signin"/>
    <variant name="MultiUser" summary="MultiUser bubble"/>
    <variant name="Switch" summary="Profile-switch bubble"/>
  </token>
  <token key="SigninState">
    <variant name="" summary="in any sign in state."/>
    <variant name=".NoSync" summary="that have not opted in to Sync"/>
    <variant name=".SigninPending" summary="in Signin Pending state"/>
    <variant name=".Sync" summary="that have opted in to Sync"/>
  </token>
</histogram>

<histogram name="Signin.InvalidGaiaCredentialsReason"
    enum="SigninInvalidGaiaCredentialsReason" expires_after="never">
<!-- expires-never: used to monitor the health of the signin feature and for troubleshooting.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Reason for invalid Gaia credentials. Recorded when Signin.AuthError records
    invalid credentials.
  </summary>
</histogram>

<histogram name="Signin.IOSAccountMenu.Opened" enum="IOSAccountMenuAccessPoint"
    expires_after="2027-06-19">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the access point from where the account menu was opened. Recorded
    every time the account menu is opened. iOS only.
  </summary>
</histogram>

<histogram name="Signin.IOSAccountsOnDeviceCount{AccountType}" units="accounts"
    expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    [iOS only] Records the number of {AccountType} accounts on the device
    (across all profiles) at browser startup. See also
    &quot;Signin.IOSAccountsOnDeviceManagementTypesSummary&quot;.
  </summary>
  <token key="AccountType">
    <variant name="" summary="all"/>
    <variant name=".Consumer" summary="consumer"/>
    <variant name=".Managed" summary="managed (enterprise/EDU)"/>
    <variant name=".Unknown" summary="unknown-type"/>
  </token>
</histogram>

<histogram name="Signin.IOSAccountsOnDeviceManagementTypesHadUnknownTypes"
    enum="BooleanPresent" expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Companion to &quot;Signin.IOSAccountsOnDeviceManagementTypesSummary&quot;.
    Records whether any unknown-type accounts were present at browser startup.
  </summary>
</histogram>

<histogram name="Signin.IOSAccountsOnDeviceManagementTypesSummary{DeviceType}"
    enum="AccountManagementTypesSummary" expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    [iOS only] Records the numbers of consumer and enterprise/EDU accounts on
    the device at browser startup{DeviceType}. Accounts for which the type was
    not known yet are not counted (in practice, these are often managed accounts
    that Chrome just encountered for the first time). See also
    &quot;Signin.IOSAccountsOnDeviceManagementTypesHadUnknownTypes&quot; which
    records whether any unknown-type accounts were present, and
    &quot;Signin.AccountManagementTypesSummary&quot; which is similar to this
    histogram but is per-profile.
  </summary>
  <token key="DeviceType">
    <variant name="" summary=""/>
    <variant name=".ManagedDevice" summary=", only for managed devices"/>
    <variant name=".UnmanagedDevice" summary=", only for unmanaged devices"/>
  </token>
</histogram>

<histogram name="Signin.IOSAccountSwitchType" enum="IOSAccountSwitchType"
    expires_after="2027-01-24">
  <owner>jlebel@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    When switching accounts, records whether the old and/or the new account were
    managed. Recorded independently of whether the account switch involved a
    profile switch.
  </summary>
</histogram>

<histogram name="Signin.IOSAuthenticationServiceInitializationOutcome"
    enum="IOSProfileInitializationOutcome" expires_after="2027-01-17">
  <owner>jlebel@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the outcome of profile initialzation done by AuthenticationService,
    which happens whenever a profile is loaded (i.e. on browser startup, plus
    whenever the user switches accounts/profiles).
  </summary>
</histogram>

<histogram name="Signin.IOSChangeProfileReason" enum="IOSChangeProfileReason"
    expires_after="2026-10-04">
  <owner>jlebel@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the reason for switching profiles on iOS, whenever a profile switch
    is kicked off.
  </summary>
</histogram>

<histogram name="Signin.IOSDeviceRestoreIdentityCountAfter" units="identities"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of identities after iOS device restore. Recorded at cold
    start when a device restore is detected, and only if the user was signed in
    before the device backup.
  </summary>
</histogram>

<histogram name="Signin.IOSDeviceRestoreIdentityCountBefore" units="identities"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of identities before iOS device restore. Recorded at cold
    start when a device restore is detected, and only if the user was signed in
    before the device backup.
  </summary>
</histogram>

<histogram name="Signin.IOSDeviceRestoreSentinelError"
    enum="SigninIOSDeviceRestoreSentinelError" expires_after="2027-01-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records errors when creating sentinel files at cold start. Those sentinel
    files are used to detect a device restore. Histogram only for iOS.
  </summary>
</histogram>

<histogram name="Signin.IOSDeviceRestoreSentinelPathGenerated"
    enum="BooleanSuccess" expires_after="2027-01-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records if the path for a sentinel file (used to detect iOS restore) is
    generated successfully. Recorded on cold start.
  </summary>
</histogram>

<histogram name="Signin.IOSDeviceRestoreSignedInState"
    enum="IOSDeviceRestoreSignedinState" expires_after="2026-12-06">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the user is signed in or signed out before and after a
    device restore. Recorded at cold start when a device restore is detected.
  </summary>
</histogram>

<histogram name="Signin.IOSGaiaCookieStateOnSignedInNavigation"
    enum="GaiaCookieStateOnSignedInNavigation" expires_after="2027-01-17">
  <owner>jlebel@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the Gaia cookie is present when a user signed in to Chrome
    navigates to a Google-owned domain that is eligible for Mirror account
    consistency. This metrics tracks the user journeys that interact with
    authentication cookies and that could be disrupted if an external force
    (e.g. Apple's ITP) were to remove these cookies. This logging is limited to
    once every hour due to performance constraints.
  </summary>
</histogram>

<histogram name="Signin.IOSHostedDomainFetchEvent"
    enum="IOSHostedDomainFetchEvent" expires_after="2027-01-24">
  <owner>arthurmilchior@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records when fetching the hosted domain for an account starts or finishes,
    while determining which profile to assign the account into. A fetch is
    started as soon as an account is detected (i.e. independent of Chrome signin
    state), if the hosted domain isn't locally cached already. Only recorded if
    kSeparateProfilesForManagedAccounts is enabled.
  </summary>
</histogram>

<histogram name="Signin.IOSIdentityAvailableInProfile"
    enum="IOSIdentityAvailableInProfile" expires_after="2026-10-25">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the availability of an identity while the user signs in. Whether it
    is available for AccountProfileMapper and whether it is available for
    IdentityManager in the a profile. According to crbug.com/393340481 it is
    possible for an identity to be available in AccountProfileMapper and not in
    IdentityManager. This metric can be removed once
    `kSeparateProfilesForManagedAccounts` is launched and if
    `AccountProfileMapper` and `IdentityManager` are in sync. This is record
    only for iOS.
  </summary>
</histogram>

<histogram name="Signin.IOSNumberOfAccountSwitches.{TimeRange}"
    units="switches" expires_after="2027-09-06">
  <owner>jlebel@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    The number of times the user switched accounts in the {TimeRange}. Emitted
    no more than once every 24 hours, as soon as Chrome detects that more than
    24 hours passed from the last recording. Recorded only on iOS.
  </summary>
  <token key="TimeRange">
    <variant name="Last7Days" summary="last 7 days"/>
    <variant name="Last28Days" summary="last 28 days"/>
  </token>
</histogram>

<histogram name="Signin.IOSNumberOfDeviceAccounts" units="accounts"
    expires_after="2027-01-17">
  <owner>jlebel@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Count of the number of SSO accounts present on the device. Note that this is
    different to the number of accounts signed in in Chrome. The count is logged
    in this histogram each time the application goes to foreground.
  </summary>
</histogram>

<histogram name="Signin.IOSResizedAvatarCache.GetAvatarResult"
    enum="IOSResizedAvatarCacheGetAvatarResult" expires_after="2027-08-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    [iOS only] Records the result of retrieving an avatar from the system
    identity manager cache and preparing it in ResizedAvatarCache (on cache
    miss). Recorded each time an identity avatar is requested and is not already
    present in the memory cache.
  </summary>
</histogram>

<histogram name="Signin.ListAccountsFailure" enum="GoogleServiceAuthError"
    expires_after="never">
<!-- expires-never: ListAccounts calls are used to monitor the accounts in the
Gaia cookies. This is a mandatory step for account reconcilor and therefore
should be kept for as long as Chrome continues to reconciles accounts between
the browser and content area. -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Failure reason of ListAccounts call failure during account reconciliation,
    Chrome OS login, or signin internals queries.
  </summary>
</histogram>

<histogram name="Signin.ListAccountsFailure.TriggerListAccountsIfStalePosted"
    units="Boolean" expires_after="2027-06-11">
  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Logs whether a task to check and trigger list accounts if they are stale is
    posted when ListAccounts fails.
  </summary>
</histogram>

<histogram name="Signin.ListAccountsRetry" enum="GoogleServiceAuthError"
    expires_after="never">
<!-- expires-never: ListAccounts calls are used to monitor the accounts in the
Gaia cookies. This is a mandatory step for account reconcilor and therefore
should be kept for as long as Chrome continues to reconciles accounts between
the browser and content area. -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Retry reason of failed ListAccounts calls (these calls calls are used to
    fetch the list of Google accounts present in the Gaia cookies).
  </summary>
</histogram>

<histogram name="Signin.ListFamilyMembersRequest.OverallLatency" units="ms"
    expires_after="2027-02-14">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <summary>
    Kids Management API fetchers have a retry logic that might trigger multiple
    individual calls to the Kids Management API one after the other. This metric
    captures the total time, including all individual latencies tracked in
    Signin.ListFamilyMembersRequest.Latency.
  </summary>
</histogram>

<histogram name="Signin.ListFamilyMembersRequest.OverallStatus"
    enum="SupervisedUserProtoFetcherStatus" expires_after="2026-01-31">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <summary>
    The final status of the fetch to the Kids Management API, visible to the
    user. Statuses of intermediate fetches (including final one) are tracked in
    the Signin.ListFamilyMembersRequest.Status metric.
  </summary>
</histogram>

<histogram name="Signin.ListFamilyMembersRequest.RetryCount" units="retries"
    expires_after="2026-08-09">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-eng@google.com</owner>
  <summary>
    The number of retries before a decisive status (OK or permanent error).
  </summary>
</histogram>

<histogram name="Signin.LoadedIdentities.Count" units="identities"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Counts the number of identities loaded by SSO library using the keychain
    API. The metric is recorded every time SSO updates the identity list (either
    on the first run, or when the cache is staled). Identities with and without
    auth error are counted. See: https://crbug.com/897470.
  </summary>
</histogram>

<histogram name="Signin.LoadedIdentities.Duration" units="ms"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the time it takes to load identities by SSO library using the
    keychain API. The metric is recorded every time SSO updates the identity
    list (either on the first run, or when the cache is staled). See:
    https://crbug.com/897470.
  </summary>
</histogram>

<histogram name="Signin.LoadedIdentities.DurationPerIdentity" units="ms"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the time it takes to load one identity in average by SSO library
    using the keychain API. This value is the total time taken by the keychain
    API to finish, divided by the number of identities returned. The metrics is
    recorded every time SSO updates the identity list (either on the first run,
    or when the cache is staled). See: crbug.com/897470.
  </summary>
</histogram>

<histogram name="Signin.LoadedIdentities.IdentityWithAuthErrorCount"
    units="identities" expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Counts the number of identities with auth error, loaded by SSO library using
    the keychain API. The metric is recorded every time SSO updates the identity
    list (either on the first run, or when the cache is staled).
  </summary>
</histogram>

<histogram name="Signin.LoadTokenFromDB" enum="SigninLoadTokenFromDB"
    expires_after="never">
<!-- expires-never: used to monitor the health of the signin feature and for troubleshooting.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Action taken for tokens being loaded from the token database, at Chrome
    startup. Tokens can be either loaded into Chrome's token service or revoked.
  </summary>
</histogram>

<histogram name="Signin.MagiChrome.HybridTransportSupported" enum="Boolean"
    expires_after="2026-10-01">
  <owner>msalama@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the device supports Hybrid Transport (BLE) for MagiChrome.
    Recorded when the Chrome sign-in URL is generated.
  </summary>
</histogram>

<histogram name="Signin.ManageAccountsResponse.ServiceType"
    enum="GaiaServiceType" expires_after="2027-01-24">
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@chromium.org</owner>
  <summary>
    Records the Gaia &quot;service type&quot; received in an
    &quot;X-Chrome-Manage-Accounts&quot; header, indicating an action the user
    has selected on a Gaia page which is to be handled by Chrome, such as adding
    another account or managing accounts on the device. Applies only to
    &quot;Mirror&quot; platforms, i.e. Android, iOS, and ChromeOS.
  </summary>
</histogram>

<histogram name="Signin.ManagedUserProfileCreationConflict" enum="BooleanHit"
    expires_after="2027-01-03">
  <owner>anthie@google.com</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Recorded when during a flow that requires the creation of a managed profile
    via the managed disclaimer service, we detect that another managed profile
    creation for a different user is in progress. Applies to Desktop platforms.
  </summary>
</histogram>

<histogram name="Signin.MoveAccount.CanMoveToService"
    enum="AccountMoveDecision" expires_after="2027-01-03">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the outcome of an attempt to move an account between profiles,
    specifically regarding whether the account's refresh token and binding key
    can be transferred.

    Recorded on every attempt to move an account between profiles, mainly via
    the sign-in intercept feature.
  </summary>
</histogram>

<histogram name="Signin.Multilogin.NumberOfAccounts" units="accounts"
    expires_after="never">
<!-- expires-never: used to monitor the health of the signin feature and for troubleshooting.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Number of accounts in tokens sent to Gaia Multilogin. Recorded when Chrome
    does a request to /oauth/multilogin.
  </summary>
</histogram>

<histogram name="Signin.NumberOfActiveAccounts.AnyManaged.{TimeRange}"
    units="accounts" expires_after="2027-01-03">
  <owner>bsazonov@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The number of accounts that were active in the {TimeRange}, i.e. that were
    used as the primary account in any profile. Emitted no more than once every
    24 hours, as soon as Chrome detects that more than 24 hours passed from the
    last recording, and only if at least one of the active accounts was a
    managed account. See also `Signin.NumberOfActiveAccounts.Last7/28Days` for
    the number of active accounts independent of managed-ness status.
  </summary>
  <token key="TimeRange">
    <variant name="Last7Days" summary="last 7 days"/>
    <variant name="Last28Days" summary="last 28 days"/>
  </token>
</histogram>

<histogram name="Signin.NumberOfActiveAccounts.{TimeRange}" units="accounts"
    expires_after="2027-01-03">
  <owner>bsazonov@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The number of accounts that were active in the {TimeRange}, i.e. that were
    used as the primary account in any profile. Emitted no more than once every
    24 hours, as soon as Chrome detects that more than 24 hours passed from the
    last recording.
  </summary>
  <token key="TimeRange">
    <variant name="Last7Days" summary="last 7 days"/>
    <variant name="Last28Days" summary="last 28 days"/>
  </token>
</histogram>

<histogram name="Signin.NumberOfActiveManagedAccounts.{TimeRange}"
    units="accounts" expires_after="2027-01-03">
  <owner>bsazonov@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>treib@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    The number of managed accounts that were active in the {TimeRange}, i.e.
    that were used as the primary account in any profile. Emitted no more than
    once every 24 hours, as soon as Chrome detects that more than 24 hours
    passed from the last recording. See also
    `Signin.NumberOfActiveAccounts.Last7/28Days` for the number of active
    accounts independent of managed-ness status.
  </summary>
  <token key="TimeRange">
    <variant name="Last7Days" summary="last 7 days"/>
    <variant name="Last28Days" summary="last 28 days"/>
  </token>
</histogram>

<histogram name="Signin.OAuth2MintToken.ApiCallResult"
    enum="OAuth2MintTokenApiCallResult" expires_after="2027-01-10">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Result of the OAuth2MintToken API call. Recorded after the response is
    processed. Desktop only.

    Warning: this histogram was expired from 2024-05-19 to 2024-09-10; data may
    be missing.
  </summary>
</histogram>

<histogram name="Signin.OAuth2MintToken.Response" enum="OAuth2Response"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    OAuth2 result of the OAuth2MintToken API call based on the server response.
    Recorded after the response is processed excluding net failure cases.
    Desktop only.

    This is recorded together with
    &quot;Signin.OAuth2MintToken.ApiCallResult&quot; but uses the same result
    type as &quot;Gaia.ResponseForOAuth2AccessToken&quot;.
  </summary>
</histogram>

<histogram
    name="Signin.OAuth2MintToken.{BindingState}FetchAuthError{TokenBindingAssertionValue}"
    enum="GoogleServiceAuthError" expires_after="2027-01-31">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records an error code (or none) for a single OAuth2MintToken API fetch with
    {BindingState} refresh token. Recorded for requests with
    {TokenBindingAssertionValue}, after the response is processed. Desktop only.
  </summary>
  <token key="TokenBindingAssertionValue">
    <variant name="" summary="any token binding assertion value"/>
    <variant name=".AssertionFailed"
        summary="a &quot;signature failed&quot; placeholder in place of a
                 token binding assertion"/>
    <variant name=".ChallengeSentinel"
        summary="a challenge sentinel in place of a token binding assertion"/>
    <variant name=".NoAssertion" summary="an empty token binding assertion"/>
    <variant name=".SignedAssertion" summary="a successfully signed assertion"/>
  </token>
  <token key="BindingState">
    <variant name="Bound" summary="a bound"/>
    <variant name="Unbound" summary="an unbound"/>
  </token>
</histogram>

<histogram name="Signin.OAuth2MintToken.{BindingState}FetchEncryptionError"
    enum="TokenBindingResponseEncryptionError" expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records an encryption failure (or lack of any) that occured during
    OAuth2MintToken API fetch with {BindingState} refresh token. Recorded after
    the response is processed. Desktop only.
  </summary>
  <token key="BindingState">
    <variant name="Bound" summary="a bound"/>
    <variant name="Unbound" summary="an unbound"/>
  </token>
</histogram>

<histogram name="Signin.OAuth2TokenGetResult" enum="GoogleServiceAuthError"
    expires_after="never">
<!-- expires-never: This is needed as long as Chrome is fetching access tokens
to monitor/debug fetching OAuth2 Token issues. -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Reason fetching an OAuth2 Token failed or none in case of success. Available
    on all OSes.
  </summary>
</histogram>

<histogram name="Signin.OAuth2TokenGetRetry" enum="GoogleServiceAuthError"
    expires_after="never">
<!-- expires-never: This reports the retry reason for fetching OAuth 2.0 access
tokens and is needed for as long as Chrome is fetching access tokens. -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Reason fetching an OAuth2 Token is being retried. Available on all OSes.
  </summary>
</histogram>

<histogram name="Signin.OAuthMultiloginResponseEncryptionError"
    enum="TokenBindingResponseEncryptionError" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records an encryption failure (or lack of any) that occured during
    OAuthMultilogin API fetch. Recorded once per cookie while the response is
    being processed.
  </summary>
</histogram>

<histogram name="Signin.OAuthMultiloginResponseStatus2{PartitionSuffix}"
    enum="OAuthMultiloginResponseStatus" expires_after="never">
<!-- expires-never: This reports the status received from gaia Multilogin and
should be kept to monitor/debug signin Multilogin issues-->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Response status received from gaia Multilogin. {PartitionSuffix} This is
    version 2 of the histogram, which also records network errors.
  </summary>
  <token key="PartitionSuffix" variants="PartitionSuffix"/>
</histogram>

<histogram name="Signin.OAuthMultiloginResponseStatus{PartitionSuffix}"
    enum="OAuthMultiloginResponseStatus" expires_after="2027-01-03">
<!-- TODO(crbug.com/531677785): Remove this histogram once we have recorded the new
Signin.OAuthMultiloginResponseStatus2{PartitionSuffix} one for a long enough time. -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Response status received from gaia Multilogin. {PartitionSuffix}
  </summary>
  <token key="PartitionSuffix" variants="PartitionSuffix"/>
</histogram>

<histogram name="Signin.OpenTabsCount.{ConsentLevel}" units="count"
    expires_after="2027-02-14">
  <owner>treib@chromium.org</owner>
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recording the count of open tabs, at the moment when the user is
    {ConsentLevel} Chrome.
  </summary>
  <token key="ConsentLevel">
    <variant name="OnSignin" summary="signing in to"/>
    <variant name="OnSync" summary="enabling sync in"/>
  </token>
</histogram>

<histogram name="Signin.PAMInitialize.PrimaryAccountInfoState"
    enum="PAMInitializePrimaryAccountInfoState" expires_after="2027-01-24">
  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs whether the primary account info is properly tracked by the account
    tracker service. If it is not, then it logs whether the primary account info
    was restored.
  </summary>
</histogram>

<histogram name="Signin.PAMInitialize.PrimaryAccountPrefs"
    enum="PAMInitializePrimaryAccountPrefs" expires_after="2027-01-17">
  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the state of the main primary account preferences when the primary
    account manager is loaded.
  </summary>
</histogram>

<histogram name="Signin.ProcessMirrorHeaders.AllowedFromInitiator.GoIncognito"
    enum="BooleanAllowed" expires_after="2026-12-27">
  <owner>bsazonov@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Recorded when request intitator is checked after receiving
    X-Chrome-Connected header with GAIA_SERVICE_TYPE_INCOGNITO. The recorded
    bucket represents the result of the check (i.e. whether the received
    initiator origin is allowed to trigger requests that end up sending
    X-Chrome-Connected header).
  </summary>
</histogram>

<histogram name="Signin.ProcessMirrorHeaders.Event" enum="MirrorHeaderEvent"
    expires_after="2027-02-07">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records which the state of the target account when the mirror header is
    received. This is recorded when the GAIA_SERVICE_TYPE_ADDSESSION header is
    received.
  </summary>
</histogram>

<histogram name="Signin.ProcessMirrorHeaders.LoadingDialog.Status"
    enum="WebSigninLoadingDialogStatus" expires_after="2027-04-22">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records whether the web signin loading dialog was shown, not shown (because
    signin finished fast enough), or dismissed by the user. Recorded when the
    web signin process finishes or the dialog is dismissed.
  </summary>
</histogram>

<histogram name="Signin.ProcessMirrorHeaders.LoadingDuration.Aborted"
    units="ms" expires_after="2027-08-11">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the duration of the wait for WebSignin to complete before it was
    aborted. Recorded when WebSignin is aborted.
  </summary>
</histogram>

<histogram name="Signin.ProcessMirrorHeaders.LoadingDuration.{Result}"
    units="ms" expires_after="2027-04-22">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Time taken for cookies to be minted and the user to be redirected to a
    specified URL. Recorded from when the WebSigninRedirectCoordinator is
    initialized to when the user either gets redirected or if the user receives
    an error.
  </summary>
  <token key="Result">
    <variant name="AuthError" summary="An auth error occurred"/>
    <variant name="OtherError" summary="An other error occurred"/>
    <variant name="Success" summary="The web sign-in succeeded"/>
  </token>
</histogram>

<histogram name="Signin.ProcessMirrorHeaders.WaitOutcome"
    enum="WebSigninWaitOutcome" expires_after="2027-08-11">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records the outcome of the wait for WebSignin to complete. Recorded when the
    WebSignin process either completes or is aborted, along with whether a
    loading dialog was shown during the wait.
  </summary>
</histogram>

<histogram name="Signin.Promo.ImpressionsUntil.{Action}.{AccessPoint}"
    units="impressions" expires_after="2027-01-03">
  <owner>myuu@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    This histogram records how many times the sign-in promo of the {AccessPoint}
    has been shown when a {Action} is done on the same promo (Android Only).
  </summary>
  <token key="Action" variants="SigninPromoAction"/>
  <token key="AccessPoint" variants="SigninPromoAccessPoint"/>
</histogram>

<histogram name="Signin.Reauth.InExplicitFlow.{Event}" enum="ReauthAccessPoint"
    expires_after="2027-02-07">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Recorded when a reauth flow triggered from an explicit reauthentication UI
    is {Event}. Recorded bucket designates the explicit reauthentication UI in
    which the reauthentication flow was triggered. Only recorded on iOS.
  </summary>
  <token key="Event" variants="ReauthFlowEvent"/>
</histogram>

<histogram name="Signin.Reauth.InSigninFlow.{Event}" enum="SigninAccessPoint"
    expires_after="2027-02-07">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Recorded when a reauth flow triggered within the sign-in flow is {Event}.
    Recorded bucket designates the sign-in flow in which the reauthentication
    flow was triggered. Only recorded on iOS.
  </summary>
  <token key="Event" variants="ReauthFlowEvent"/>
</histogram>

<histogram name="Signin.Reconciler.AllExternalCcResultCompleted"
    enum="BooleanSuccess" expires_after="never">
<!-- expires-never: used to detect and debug signin issues -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records whether all external connections have been successfully checked (a
    value of &quot;true&quot;) or not (&quot;false&quot;) when the reconciler
    attempts to perform MergeSession.
  </summary>
</histogram>

<histogram name="Signin.Reconciler.CookieJar.IsFresh" enum="Boolean"
    expires_after="2026-10-01">
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether the accounts in the cookie jar are fresh when StartReconcile
    is called on the AccountReconcilor.
  </summary>
</histogram>

<histogram
    name="Signin.Reconciler.Duration.UpTo3mins{Signin_Reconciler_Duration_UpTo3mins}"
    units="ms" expires_after="never">
<!-- expires-never: used to detect and debug signin issues -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Records the execution time of the account reconciler using 100 buckets, up
    to 3 minutes. {Signin_Reconciler_Duration_UpTo3mins}
  </summary>
  <token key="Signin_Reconciler_Duration_UpTo3mins">
    <variant name=".Failure" summary="Failed execution of reconciler"/>
    <variant name=".Success" summary="Successful execution of reconciler"/>
  </token>
</histogram>

<histogram name="Signin.Reconciler.ExternalCcResultTime.Completed" units="ms"
    expires_after="never">
<!-- expires-never: used to detect and debug signin issues -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the time it took to successfully check all external connections
    whenever the reconciler performs a reconciliation.
  </summary>
</histogram>

<histogram name="Signin.Reconciler.ExternalCcResultTime.NotCompleted"
    units="ms" expires_after="never">
<!-- expires-never: used to detect and debug signin issues -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the time it took to check only a portion of external connections
    whenever the reconciler performs a reconciliation. This means that either a
    network error occured while checking some sites or the site did not respond
    before the check timeout.
  </summary>
</histogram>

<histogram name="Signin.Reconciler.Operation" enum="SigninReconcilerOperation"
    expires_after="2027-02-07">
  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the operation executed by the reconcilor to reconcile the accounts
    (or no-op if the accounts are already consistent).
  </summary>
</histogram>

<histogram
    name="Signin.Reconciler.RejectedRequestsDueToThrottler.{RequestType}"
    units="requests" expires_after="2027-02-07">
  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <summary>
    Records the number of consecutive {RequestType} requests not allowed by the
    account reconcilor throttler due to back off time required between
    successive requests with the same paramaters. Recorded on the throttler
    destruction, a reset upon a new different request or a no operation
    reconciliation cycle or an allowed request upon a sufficient time to refill.
  </summary>
  <token key="RequestType">
    <variant name="LogoutAll" summary="logout all"/>
    <variant name="Preserve" summary="preserve"/>
    <variant name="Update" summary="update"/>
  </token>
</histogram>

<histogram name="Signin.Reconciler.Trigger.{Operation}"
    enum="SigninReconcilerTrigger" expires_after="2027-02-07">
  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>msalama@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded when the account reconcilor tries to change the cookie to match the
    tokens and performs a {Operation} operation. Records the event which
    triggered the reconcile.
  </summary>
  <token key="Operation">
    <variant name="Logout" summary="logout"/>
    <variant name="Multilogin" summary="multilogin"/>
    <variant name="Noop" summary="no-op"/>
    <variant name="Throttled" summary="throttled (cancelled)"/>
  </token>
</histogram>

<histogram name="Signin.RefreshTokenRevoked.Source"
    enum="SourceForRefreshTokenOperation" expires_after="never">
<!-- expires-never:  This histogram reports the source for token revocation
operation and should therefore be logged for as long as Chrome uses OAuth 2.0
refresh tokens to manage authentication and authorization information for
Google accounts.-->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Source for refresh token revocation. This is used to track the sources for
    signing out of Google accounts and is required to validate that the browser
    is not revoking tokens for large parts of the user population.
  </summary>
</histogram>

<histogram name="Signin.RefreshTokensLoaded.Duration" units="ms"
    expires_after="2027-04-03">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the total time elapsed from when the profile's credential loading
    sequence starts (via LoadCredentialsInternal on the UI thread) to when all
    refresh tokens are loaded into memory and ready for use.

    Recorded exactly once per profile startup.

    For Android, this measures the latency from the native delegate calling
    LoadCredentialsInternal, through GMS Core account fetching and validation,
    to when tokens are ready in memory. This includes the Java account manager
    IPC roundtrip and native account seeding.

    For Desktop, this measures the latency from the native delegate calling
    LoadCredentialsInternal, through DB thread query overhead, local SQLite
    token decryption, and key manager initialization on the UI thread.
  </summary>
</histogram>

<histogram name="Signin.RefreshTokenUpdated.ToInvalidToken.Source"
    enum="SourceForRefreshTokenOperation" expires_after="never">
<!-- expires-never:  This histogram reports the source for invalidating the
refresh token of the primary account. It should therefore be logged for as long
as Chrome uses OAuth 2.0 refresh tokens to manage authentication and
authorization information for the primary account.-->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Source for refresh token updated to invalid tokens. The refresh token is
    updated to an permanently invalid token when the user attempts to sign out
    of the primary account without turning off sync. This histogram is used to
    track the sources for invalidating the token of the primary account and is
    required to validate that the browser is not invalidating the token of the
    primary account for large parts of the user population.
  </summary>
</histogram>

<histogram name="Signin.RefreshTokenUpdated.ToValidToken.Source"
    enum="SourceForRefreshTokenOperation" expires_after="never">
<!-- expires-never:  This histogram reports the source for updating a refresh
token. It should therefore be logged for as long as Chrome uses OAuth 2.0
refresh tokens to manage authentication and authorization information for Google
accounts .-->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <summary>
    Source for refresh token updated to valid tokens. This is used to track the
    sources for adding Google accounts to the browser.
  </summary>
</histogram>

<histogram name="Signin.ScopeLimitedErrorSuppressed" enum="Boolean"
    expires_after="2026-09-27">
  <owner>triploblastic@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Records whether mdm notification was suppressed for scope limited errors.
    Every time chrome tries to get an access token for a set of scopes and gets
    an error, we will call mdm service to check if it wants to show a
    notification for this error. If it's a scope limited error we will not call
    the mdm service. So any notification it would have shown is effectively
    suppressed. iOS only.
  </summary>
</histogram>

<histogram name="Signin.SessionWithCookieSigninStatusUnknown.Duration"
    units="ms" expires_after="2027-02-14">
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram is recorded when the session is ending and only if the web
    sign-in status is unknown. It records the duration of the session that was
    spent in an &quot;Unknown&quot; state. This histogram is used to validate
    that long sessions with &quot;Unknown&quot; cookie sign-in status are short.

    An &quot;Unknown&quot; sign-in state indicates that the list of accounts in
    cookie jar haven't been refreshed for the current session yet. During this
    time, Chrome only has access to a cached, potentially stale list of accounts
    from disk.

    This time is measured in milliseconds and the session duration (session
    start and session end points, including the exclusion of idle time) follows
    the same definition as the one used for the Session.TotalDuration histogram.
  </summary>
</histogram>

<histogram name="Signin.SetCookieSuccess" enum="BooleanSuccess"
    expires_after="never">
<!-- expires-never: For monitoring setting cookies in the cookie jar after an
OAuth Multilogin call. -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    This histogram records the success of setting each cookie after Multilogin
    response is received and parsed.
  </summary>
</histogram>

<histogram name="Signin.Settings.ChromeSignin.OnSignin"
    enum="ChromeSigninUserChoice" expires_after="2026-11-29">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <summary>
    Records the value of the setting for automatic Chrome Signin choice. The
    value is recorded upon Chrome Signin.
  </summary>
</histogram>

<histogram name="Signin.Settings.ChromeSigninSettingModification"
    enum="ChromeSigninSettingModification" expires_after="2026-11-01">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    This histogram records each modification of the setting value of &quot;Sign
    in to Chrome when you sign in to other Google services&quot; done by the
    user through the Settings page.

    If the setting was shown and not modified, a value for no modification is
    recorded when the user closes or navigates away from Chrome settings.

    If the setting is not shown, no values are recorded at all.
  </summary>
</histogram>

<histogram name="Signin.ShowCountAtSignin.{PromoType}" units="count"
    expires_after="2027-02-07">
  <owner>kbajkiewicz@google.com</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    This histogram records the count at which the {PromoType} when the user
    signs in through it.
  </summary>
  <token key="PromoType">
    <variant name="AddressSigninPromo"
        summary="Address sign-in promo was shown"/>
    <variant name="BookmarkSigninPromo"
        summary="Bookmark sign-in promo was shown"/>
    <variant name="PasswordSigninPromo"
        summary="Password sign-in promo was shown"/>
    <variant name="UnoBubbleReprompt" summary="Uno bubble was reprompted"/>
  </token>
</histogram>

<histogram name="Signin.ShowManageAccountFromGaia.BrowserType"
    enum="ChromeBrowserType" expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Logs the browser type when the Gaia server triggers the manage account
    dialog. Most likely, this is recorded when the user taps on a manage
    accounts button in Google web site (like gmail, drive, etc…).

    Only logged on iOS.
  </summary>
</histogram>

<histogram
    name="Signin.ShowSigninCoordinatorWhenAlreadyPresent.DurationBetweenTwoSigninCoordinatorCreation"
    units="ms" expires_after="2026-07-26">
  <owner>arthurmilchior@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <owner>msarda@chromium.org</owner>
  <owner>jlebel@chromium.org</owner>
  <summary>
    This histogram is recorded when two sign-in views are being opened at the
    same time. This indicates the duration between the two sign-in events.
  </summary>
</histogram>

<histogram
    name="Signin.ShowSigninCoordinatorWhenAlreadyPresent.{View}AccessPoint"
    enum="SigninAccessPoint" expires_after="2027-02-14">
  <owner>arthurmilchior@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <owner>msarda@chromium.org</owner>
  <owner>jlebel@chromium.org</owner>
  <summary>
    This histogram is recorded when two sign-in views are being opened at the
    same time. This indicates the access point which triggered the {View} to be
    opened.
  </summary>
  <token key="View">
    <variant name="New" summary="second"/>
    <variant name="Old" summary="first"/>
  </token>
</histogram>

<histogram name="Signin.SignIn.Completed{Profile}" enum="SigninAccessPoint"
    expires_after="never">
<!-- expires-never: guiding metric (internal: go/chrome-browser-guiding-metrics) -->

  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <owner>chrome-ds@google.com</owner>
  <improvement direction="HIGHER_IS_BETTER"/>
  <summary>
    Records that the user signed in to Chrome, and logs the original access
    point associated with this event.

    This histogram is of special interest to the chrome-ds@. Do not change its
    semantics or retire it without talking to them first.

    {Profile}
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<histogram name="Signin.SignIn.Offered{AccountState}" enum="SigninAccessPoint"
    expires_after="2027-01-31">
  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the option to sign in to Chrome was offered to the
    user{AccountState} and logs the original access point associated with this
    event.

    This histogram is still in development and has a limited coverage of the
    Signin access points for now.
  </summary>
  <token key="AccountState">
    <variant name="" summary=""/>
    <variant name=".NewAccountNoExistingAccount"
        summary=", with a new account and without having an existing account,"/>
    <variant name=".WithDefault" summary=", with the default account,"/>
  </token>
</histogram>

<histogram name="Signin.SignIn.Started{Profile}" enum="SigninAccessPoint"
    expires_after="2027-01-31">
  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the user started the flow to sign in to Chrome, and logs the
    original access point associated with this event.

    Notes:

    - For the First Run, we log it once for the whole first run flow, it does
    not get recorded multiple times if the user steps back in the flow and
    chooses again to sign in.

    - More access points were added in M134 in iOS, which should lead to an
    increase in the number of log, not related to an actual increase in usage.
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<!-- LINT.IfChange(SigninFlowTimestamps) -->

<histogram name="Signin.SignIn.Timestamps.{FlowVariant}.{Event}" units="ms"
    expires_after="2027-02-07">
  <owner>myuu@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    Logs the duration of the Android sign-in flow, from when the user triggers
    {FlowVariant} sign-in until {Event} occurs, recorded when the {Event}
    occurs. The time spent on the management notice is excluded.

    Only recorded on Android.
  </summary>
  <token key="FlowVariant">
    <variant name="Fullscreen" summary="Fullscreen sign-in flow"/>
    <variant name="Other" summary="Other sign-in flows"/>
    <variant name="Web" summary="Web sign-in flow"/>
  </token>
  <token key="Event">
    <variant name="ManagementStatusLoaded"
        summary="the account's management status is loaded"/>
    <variant name="SigninAborted"
        summary="The sign-in flow is aborted due to error. The duration of
                 the user interaction on the management notice, if any is
                 shown, is subtracted from the total duration."/>
    <variant name="SigninCompleted"
        summary="The sign-in flow is completed. The duration of the user
                 interaction on the management notice, if any is shown, is
                 subtracted from the total duration."/>
  </token>
</histogram>

<!-- LINT.ThenChange(//chrome/browser/signin/services/android/java/src/org/chromium/chrome/browser/signin/services/SigninFlowTimestampsLogger.java:SigninFlowTimestamps) -->

<histogram name="Signin.SigninAbortedAccessPoint" enum="SigninAccessPoint"
    expires_after="2027-05-12">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the original access point of each aborted sign in. Only logged on
    Android.
  </summary>
</histogram>

<histogram name="Signin.SigninAllowed" enum="BooleanEnabled"
    expires_after="never">
<!-- expires-never: used to monitor the health of the signin feature.  -->

  <owner>droger@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>tangltom@chromium.org</owner>
  <summary>
    Tracks the state of a user's signin-allowed preference. This is recorded at
    every startup.
  </summary>
</histogram>

<histogram name="Signin.SigninCompletedAccessPoint{SigninAccountStatus}"
    enum="SigninAccessPoint" expires_after="2027-01-31">
  <owner>msarda@chromium.org</owner>
  <owner>bsazonov@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the original access point of each completed sign in.
    {SigninAccountStatus}

    Note: See also more modern metrics such as Signin.SignIn.Completed and
    Signin.SyncOptIn.Completed that provide similar insights (but exclude
    reauth). More information about modernization can be found in
    http://go/chrome-signin-metrics-revamp.
  </summary>
  <token key="SigninAccountStatus" variants="SigninAccountStatus">
    <variant name=""/>
  </token>
</histogram>

<histogram name="Signin.SigninDisabledNotificationShown"
    enum="SigninAccessPoint" expires_after="2027-03-24">
  <owner>bsazonov@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    This histogram records the signin access point which was used when the
    signin disabled notification was shown. Recorded on Android only.
  </summary>
</histogram>

<histogram name="Signin.SigninManager.SetPrimaryAccountSigninInStage"
    enum="GaiaIntegrationState" expires_after="2027-02-14">
  <owner>droger@chromium.org</owner>
  <owner>anthie@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded when setting set the browser's primary account for non-automatic
    sign-ins. When the feature `BrowserSigninInSyncHeaderOnGaiaIntegration` is
    enabled, this also records the place where the browser sign-in would take
    place, if the feature was disabled. See also the enum `GaiaIntegrationState`
    description.
  </summary>
</histogram>

<histogram name="Signin.SigninManager.SyncHeaderArrivalTimeWindowAfterLst"
    units="ms" expires_after="2026-12-27">
  <owner>droger@chromium.org</owner>
  <owner>anthie@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the elapsed time between the handling of the LST token and the
    handing of the Dice Sync header when the user signs in to Chrome browser.

    If no Dice Sync header is sent from the Gaia server, then this histogram is
    not recorded. This histogram is not relevant and not recorded for Web
    sign-ins, as in this case the Dice Sync header is not sent.

    Chrome guarantees that the Sync header processing happens after the LST
    token processing so this elapsed time will be positive. In the unlikely edge
    case that GAIA sends the Sync header before Chrome can enforce the proper
    ordering between the LST and the Sync token, this histogram is not recorded
    and `Signin.SigninManager.UnexpectedSyncHeaderProcessingBeforeLST` will be
    recorded instead.
  </summary>
</histogram>

<histogram name="Signin.SigninManager.SyncHeaderTimeout" enum="BooleanTimedOut"
    expires_after="2027-02-23">
  <owner>droger@chromium.org</owner>
  <owner>anthie@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded when the user signs in to their Google Account through a Chrome
    sign-in entry point. This is not recorded for Web sign-in as they do not
    involve the Dice Sync Header.

    Records a `True` sample when the Dice Sync header arrives after a timeout
    window since the reception of the LST token or does not arrive at all.
    Records a `False` sample if the header arrives within a time window from the
    LST token.

    Also records `False` in the unlikely edge case that the Sync header arrives
    before the LST is even requested (and before Chrome can enforce their proper
    ordering to be first the LST and then the Sync header processing). For the
    latter edge case see also the histogram
    `Signin.SigninManager.UnexpectedSyncHeaderProcessingBeforeLST`.

    This histogram is not recorded if the user closes the sign-in tab before the
    timeout window is reached.
  </summary>
</histogram>

<!-- TODO(crbug.com/429524688): Remove this histogram after fixing this bug.-->

<histogram name="Signin.SigninManager.UnexpectedSyncHeaderProcessingBeforeLST"
    enum="BooleanHit" expires_after="2027-02-23">
  <owner>droger@chromium.org</owner>
  <owner>anthie@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Recorded when the user signs in to their Google Account through a Chrome
    sign-in entry point. This is not recorded for Web sign-in as they do not
    involve the Dice Sync Header.

    A value is recorded when, unexpectedly, the Dice sync header is processed
    before the LST token: This can only happen if the Sync header is received
    before the request for the LST happens. If the LST is first requested, then
    the processing of the LST and the Sync header is coordinated by Chrome so
    that they happen in the right order (first LST, then Sync header).
  </summary>
</histogram>

<histogram name="Signin.SigninPending.InconsistentStateInvoked{Profile}"
    enum="BooleanHit" expires_after="2027-02-07">
  <owner>amelies@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the signin interceptor detected the user entering an
    inconsistent state by signing into the web with an account B while being in
    sign in pending state with account A.

    {Profile}
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<histogram name="Signin.SigninPending.Offered" enum="SigninAccessPoint"
    expires_after="2027-03-15">
  <owner>rsult@google.com</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Records that the option to re-authenticate to the Signed in account in
    Chrome was offered to the user while in Sign-in Pending state and logs the
    original access point associated with this event.

    This histogram is still in development and has a limited coverage of the
    Signin access points for now.
  </summary>
</histogram>

<histogram name="Signin.SigninPending.ResolutionSource{Status}"
    enum="SigninAccessPoint" expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the access point of the resolution event from Signin Pending to
    Signed in. The value is recorded when the user {Status}.
  </summary>
  <token key="Status">
    <variant name="Completed"
        summary="resolves the Signin Pending state by signing back in"/>
    <variant name="Started"
        summary="starts resolving the Signin Pending state by attempting to
                 sign back in"/>
  </token>
</histogram>

<histogram name="Signin.SigninPending.ResolutionTime.{ResolutionType}"
    units="ms" expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the time spent from entering the Signin Pending state to
    {ResolutionType}. The value is recorded when the resolution method is
    applied.
  </summary>
  <token key="ResolutionType">
    <variant name="Reauth" summary="signing back in (reauth)"/>
    <variant name="Signout" summary="signing out"/>
  </token>
</histogram>

<histogram name="Signin.SigninPending.Resolution{Profile}"
    enum="PendingResolutionSource" expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the resolution method used when in Signin Pending, either Sign in
    (reauth) or sign out of Chrome. The value is recorded when the resolution is
    applied.

    {Profile}
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<histogram name="Signin.SignInPromo.{UserAction}" enum="SigninAccessPoint"
    expires_after="2027-02-07">
  <owner>amelies@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the access point associated with the sign in promo. Recorded when
    the promo is {UserAction} by the user.
  </summary>
  <token key="UserAction">
    <variant name="Accepted" summary="accepted"/>
    <variant name="DismissedCloseButton"
        summary="dismissed using the Close button"/>
    <variant name="DismissedEscapeKey"
        summary="dismissed using the Escape key"/>
  </token>
</histogram>

<histogram name="Signin.SigninStartedAccessPoint{SigninAccountStatus}"
    enum="SigninAccessPoint" expires_after="2027-01-31">
  <owner>msarda@chromium.org</owner>
  <owner>bsazonov@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs the original access point that displayed the signin or reauth Gaia
    page, before the page is displayed. {SigninAccountStatus}

    Note: See also more modern metrics such as Signin.SignIn.Started and
    Signin.SyncOptIn.Started that provide similar insights (but exclude reauth).
    More information about modernization can be found in
    http://go/chrome-signin-metrics-revamp.
  </summary>
  <token key="SigninAccountStatus" variants="SigninAccountStatus">
    <variant name=""/>
  </token>
</histogram>

<histogram name="Signin.SignOut.Completed{Profile}" enum="SigninSignoutProfile"
    expires_after="never">
<!-- expires-never: guiding metric (internal: go/chrome-browser-guiding-metrics) -->

  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <owner>chrome-ds@google.com</owner>
  <improvement direction="LOWER_IS_BETTER"/>
  <summary>
    Records that the user signed out of Chrome, and logs the original access
    point associated with this event. Note that turning off Sync almost always
    signs the user out, in which case both this histogram and
    Signin.SyncTurnOff.Completed are recorded.

    This histogram is of special interest to the chrome-ds@. Do not change its
    semantics or retire it without talking to them first.

    {Profile}
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<histogram name="Signin.SignoutAndClearDataFromManagedAccount"
    enum="BooleanSignoutFromManagedAccount" expires_after="2026-10-04">
  <owner>esalma@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Logs whether a managed user using an unmanaged browser chooses to proceed
    with signout or not, after a warning dialog about data clearing is shown.

    Note: iOS only.
  </summary>
</histogram>

<histogram name="Signin.SignoutProfile" enum="SigninSignoutProfile"
    expires_after="never">
<!-- expires-never: This reports how a profile gets signed out and needs to be
kept as long as profile signout is possible -->

  <owner>msarda@chromium.org</owner>
  <owner>droger@chromium.org</owner>
  <summary>Track how a profile gets signed out.</summary>
</histogram>

<histogram
    name="Signin.SmartAccountSelection.OnSyncPreviewFetched.{BooleanDataPoint}.{AccountIndex}{ProfileIndex}"
    enum="Boolean" expires_after="2027-05-28">
  <owner>rsult@google.com</owner>
  <owner>pmeuleman@google.com</owner>
  <summary>
    Recorded when the sync preview is fetched for a smart account selection.

    Data Point: {BooleanDataPoint}

    {ProfileIndex}

    {AccountIndex}
  </summary>
  <token key="BooleanDataPoint">
    <variant name="HasOtherDevices"
        summary="whether the account has other devices"/>
    <variant name="IsManaged" summary="whether the account is managed"/>
    <variant name="IsPrimary" summary="whether the account is primary"/>
    <variant name="IsSupervised" summary="whether the account is supervised"/>
  </token>
  <token key="ProfileIndex" variants="ProfileIndex"/>
  <token key="AccountIndex" variants="AccountIndex"/>
</histogram>

<histogram
    name="Signin.SmartAccountSelection.OnSyncPreviewFetched{CountDataPoint}.{AccountIndex}{ProfileIndex}"
    units="count" expires_after="2027-05-28">
  <owner>rsult@google.com</owner>
  <owner>pmeuleman@google.com</owner>
  <summary>
    Recorded when the sync preview is fetched for a smart account selection. The
    recorded range and number of buckets vary by data type to match the expected
    scale of that specific data type.

    Data Point: {CountDataPoint}

    {ProfileIndex}

    {AccountIndex}
  </summary>
  <token key="CountDataPoint">
    <variant name=".APP" summary="apps used in Chrome and ChromeOS"/>
    <variant name=".AUTOFILL"
        summary="addresses and more (information entered into online forms
                 like phone numbers and emails)"/>
    <variant name=".AUTOFILL_WALLET_CREDENTIAL"
        summary="autofill wallet credentials"/>
    <variant name=".BOOKMARK" summary="pages bookmarked in Chrome"/>
    <variant name=".DEVICE_INFO" summary="device info"/>
    <variant name=".EXTENSION" summary="extensions from the Chrome Web Store"/>
    <variant name=".PASSWORD"
        summary="passwords and passkeys saved in Google Account"/>
    <variant name=".PREFERENCE" summary="settings in Chrome and ChromeOS"/>
    <variant name=".READING_LIST"
        summary="pages added to reading list in Chrome"/>
    <variant name=".SESSION"
        summary="tabs currently open in Chrome on one of your devices"/>
    <variant name=".THEME" summary="themes from settings or Chrome Web Store"/>
    <variant name=".WALLET_METADATA"
        summary="payment methods (wallet metadata)"/>
  </token>
  <token key="ProfileIndex" variants="ProfileIndex"/>
  <token key="AccountIndex" variants="AccountIndex"/>
</histogram>

<histogram name="Signin.SSOAuth.GetIdentities.ErrorCode"
    enum="MacSecurityFrameworkOSStatus" expires_after="2027-01-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the error code by -[SSOService identitiesWithError:]. See:
    https://crbug.com/981082.
  </summary>
</histogram>

<histogram
    name="Signin.SSOIdentityListRequest.CacheState{SigninSSOIdentityListRequestCacheRequestState}"
    enum="SigninSSOIdentityListRequestCacheState" expires_after="2027-02-07">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the SSO identity cache state before calling -[GCRSSOService
    identitiesWithError:] or -[GCRSSOService identitiesForDisplay]. See:
    https://crbug.com/897470. {SigninSSOIdentityListRequestCacheRequestState}
  </summary>
  <token key="SigninSSOIdentityListRequestCacheRequestState">
    <variant name=".BackgroundRequest"
        summary="Request fetched in background."/>
    <variant name=".FirstRequest"
        summary="First identity request since the application start."/>
    <variant name=".FirstRequestForeground"
        summary="First identity request after coming back to foreground."/>
    <variant name=".ForegroundRequest"
        summary="Request fetched in foreground. Excludes the first request in
                 the current foreground session."/>
  </token>
</histogram>

<histogram
    name="Signin.SSOIdentityListRequest.Duration{SigninSSOIdentityListRequestDurationCacheState}"
    units="ms" expires_after="2027-01-31">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the time it takes to call `GetSSOIdentities()`. See:
    https://crbug.com/897470. {SigninSSOIdentityListRequestDurationCacheState}
  </summary>
  <token key="SigninSSOIdentityListRequestDurationCacheState">
    <variant name=".LocalCacheNotPopulated"
        summary="The ios_internal identity list cache is not populated."/>
    <variant name=".LocalCachePopulated"
        summary="The ios_internal identity list cache is valid."/>
    <variant name=".NotPopulated"
        summary="The SSOAuth identity list cache is not populated."/>
    <variant name=".Stale" summary="The SSOAuth identity list cache is stale."/>
    <variant name=".Valid" summary="The SSOAuth identity list cache is valid."/>
  </token>
</histogram>

<histogram
    name="Signin.SSOIdentityListRequest.FetchIdentitiesWithCallback.Duration"
    units="ms" expires_after="2027-02-07">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the time between -[GCRSSOService fetchIdentitiesWithCallback:] and
    the callback is invoked. See: https://crbug.com/897470.
  </summary>
</histogram>

<histogram name="Signin.SSOWKWebView.GetAllCookies.CookieCount" units="cookies"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Counts the number of cookies returned by -[WKHTTPCookieStore
    getAllCookies:]. This histogram is to help to understand how many callbacks
    from |getAllCookies:| can be missing. And if the number of cookies is
    related in that iOS bug. See: crbug.com/880981.
  </summary>
</histogram>

<histogram name="Signin.SSOWKWebView.GetAllCookies.Duration" units="ms"
    expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Tracks the time it takes for -[WKHTTPCookieStore getAllCookies:] to finish
    and call its callback. Note that nothing is logged is -[WKHTTPCookieStore
    getAllCookies:] fails to calls its callback. This histogram is to help to
    understand how many callbacks from |getAllCookies:| can be missing, related
    to a bug from iOS. And if the number of cookies is related in that iOS bug.
    See: crbug.com/880981.
  </summary>
</histogram>

<histogram name="Signin.SSOWKWebView.GetAllCookies.Request"
    enum="SigninSSOWKWebViewGetAllCookiesRequest" expires_after="2027-04-01">
  <owner>jlebel@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Counts the number of times -[WKHTTPCookieStore getAllCookies:] is called and
    the number of times it calls its callback. This histogram is to help to
    understand how many callbacks from |getAllCookies:| can be missing, related
    to a bug from iOS. And if the number of cookies is related in that iOS bug.
    See: crbug.com/880981.
  </summary>
</histogram>

<histogram name="Signin.SyncButtons.Shown" enum="SyncButtonsType"
    expires_after="2026-11-29">
  <owner>tju@google.com</owner>
  <owner>chrome-kids-team@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the appearance of the button set on sync or history sync opt in
    screens. Recorded when the buttons are displayed to the user.

    Note: On some platforms (eg. Android) that allow selecting account for the
    consent, this is recorded each time that the account is changed and the
    buttons have to be redrawn.
  </summary>
</histogram>

<histogram name="Signin.SyncOptIn.Completed{Profile}" enum="SigninAccessPoint"
    expires_after="2027-02-07">
  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the sync opt-in was completed by the user, and logs the
    original access point associated with this event. This is recorded when the
    user chooses to opt-in, whether they chose to proceed with the default
    settings or to open the sync settings first.

    {Profile}
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<histogram name="Signin.SyncOptIn.IdentityPill.SyncAtShowCount"
    units="ShowCount" expires_after="2026-11-22">
  <owner>ernn@google.com</owner>
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team-desktop@google.com</owner>
  <summary>
    Records the count at which the Sync promo on the Identity Pill was shown
    when the user has successfuly intereacted with it (E.g. successfully turned
    sync). Recorded when that interaction was succesfully made.
  </summary>
</histogram>

<histogram name="Signin.SyncOptIn.Offered" enum="SigninAccessPoint"
    expires_after="2027-01-24">
  <owner>ernn@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the sync opt-in was offered to the user and logs the original
    access point associated with this event. Recorded whenever the sync opt-in
    promo is shown (e.g. in the profile menu).

    Note: This is not recorded for every access point yet.
  </summary>
</histogram>

<histogram name="Signin.SyncOptIn.OpenedSyncSettings" enum="SigninAccessPoint"
    expires_after="2026-10-18">
  <owner>rsult@google.com</owner>
  <owner>dgn@chromium.org</owner>
  <owner>chrome-signin-desktop-team@google.com</owner>
  <summary>
    Records that the user chose to navigate to the sync settings page from the
    sync confirmation screen. Logs this in the context of the access point
    associated with this event.
  </summary>
</histogram>

<histogram name="Signin.SyncOptIn.Started" enum="SigninAccessPoint"
    expires_after="2027-02-14">
  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the sync confirmation screen was shown to the user, and logs
    the access point associated with this event. Note that due to some product
    quirks, this is recorded also when the &quot;sync disabled&quot; screen is
    shown, matching what happens with the completion event. See
    crbug.com/1398463 for more info.
  </summary>
</histogram>

<histogram name="Signin.SyncPaused.ResolutionTime.{ResolutionType}" units="ms"
    expires_after="2027-02-07">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the time spent from entering the Sync Paused state to
    {ResolutionType}. The value is recorded when the resolution method is
    applied.
  </summary>
  <token key="ResolutionType">
    <variant name="Reauth" summary="signing back in (reauth)"/>
    <variant name="Signout" summary="signing out"/>
  </token>
</histogram>

<histogram name="Signin.SyncPromo.{Action}.Count.{AccessPoint}"
    units="impressions" expires_after="2027-02-07">
  <owner>triploblastic@chromium.org</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    This histogram records how many times sync promos have been shown (including
    the current one) across all access points when {Action} the {AccessPoint}
    sync promo (Android Only).
  </summary>
  <token key="Action" variants="SigninPromoAction"/>
  <token key="AccessPoint" variants="SigninPromoAccessPoint"/>
</histogram>

<histogram name="Signin.SyncTurnOff.Completed{Profile}"
    enum="SigninSignoutProfile" expires_after="2027-02-07">
  <owner>bsazonov@chromium.org</owner>
  <owner>dgn@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records that the user turned off sync, and logs the original access point
    associated with this event.

    {Profile}
  </summary>
  <token key="Profile" variants="ProfileIndex"/>
</histogram>

<histogram name="Signin.Timestamps.Android.Fullscreen.{Event}" units="ms"
    expires_after="2027-01-03">
  <owner>samarchehade@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Analogous to MobileFre.FromLaunch.{Event}. The amount of time between when
    the fullscreen signin and history sync promo activity was started and when
    {Event}. Android only.
  </summary>
  <token key="Event">
    <variant name="ActivityInflated"
        summary="the activity is ready to be drawn, although likely empty"/>
    <variant name="LoadCompleted"
        summary="the native code, policies and child account status are
                 loaded"/>
    <variant name="NativeInitialized" summary="the native code is initialized"/>
    <variant name="PoliciesLoaded" summary="policies are loaded"/>
    <variant name="TriggerLayoutInflation"
        summary="layout inflation is triggered"/>
  </token>
</histogram>

<histogram name="Signin.TokenBinding.BoundTokenPrevalence"
    enum="TokenBindingBoundTokenPrevalence" expires_after="2027-01-10">
  <owner>alexilin@chromium.org</owner>
  <owner>ahijazi@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Value indicating how the number of the bound refresh tokens relates to the
    total number of valid refresh tokens. This is recorded each time any tokens
    have been successfully loaded into memory from the database, which typically
    happens on startup.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.BoundToTheSameKey"
    enum="BooleanBoundToTheSameKey" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>ahijazi@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Whether all refresh tokens in a single profile are bound to the same key.
    The expectation is that all tokens should be bound to the same key. This is
    recorded each time any tokens have been successfully loaded into memory from
    the database, which typically happens on startup. Recorded only if at least
    two of the successfully loaded tokens are bound.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.GenerateAssertionResult"
    enum="TokenBindingGenerateAssertionResult" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>ahijazi@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of the assertion generation for a bound token exchange
    request. Recorded at the assertion generation completion, whenever a bound
    refresh token is exchanged for an access token or authentication cookies.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.GenerateRegistrationTokenResult"
    enum="BoundSessionCredentialsRegistrationTokenResult"
    expires_after="2026-12-27">
  <owner>alexilin@chromium.org</owner>
  <owner>ahijazi@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of generating a registration token for obtaining a bound
    refresh token. Recorded every time Chrome attempts to request a bound
    refresh token during Dice signin. This will not be recorded if token binding
    is not supported by either Chrome or GAIA.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.UpgradeDuration" units="ms"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <improvement direction="LOWER_IS_BETTER"/>
  <summary>
    Records the total end-to-end duration required to perform an opportunistic
    refresh token binding upgrade against GAIA servers, including both local
    binding key registration JWT generation and the subsequent network API call.
    When an unbound session refresh token encounters a server challenge during
    access token minting, Chrome initiates this opportunistic upgrade. Recorded
    immediately upon the final completion or abortion of the upgrade flow
    (regardless of success or failure).
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.UpgradeEligibility" enum="Boolean"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether token binding upgrade eligibility flag is enabled when
    starting an access token request. Recorded when an access token request is
    started. Desktop only.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.UpgradeHttpResult"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the network error code or HTTP response status of the opportunistic
    refresh token binding upgrade request sent to GAIA servers. When an unbound
    session refresh token encounters a server challenge during access token
    minting, Chrome initiates this opportunistic upgrade. Recorded immediately
    upon the completion of the upgrade API network call.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.UpgradeRequested" enum="Boolean"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records whether a token binding upgrade was requested by the server upon
    successful completion of an access token request. Recorded when processing a
    successful access token response. Desktop only.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.UpgradeResult"
    enum="OAuth2UpgradeTokenFlowResult" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the overall result of an opportunistic refresh token binding upgrade
    attempt, indicating whether it succeeded, failed due to local registration
    token generation error, or encountered network/server errors. When an
    unbound session refresh token encounters a server challenge during access
    token minting, Chrome initiates this opportunistic upgrade. Recorded upon
    the final completion or abortion of the token upgrade attempt.
  </summary>
</histogram>

<histogram name="Signin.TokenBinding.UpgradeSaveBindingKeyResult"
    enum="TokenBindingUpgradeSaveBindingKeyResult" expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the result of attempting to save a refresh token binding key in
    memory and persist it. Recorded upon receiving the wrapped binding key from
    the opportunistic upgrade token flow. Desktop only.
  </summary>
</histogram>

<histogram name="Signin.TokenTable.GetAllTokensSqlStatementValidity"
    enum="BooleanValid" expires_after="never">
<!-- expires-never: This reports SQL validity statements for loading
authentication refresh tokens from the database and therefore should be kept
for as long as we store refresh tokens in an SQLite DB. -->

  <owner>msarda@chromium.org</owner>
  <summary>
    Counts how many times the SQL statements to get all tokens is valid.
  </summary>
</histogram>

<histogram name="Signin.TokenTable.GetAllTokensTime" units="ms"
    expires_after="2027-04-03">
  <owner>ahijazi@chromium.org</owner>
  <owner>alexilin@chromium.org</owner>
  <owner>msarda@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the raw time spent querying the WebDatabase's 'token_service' table
    and decrypting the retrieved credentials on the database task runner.

    Measures from the moment the database query is executing inside
    TokenWebDataBackend::GetAllTokens, to the execution of SQLite query, up to
    when the tokens are successfully decrypted via OSCrypt. Recorded exactly
    once per profile startup.

    Note: Unlike Signin.RefreshTokensLoaded.Duration, this metric excludes
    thread hopping and in-memory delegate initialization overhead.
  </summary>
</histogram>

<histogram name="Signin.TokenTable.GetAllWrappedBindingKeysResult"
    enum="SigninTokenTableGetAllWrappedBindingKeysResult"
    expires_after="2027-01-17">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Counts the results of loading wrapped binding keys from the token database.
  </summary>
</histogram>

<histogram name="Signin.TokenTable.ReadTokenFromDBResult"
    enum="SigninTokenTableReadTokenFromDBResult" expires_after="never">
<!-- expires-never: This reports health status for loading authentication
refresh tokens from the database and decrypting them and therefore
should be kept for as long as we store refresh tokens in an SQLite DB. -->

  <owner>msarda@chromium.org</owner>
  <summary>
    Counts the results of loading a refresh token from the token database.
  </summary>
</histogram>

<histogram name="Signin.TokenTable.RemoveOtherTokensCount" units="tokens"
    expires_after="2027-02-07">
  <owner>alexilin@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the number of tokens removed from the token database when cleaning
    up unreadable credentials. This cleanup is triggered when updating
    credentials for an account if some tokens failed to load from the database
    earlier in the session (e.g. due to a transient decryption error).
  </summary>
</histogram>

<histogram name="Signin.TokenTable.SetTokenResult"
    enum="SigninTokenTableWriteTokenToDBResult" expires_after="2027-02-07">
  <owner>wfh@chromium.org</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Reports the status of a token write to the SQLite DB. This is reported each
    time a token is written to the SQLite DB.
  </summary>
</histogram>

<histogram name="Signin.WebSignin.SourceToChromeSignin"
    enum="SigninAccessPoint" expires_after="2026-12-16">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the access point of Chrome Sign in when the user was in a web signed
    in only state before with the same account. Recorded when the Chrome Signin
    event occurres.
  </summary>
</histogram>

<histogram name="Signin.WebSignin.TimeToChromeSignin.{AccessPoint}" units="ms"
    expires_after="2027-01-03">
  <owner>rsult@google.com</owner>
  <owner>chrome-signin-team@google.com</owner>
  <summary>
    Records the time spent from being in Web Signin only to signing in to Chrome
    via {AccessPoint}. The value is recorded when signing in to Chrome.
  </summary>
  <token key="AccessPoint">
    <variant name="AddressSigninPromo" summary="the Address Sign-in promo"/>
    <variant name="BookmarkSigninPromo" summary="the Bookmark Sign-in promo"/>
    <variant name="PasswordSigninPromo" summary="the Password Sign-in promo"/>
    <variant name="ProfileMenu" summary="the Profile Menu"/>
  </token>
</histogram>

<!-- LINT.IfChange(WebSignintrackerLatency) -->

<histogram name="Signin.WebSigninTracker.Latency.{Result}" units="ms"
    expires_after="2027-02-07">
  <owner>mlbipin@google.com</owner>
  <owner>chrome-signin-mobile-team@google.com</owner>
  <summary>
    The time taken for an to have cookies minted after a web sign-in or an
    account is added to android. Recorded from the creation of the
    WebSigninTracker until the account is successfully detected in the cookie,
    or until an error or timeout occurs.
  </summary>
  <token key="Result">
    <variant name="AuthError" summary="An auth error occurred"/>
    <variant name="OtherError" summary="An other error occurred"/>
    <variant name="Success" summary="The web sign-in succeeded"/>
    <variant name="Timeout" summary="A timeout occurred"/>
  </token>
</histogram>

<!-- LINT.ThenChange(//components/signin/public/browser/web_signin_tracker.cc:GetHistogramResultSuffix) -->

</histograms>

</histogram-configuration>
