<!--
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 Cros 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="Cros.CrOSActionRecorderEvent" enum="CrOSActionRecorderEvent"
    expires_after="2022-05-01">
  <owner>charleszhao@chromium.org</owner>
  <owner>tby@chromium.org</owner>
  <summary>
    This histogram is emitted each time when CrOSAction is recorded by the
    CrOSActionRecorder. For each CrOSAction multiple values can be emitted,
    corresponding to different events happened during the action processing by
    CrOSActionRecorder.
  </summary>
</histogram>

<histogram name="CrosDisks.ArchiveType" enum="CrosDisksArchiveType"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Archive type that the ChromeOS cros-disks daemon is requested to mount.
  </summary>
</histogram>

<histogram name="CrosDisks.DeviceMediaType" enum="CrosDisksDeviceMediaType"
    expires_after="2026-12-27">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Media type of removable device that the ChromeOS cros-disks daemon is
    requested to mount.
  </summary>
</histogram>

<histogram name="CrosDisks.Error.Fuse.PrematureTermination.{FileSystem}"
    enum="DaemonError" expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the FUSE daemon serving the {FileSystem} filesystem when
    it unexpectedly terminated (i.e. before being requested by cros-disks to
    unmount and exit).
  </summary>
  <token key="FileSystem">
    <variant name="archive"/>
    <variant name="drivefs" summary="DriveFS"/>
    <variant name="fuseblk.exfat" summary="FUSE-exFAT"/>
    <variant name="fuseblk.ntfs" summary="FUSE-NTFS"/>
    <variant name="fusebox" summary="Fusebox"/>
    <variant name="rar" summary="RAR"/>
    <variant name="smbfs" summary="SMBFS"/>
    <variant name="sshfs" summary="SSHFS"/>
    <variant name="zip" summary="ZIP"/>
  </token>
</histogram>

<histogram name="CrosDisks.Error.Fuse.Start.archive" enum="FuseArchiveError"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the archive FUSE program when it starts or fails to
    daemonize.
  </summary>
</histogram>

<histogram name="CrosDisks.Error.Fuse.Start.rar" enum="Rar2fsError"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the RAR FUSE program when it starts or fails to daemonize.
  </summary>
</histogram>

<histogram name="CrosDisks.Error.Fuse.Start.zip" enum="FuseZipError"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the ZIP FUSE program when it starts or fails to daemonize.
  </summary>
</histogram>

<histogram name="CrosDisks.Error.Fuse.Start.{FileSystem}" enum="DaemonError"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the {FileSystem} FUSE program when it starts or fails to
    daemonize.
  </summary>
  <token key="FileSystem">
    <variant name="drivefs" summary="DriveFS"/>
    <variant name="fuseblk.exfat" summary="exFAT"/>
    <variant name="fuseblk.ntfs" summary="NTFS"/>
    <variant name="fusebox" summary="Fusebox"/>
    <variant name="smbfs" summary="SMBFS"/>
    <variant name="sshfs" summary="SSHFS"/>
  </token>
</histogram>

<histogram name="CrosDisks.Error.{Action}.{FileSystem}" enum="DaemonError"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the program {Action} {FileSystem} partition.
  </summary>
  <token key="Action">
    <variant name="Format" summary="formatting"/>
    <variant name="Rename" summary="renaming"/>
  </token>
  <token key="FileSystem">
    <variant name="exfat" summary="an exFAT"/>
    <variant name="ntfs" summary="an NTFS"/>
    <variant name="vfat" summary="a FAT"/>
  </token>
</histogram>

<histogram name="CrosDisks.Error.{SysCall}.{FileSystem}" enum="PopularOSErrno"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error encountered by the ChromeOS cros-disks daemon when it tried to
    {SysCall} {FileSystem} filesystem.
  </summary>
  <token key="SysCall">
    <variant name="mount"/>
    <variant name="syncfs" summary="flush"/>
    <variant name="umount" summary="unmount"/>
    <variant name="umount2" summary="detach"/>
  </token>
  <token key="FileSystem">
    <variant name="archive" summary="an archive"/>
    <variant name="drivefs" summary="a DriveFS"/>
    <variant name="exfat" summary="an exFAT"/>
    <variant name="ext2" summary="an ext2"/>
    <variant name="ext3" summary="an ext3"/>
    <variant name="ext4" summary="an ext4"/>
    <variant name="fuseblk.exfat" summary="a FUSE-exFAT"/>
    <variant name="fuseblk.ntfs" summary="a FUSE-NTFS"/>
    <variant name="fusebox" summary="a Fusebox"/>
    <variant name="hfsplus" summary="an HFS+"/>
    <variant name="iso9660" summary="an ISO 9660"/>
    <variant name="ntfs3" summary="an NTFS"/>
    <variant name="rar" summary="a RAR"/>
    <variant name="smbfs" summary="an SMBFS"/>
    <variant name="sshfs" summary="an SSHFS"/>
    <variant name="udf" summary="a UDF"/>
    <variant name="vfat" summary="a FAT"/>
    <variant name="zip" summary="a ZIP"/>
  </token>
</histogram>

<histogram name="CrosDisks.FilesystemType" enum="CrosDisksFilesystemType"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    File system type of external media that the ChromeOS cros-disks daemon is
    requested to mount.
  </summary>
</histogram>

<histogram name="CrosDisks.ReadOnlyFileSystemAfterError"
    enum="CrosDisksFilesystemType" expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    File system type of external media that the ChromeOS cros-disks daemon had
    to mount in read-only mode because there was an error when trying to mount
    them in read-write mode. See crbug.com/1366204.
  </summary>
</histogram>

