<!--
Copyright 2023 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 Trusted Vault 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="TrustedVault.JavascriptSetClientEncryptionKeysForSecurityDomain"
    enum="SecurityDomainId" expires_after="2024-06-14">
  <owner>mastiz@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <component>Services&gt;Sync</component>
  <summary>
    Records the security domains passed as arguments to the Javascript API
    chrome.setClientEncryptionKeys() on the renderer side (one sample per
    security domain; multiple domains can be passed in one API call). Every
    unrecognized security domain name is recorded as &quot;invalid&quot;.
  </summary>
</histogram>

<histogram name="TrustedVault.JavascriptSetClientEncryptionKeysValidArgs"
    enum="BooleanValid" expires_after="2024-06-14">
  <owner>mastiz@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <component>Services&gt;Sync</component>
  <summary>
    For each invocation of the Javascript API chrome.setClientEncryptionKeys(),
    records whether the passed arguments could be successfully parsed (one
    sample per invocation).
  </summary>
</histogram>

<histogram name="TrustedVault.SetEncryptionKeysForSecurityDomain{ProfileType}"
    enum="SecurityDomainId" expires_after="2024-06-14">
  <owner>mastiz@chromium.org</owner>
  <owner>martinkr@google.com</owner>
  <component>Services&gt;Sync</component>
  <summary>
    Records the security domains passed as arguments to the Javascript API
    chrome.setClientEncryptionKeys() (or chrome.setSyncEncryptionKeys()) on the
    browser side (one sample per passed domain; multiple domains can be passed
    in one API call). Every unrecognized security domain name is recorded as
    &quot;invalid&quot;.

    {ProfileType}
  </summary>
  <token key="ProfileType">
    <variant name=".AllProfiles" summary="All profile types"/>
    <variant name=".OffTheRecordOnly" summary="Off-the-record profiles only"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
