<!--
Copyright 2026 The Chromium Authors
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<histogram-configuration>

<histograms>

<histogram
    name="OneTimeTokens.Actor.AttemptOtpFilling.GmailOtpConfirmationDialogInteraction"
    enum="GmailOtpConfirmationDialogInteraction" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>trangm@google.com</owner>
  <summary>
    Records user interactions with the Gmail OTP confirmation dialog during the
    AttemptOtpFilling tool execution, such as whether permission was granted,
    denied, or if an error occurred. Recorded once when the dialog is requested
    to be shown, when there's an error, the user approves or declines the
    confirmation dialog.
  </summary>
</histogram>

<histogram
    name="OneTimeTokens.Actor.AttemptOtpFilling.GmailOtpOptInCardInteraction"
    enum="GmailOtpOptInCardInteraction" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records user interactions with the Gmail OTP opt-in dialog card during the
    AttemptOtpFilling tool execution, such as whether permission was granted,
    denied, or if an error occurred. Recorded once when the dialog is requested
    to be shown, when there's an error, the user approves or declines the opt-in
    dialog.
  </summary>
</histogram>

<histogram name="OneTimeTokens.Actor.AttemptOtpFilling.PredictedOtpType"
    enum="AttemptOtpFillingPredictedOtpType" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>salmaabdelaziz@google.com</owner>
  <summary>
    Records the OTP type predicted by the model when the AttemptOtpFilling
    action is invoked by the actor. This indicates whether the OTP is expected
    to be an SMS, Email, or from an Authenticator App. Recorded once per tool
    invocation.
  </summary>
</histogram>

<histogram name="OneTimeTokens.Actor.AttemptOtpFilling.ToolInvocation"
    enum="AttemptOtpFillingEvent" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records events during the execution of the AttemptOtpFilling tool by the
    actor, such as the start of an attempt, OTP retrieval status, consent
    checks, and whether OTP filling succeeded or failed. This metric spans
    across the lifecycle methods Validate, TimeOfUseValidation and Invoke.
  </summary>
</histogram>

<histogram name="OneTimeTokens.Actor.AttemptOtpFilling.VerifyIsActorLoginFlow"
    enum="VerifyIsActorLoginFlowEvent" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records whether the OTP frame matches a previous actor login flow. Recorded
    at the start of VerifyOtpFrameOriginMatch invocations, and when matching
    outcomes (e.g. same origin without checker, exact or affiliated matches,
    allowed/disallowed PSL matches, or origin mismatches) are determined.
  </summary>
</histogram>

<histogram name="OneTimeTokens.Actor.OneTimeTokenFillingService.FillOtp"
    enum="ActorOneTimeTokenFillingServiceFillOtpEvent"
    expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records events during OTP filling operations of the
    ActorOneTimeTokenFillingService. Recorded at the start of FillOtp
    invocations, and when filling outcomes or error conditions (e.g. invalid
    tab, missing form structure, or successful fill) are determined.
  </summary>
</histogram>

<histogram name="OneTimeTokens.Actor.OneTimeTokenFillingService.RetrieveOtp"
    enum="ActorOneTimeTokenFillingServiceRetrieveOtpEvent"
    expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records events during OTP retrieval operations of the
    ActorOneTimeTokenFillingService. Recorded at the start of RetrieveOtp
    invocations, and when retrieval outcomes or error conditions (e.g. cache
    hits, mock OTPs, or superseded callbacks) are determined.
  </summary>
</histogram>

<histogram
    name="OneTimeTokens.Actor.OneTimeTokenFillingService.RetrieveOtpCallbackSuperseded"
    enum="ActorOtpRetrieveOtpCallbackSupersededEvent"
    expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records events measuring how often a pending RetrieveOtp callback is
    superseded by a new RetrieveOtp request in ActorOneTimeTokenFillingService.
    Recorded at the start of RetrieveOtp invocations and when a pending callback
    is superseded.
  </summary>
</histogram>

<histogram
    name="OneTimeTokens.GmailOtpRetriever.SenderDomainMatchRejectionReason.Cached"
    enum="GmailOtpSenderDomainMatchRejectionReason" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records the reason why a sender domain match was rejected for a cached OTP
    in GmailOtpRetriever. Recorded only when a token is rejected.
  </summary>
</histogram>

<histogram
    name="OneTimeTokens.GmailOtpRetriever.SenderDomainMatchRejectionReason.Received"
    enum="GmailOtpSenderDomainMatchRejectionReason" expires_after="2027-06-30">
  <owner>ioanap@chromium.org</owner>
  <owner>sdrab@google.com</owner>
  <summary>
    Records the reason why a sender domain match was rejected for a received
    (fresh) OTP in GmailOtpRetriever. Recorded only when a token is rejected.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