<histogram name="CrosDisks.StillUnmountingWhenWakingUp" units="items"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Number of removable drives that are still in the process of being unmounted
    when the system wakes up.
  </summary>
</histogram>

<histogram name="CrosDisks.Time.BlockSuspend" units="ms"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time taken to unmount all the removable drives before the system goes to
    sleep.
  </summary>
</histogram>

<histogram name="CrosDisks.Time.Fuse.PrematureTermination.{FileSystem}"
    units="ms" expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time after which the FUSE daemon serving the {FileSystem} filesystem
    unexpectedly terminated (i.e. before being requested by cros-disks to
    unmount and exit).
  </summary>
  <token key="FileSystem">
    <variant name="archive"/>
    <variant name="drivefs" summary="DriveFS"/>
    <variant name="fuseblk.exfat" summary="FUSE-exFAT"/>
    <variant name="fuseblk.ntfs" summary="FUSE-NTFS"/>
    <variant name="fusebox" summary="Fusebox"/>
    <variant name="rar" summary="RAR"/>
    <variant name="smbfs" summary="SMBFS"/>
    <variant name="sshfs" summary="SSHFS"/>
    <variant name="zip" summary="ZIP"/>
  </token>
</histogram>

<histogram name="CrosDisks.Time.Fuse.Start.{FileSystem}" units="ms"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time taken by the {FileSystem} FUSE daemon to start and daemonize.
  </summary>
  <token key="FileSystem">
    <variant name="archive"/>
    <variant name="drivefs" summary="DriveFS"/>
    <variant name="fuseblk.exfat" summary="exFAT"/>
    <variant name="fuseblk.ntfs" summary="NTFS"/>
    <variant name="fusebox" summary="Fusebox"/>
    <variant name="rar" summary="RAR"/>
    <variant name="smbfs" summary="SMBFS"/>
    <variant name="sshfs" summary="SSHFS"/>
    <variant name="zip" summary="ZIP"/>
  </token>
</histogram>

<histogram name="CrosDisks.Time.{Action}.{FileSystem}" units="ms"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>Time taken by the program {Action} {FileSystem} partition.</summary>
  <token key="Action">
    <variant name="Format" summary="formatting"/>
    <variant name="Rename" summary="renaming"/>
  </token>
  <token key="FileSystem">
    <variant name="exfat" summary="an exFAT"/>
    <variant name="ntfs" summary="an NTFS"/>
    <variant name="vfat" summary="a FAT"/>
  </token>
</histogram>

<histogram name="CrosDisks.Time.{SysCall}.{FileSystem}" units="ms"
    expires_after="2027-07-21">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time taken by the ChromeOS cros-disks daemon when it tried to {SysCall}
    {FileSystem} filesystem.
  </summary>
  <token key="SysCall">
    <variant name="mount"/>
    <variant name="syncfs" summary="flush"/>
    <variant name="umount" summary="unmount"/>
    <variant name="umount2" summary="detach"/>
  </token>
  <token key="FileSystem">
    <variant name="archive" summary="an archive"/>
    <variant name="drivefs" summary="a DriveFS"/>
    <variant name="exfat" summary="an exFAT"/>
    <variant name="ext2" summary="an ext2"/>
    <variant name="ext3" summary="an ext3"/>
    <variant name="ext4" summary="an ext4"/>
    <variant name="fuseblk.exfat" summary="a FUSE-exFAT"/>
    <variant name="fuseblk.ntfs" summary="a FUSE-NTFS"/>
    <variant name="fusebox" summary="a Fusebox"/>
    <variant name="hfsplus" summary="an HFS+"/>
    <variant name="iso9660" summary="an ISO 9660"/>
    <variant name="ntfs3" summary="an NTFS"/>
    <variant name="rar" summary="a RAR"/>
    <variant name="smbfs" summary="an SMBFS"/>
    <variant name="sshfs" summary="an SSHFS"/>
    <variant name="udf" summary="a UDF"/>
    <variant name="vfat" summary="a FAT"/>
    <variant name="zip" summary="a ZIP"/>
  </token>
</histogram>

<histogram name="CrosDisksClient.FormatCompletedError"
    enum="CrosDisksClientFormatError" expires_after="2027-01-31">
  <owner>austinct@chromium.org</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the ChromeOS cros-disks daemon when formatting an external
    drive.
  </summary>
</histogram>

<histogram name="CrosDisksClient.FormatTime" units="ms"
    expires_after="2027-01-31">
  <owner>austinct@chromium.org</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time taken by the ChromeOS cros-disks daemon to format an external drive.
  </summary>
</histogram>

<histogram name="CrosDisksClient.MountCompletedError"
    enum="CrosDisksClientMountError" expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the ChromeOS cros-disks daemon when mounting a file
    system.
  </summary>
</histogram>

<histogram name="CrosDisksClient.MountErrorMountType"
    enum="CrosDisksMountTypeError" expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Combination of (mount type, mount error) returned by the ChromeOS cros-disks
    daemon.
  </summary>
</histogram>

<histogram name="CrosDisksClient.MountTime" units="ms"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time taken by the ChromeOS cros-disks daemon to mount a file system.
  </summary>
</histogram>

<histogram name="CrosDisksClient.UnmountError" enum="CrosDisksClientMountError"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Error returned by the ChromeOS cros-disks daemon when unmounting a file
    system.
  </summary>
</histogram>

<histogram name="CrosDisksClient.UnmountTime" units="ms"
    expires_after="2027-02-07">
  <owner>simmonsjosh@google.com</owner>
  <owner>src/ui/file_manager/OWNERS</owner>
  <summary>
    Time taken by the ChromeOS cros-disks daemon to unmount a file system.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
