<!--
Copyright 2021 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 WebAuthn histograms
along with a detailed description for each histogram.

For best practices on writing histogram descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md

Please follow the instructions in the OWNERS file in this directory to find a
reviewer. If no OWNERS file exists, please consider signing up at
go/reviewing-metrics (Googlers only), as all subdirectories are expected to
have an OWNERS file. As a last resort you can send the CL to
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<histograms>

<histogram name="WebAuthentication.Android.CredManConditionalRequests"
    enum="CredManGetRequestEnum" expires_after="2024-01-01">
  <owner>derinel@google.com</owner>
  <owner>kenrb@chromium.org</owner>
  <summary>
    Records events for Android Credential Management getCredential API for
    conditional UI requests.
  </summary>
</histogram>

<histogram name="WebAuthentication.Android.CredManCreateRequest"
    enum="CredManCreateRequestEnum" expires_after="2024-01-01">
  <owner>derinel@google.com</owner>
  <owner>kenrb@chromium.org</owner>
  <summary>
    Records events for Android Credential Management createCredential API for
    modal requests.
  </summary>
</histogram>

<histogram name="WebAuthentication.Android.CredManModalRequests"
    enum="CredManGetRequestEnum" expires_after="2024-01-01">
  <owner>derinel@google.com</owner>
  <owner>kenrb@chromium.org</owner>
  <summary>
    Records events for Android Credential Management getCredential API for modal
    requests.
  </summary>
</histogram>

<histogram name="WebAuthentication.Android.CredManPrepareRequest"
    enum="CredManPrepareRequestEnum" expires_after="2024-01-01">
  <owner>derinel@google.com</owner>
  <owner>kenrb@chromium.org</owner>
  <summary>
    Records events for Android Credential Management prepareGetCredential API.
  </summary>
</histogram>

<histogram name="WebAuthentication.Android.CredManPrepareRequestDuration"
    units="ms" expires_after="2024-01-01">
  <owner>derinel@google.com</owner>
  <owner>kenrb@chromium.org</owner>
  <summary>
    Records the duration of Android Credential Management prepareGetCredential
    API.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.AOADiscoveryEvent"
    enum="WebAuthenticationAOADiscoveryEvent" expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records events that happen during the discovery of USB-connected phones.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.DiscoveryEvent"
    enum="WebAuthenticationCableV2DiscoveryEvent" expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records events that happen when listening for a caBLEv2 device.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.MobileEvent"
    enum="WebAuthenticationCableV2MobileEvent" expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records events that occur during a caBLE v2 transaction from the mobile
    side.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.MobileResult"
    enum="WebAuthenticationCableV2MobileResult" expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>Records the outcome of caBLEv2 transactions.</summary>
</histogram>

<histogram name="WebAuthentication.CableV2.PrelinkDataAgeDays" units="days"
    expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>nsatragno@google.com</owner>
  <summary>
    The age, in days, of the caBLE prelink information published by Android
    devices at the time when they upload it to sync. This measurement saturates
    at 31 days and the value 32 indicates that the calculated age was negative.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.RendezvousTime" units="ms"
    expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    The time between the phone connecting to the tunnel server (and thus
    starting its BLE broadcast) to the point where it receives the handshake
    message from the desktop.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.TunnelEvent"
    enum="WebAuthenticationCableV2TunnelEvent" expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records events that occur during the creation of a caBLEv2 tunnel.
  </summary>
</histogram>

<histogram name="WebAuthentication.CableV2.TunnelServerError"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-03-01">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records network and HTTP errors when a tunnel server connection fails. (The
    HTTP error takes precedence if it's available.)
  </summary>
</histogram>

<histogram name="WebAuthentication.ChromeOS.GetAssertionStatus"
    enum="WebAuthenticationChromeOSGetAssertionResult"
    expires_after="2024-03-10">
  <owner>martinkr@google.com</owner>
  <owner>hcyang@google.com</owner>
  <owner>chrome-webauthn@google.com</owner>
  <summary>Records the outcome of GetAssertion on Chrome OS.</summary>
</histogram>

<histogram name="WebAuthentication.ChromeOS.MakeCredentialStatus"
    enum="WebAuthenticationChromeOSMakeCredentialResult"
    expires_after="2024-01-04">
  <owner>martinkr@google.com</owner>
  <owner>hcyang@google.com</owner>
  <owner>chrome-webauthn@google.com</owner>
  <summary>Records the outcome of MakeCredential on Chrome OS.</summary>
</histogram>

<histogram name="WebAuthentication.ChromeOS.StartupRecordCount" units="records"
    expires_after="2024-03-10">
  <owner>martinkr@google.com</owner>
  <owner>chrome-webauthn@google.com</owner>
  <summary>
    Records the number of records of the user's WebAuthn credentials created on
    Chrome OS.
  </summary>
</histogram>

<histogram name="WebAuthentication.ConditionalUiPasskeyCount" units="passkeys"
    expires_after="2024-03-17">
  <owner>kenrb@chromium.org</owner>
  <owner>nsatragno@chromium.org</owner>
  <owner>chrome-webauthn@google.com</owner>
  <summary>
    Records the number of passkeys available for a Conditional UI get request.
  </summary>
</histogram>

<histogram name="WebAuthentication.GetAssertionRequestTransport"
    enum="WebAuthenticationFidoTransport" expires_after="2024-03-17">
  <owner>kenrb@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records the transport used for all WebAuthentication GetAssertion requests
    sent to authenticators. This does not necessarily mean that there was a
    success response from any given authenticator.
  </summary>
</histogram>

<histogram name="WebAuthentication.GetAssertionResponseTransport"
    enum="WebAuthenticationFidoTransport" expires_after="2024-03-17">
  <owner>kenrb@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records the transport used when an authenticator responds with success to a
    WebAuthentication GetAssertion request.
  </summary>
</histogram>

<histogram name="WebAuthentication.IsUVPlatformAuthenticatorAvailable2"
    enum="Boolean" expires_after="2024-03-10">
  <owner>kenrb@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records the result of each Web Authentication
    PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() API
    call.
  </summary>
</histogram>

<histogram name="WebAuthentication.MacOS.PasskeyPermission"
    enum="WebAuthenticationMacOSPasskeysPermission" expires_after="2024-06-14">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records whether Chromium is granted the macOS passkeys permission by users
    when they're prompted for it.
  </summary>
</histogram>

<histogram name="WebAuthentication.MacOS.PlatformAuthenticatorAction"
    enum="WebAuthenticationMacOSPlatformAuthenticatorAction"
    expires_after="2024-06-14">
  <owner>agl@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records events from the macOS platform authenticator. Note that
    &quot;success&quot; events are only recorded for transactions that
    previously recorded a &quot;start&quot; event.
  </summary>
</histogram>

<histogram name="WebAuthentication.MakeCredentialResponseTransport"
    enum="WebAuthenticationFidoTransport" expires_after="2024-03-17">
  <owner>kenrb@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <summary>
    Records the transport used when an authenticator responds with success to a
    WebAuthentication MakeCredential request.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
