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

<variants name="Download_Service_CleanUpReason">
  <variant name=".HardRecovery" summary="File is deleted in hard recovery."/>
  <variant name=".Orphaned" summary="No client associated with the file."/>
  <variant name=".Timeout" summary="File is deleted after timeout."/>
  <variant name=".Unknown"
      summary="No database entry associated with the file."/>
</variants>

<variants name="DownloadClient">
  <variant name="__Test__"/>
  <variant name="BackgroundFetch"/>
  <variant name="Bruschetta"/>
  <variant name="Debugging"/>
  <variant name="MountainInternal"/>
  <variant name="OfflinePage"/>
  <variant name="OptimizationGuidePredictionModels"/>
  <variant name="PluginVmImage"/>
</variants>

<variants name="DownloadDangerTypeString">
  <variant name="AllowlistedByPolicy"/>
  <variant name="AsyncLocalPasswordScanning"/>
  <variant name="AsyncScanning"/>
  <variant name="BlockedPasswordProtected"/>
  <variant name="BlockedTooLarge"/>
  <variant name="BlockedUnsupportedFiletype"/>
  <variant name="DangerousAccountCompromise"/>
  <variant name="DangerousContent"/>
  <variant name="DangerousFile"/>
  <variant name="DangerousHost"/>
  <variant name="DangerousURL"/>
  <variant name="DeepScannedFailed"/>
  <variant name="DeepScannedOpenedDangerous"/>
  <variant name="DeepScannedSafe"/>
  <variant name="MaybeDangerousContent"/>
  <variant name="NotDangerous"/>
  <variant name="PotentiallyUnwanted"/>
  <variant name="PromptForLocalPasswordScanning"/>
  <variant name="PromptForScanning"/>
  <variant name="SensitiveContentBlock"/>
  <variant name="SensitiveContentWarning"/>
  <variant name="UncommonContent"/>
  <variant name="UserValidated"/>
</variants>

<variants name="DownloadSource">
  <variant name=".ContextMenu" summary="ContextMenu."/>
  <variant name=".DragAndDrop" summary="DragAndDrop."/>
  <variant name=".ExtensionAPI" summary="ExtensionAPI."/>
  <variant name=".ExtensionInstaller" summary="ExtensionInstaller."/>
  <variant name=".FromRenderer" summary="FromRenderer."/>
  <variant name=".InternalAPI" summary="InternalAPI."/>
  <variant name=".Navigation" summary="Navigation."/>
  <variant name=".OfflinePage" summary="OfflinePage."/>
  <variant name=".Retry" summary="Retry."/>
  <variant name=".RetryFromBubble" summary="RetryFromBubble."/>
  <variant name=".ToolbarMenu" summary="ToolbarMenu."/>
  <variant name=".UnknownSource" summary="UnknownSource."/>
  <variant name=".WebContentsAPI" summary="WebContentsAPI."/>
</variants>

<variants name="DownloadType">
  <variant name=".Transient" summary="Transient download."/>
  <variant name=".UserDownload" summary="User download."/>
</variants>

<variants name="DownloadUrlChainLengthLocation">
  <variant name="CreateDownloadCreateInfo"
      summary="creating DownloadCreateInfo
               (DownloadResponseHandler::CreateDownloadCreateInfo)"/>
  <variant name="CreateResponseHandler"
      summary="creating DownloadResponseHandler
               (DownloadResponseHandler::DownloadResponseHandler)"/>
</variants>

<variants name="TransientType">
  <variant name="NonTransient"/>
  <variant name="Transient"/>
</variants>

<histogram name="Download.Android.NotificationAttachEvent"
    enum="NotificationAttachEvent" expires_after="2026-07-12">
  <owner>qinmin@chromium.org</owner>
  <owner>shaktisahu@chromium.org</owner>
  <summary>
    Records events related to attaching a notification to a download job to keep
    the chrome running during a download. This is recorded either when the
    notification is first attached, or when the job completes while no
    notification is attached. This is only recorded on Android U and above.
  </summary>
</histogram>

<histogram name="Download.Android.OpenDialog.Events"
    enum="OpenDownloadDialogEvent" expires_after="2026-09-20">
  <owner>qinmin@chromium.org</owner>
  <owner>dtrainor@chromium.org</owner>
  <summary>
    Records user interactions with the open download dialog on Android. Records
    when the dialog is shown, or when user clicks on a button or dismisses the
    dialog.
  </summary>
</histogram>

<histogram name="Download.Android.OpenPdfFromDuplicates"
    enum="BooleanOpenFromDuplicates" expires_after="2024-12-31">
  <owner>qinmin@chromium.org</owner>
  <owner>dtrainor@chromium.org</owner>
  <summary>
    Records whether opening a pdf download on Android triggers opening an
    existing downloaded file, instead of creating a new file. This metric is
    only recorded when Chrome enables rendering PDFs inside a tab, and it is
    reorded once each time a PDF is displayed.
  </summary>
</histogram>

<histogram name="Download.Android.ResumedFromNotification"
    enum="DownloadAndroidResumedFromNotificationEvent"
    expires_after="2027-02-13">
  <owner>qinmin@chromium.org</owner>
  <owner>peter@chromium.org</owner>
  <summary>
    Records key lifecycle events (Triggered and Propagated) of download
    resumptions initiated from notification click interactions. Measured on
    Android.
  </summary>
</histogram>

<histogram name="Download.Android.ResumedFromNotification.LoadDuration"
    units="ms" expires_after="2027-02-13">
  <owner>qinmin@chromium.org</owner>
  <owner>peter@chromium.org</owner>
  <summary>
    Records the time elapsed from the user clicking the 'Resume' button on a
    download notification to when the browser successfully loads and initiates
    the download resumption. Measured on Android.
  </summary>
</histogram>

<histogram name="Download.Android.WarningBypassDialog.Events"
    enum="AndroidDownloadWarningBypassDialogEvent" expires_after="2027-02-07">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records events and user interactions with the download warning bypass dialog
    on Android. Records when the dialog is shown, or when the user takes an
    action or dismisses the dialog.
  </summary>
</histogram>

<histogram name="Download.ApiFunctions" enum="DownloadFunctions"
    expires_after="2027-01-05">
  <owner>dtrainor@chromium.org</owner>
  <owner>xinghuilu@chromium.org</owner>
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Downloads extension API function calls. Warning: this histogram was expired
    from 2020-03-08 to 2022-08-02 and 2026-07-05 to 2026-08-04; data may be
    missing.
  </summary>
</histogram>

<histogram name="Download.AttachmentServices.Duration" units="ms"
    expires_after="never">
<!-- expires-never: Monitors downloads system health -->

  <owner>dtrainor@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Time taken to invoke IAttachmentExecute::Save() excluding the time taken to
    instantiate CLSID_AttachmentServices. Warning: this histogram was expired
    from 2020-02-23 to 2023-01-30; data may be missing.
  </summary>
</histogram>

<histogram name="Download.BandwidthOverallBytesPerSecond2" units="bytes/second"
    expires_after="2027-01-24">
  <owner>qinmin@chromium.org</owner>
  <summary>
    Overall bandwidth seen for a completed download. This includes all file
    downloads going through the download subsystem, but excludes all the page
    saves. Note that this is measured at the point at which the file is written,
    and so will not take into account the time costs of activities that occur
    after file write is completed (e.g. safe browsing scanning). The maximum
    bucket range is 200Mbps.
  </summary>
</histogram>

<histogram name="Download.Blocked.ContentType.Automotive"
    enum="DownloadContentType" expires_after="2025-07-01">
  <owner>twellington@chromium.org</owner>
  <owner>clhager@google.com</owner>
  <summary>
    Records the content type of downloads that have been blocked on automotive,
    as Chrome on automotive blocks any downloads that cannot be viewed natively
    in Chrome.
  </summary>
</histogram>

<histogram name="Download.Bubble.ProcessedCommand2" enum="DownloadCommand"
    expires_after="2027-02-01">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records each time a download command is executed on download bubble. It is
    logged when a quick action is clicked on the primary view or a button or
    link is clicked on the security subpage. Actions on context menu are
    excluded. Clicking the trasparent button is also excluded. This histogram
    replaced Download.Bubble.ProcessedCommand in M120 due to the enum being
    incorrectly numbered.

    Warning: this histogram was expired from 2025-09-14 to 2026-01-27; data may
    be missing.
  </summary>
</histogram>

<histogram name="Download.Bubble.ToolbarButtonClickToFullViewShownLatency"
    units="ms" expires_after="2024-10-16">
  <owner>kerenzhu@chromium.org</owner>
  <owner>robliao@chromium.org</owner>
  <summary>
    Measures the time (in ms) from download toolbar button click to when
    Download Bubble full view becomes visible. Recorded only for Desktop
    platforms, where Download Bubble is enabled.
  </summary>
</histogram>

<histogram name="Download.CancelReason" enum="DownloadCancelReason"
    expires_after="2023-10-08">
  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>Records why the download is canceled.</summary>
</histogram>

<histogram name="Download.ContentType.Audio" enum="DownloadAudioType"
    expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>Types of audio files that are downloaded.</summary>
</histogram>

<histogram name="Download.ContentType.Image" enum="DownloadImageType"
    expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>dtrainor@chromium.org</owner>
  <summary>Types of images that are downloaded.</summary>
</histogram>

<histogram name="Download.ContentType.Text" enum="DownloadTextType"
    expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>Types of text files that are downloaded.</summary>
</histogram>

<histogram name="Download.ContentType.Video" enum="DownloadVideoType"
    expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>Types of video files that are downloaded.</summary>
</histogram>

<histogram name="Download.ContextMenuAction" enum="DownloadUiContextMenuAction"
    expires_after="2026-10-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This histogram is used to record the different actions and events associated
    with the download UI context menu on desktop platforms, which can be shown
    through interacting with the download bubble. This metric records when the
    dropdown button was clicked as well when DownloadCommands were enabled or
    executed. Each action or enable event is only emitted once; as a result, it
    is safe to compute a ratio by dividing enabled events by clicked events.
  </summary>
</histogram>

<histogram name="Download.Counts.{ParallelizableDownload}"
    enum="DownloadCountType" expires_after="2027-01-10">
  <owner>shaktisahu@chromium.org</owner>
  <owner>yawfrempong@google.com</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Various individual counts in the download system; see DownloadCountType for
    details. {ParallelizableDownload}

    Warning: this histogram was expired from 2025-11-16 to 2026-04-12; data may
    be missing.
  </summary>
  <token key="ParallelizableDownload">
    <variant name="ParallelDownload"
        summary="Download that uses parallel requests."/>
    <variant name="ParallelizableDownload"
        summary="Download that supports but doesn't use parallel requests."/>
  </token>
</histogram>

<histogram name="Download.DangerousDialog.Events"
    enum="DangerousDownloadDialogEvent" expires_after="2027-01-03">
  <owner>qinmin@chromium.org</owner>
  <summary>
    Records user interactions with the dangerous download dialog on Android.
    Records when the dialog is shown, or when user clicks on a button or
    dismisses the dialog.
  </summary>
</histogram>

<histogram name="Download.Database.IsAvailable" enum="BooleanAvailable"
    expires_after="never">
<!-- expires-never: Helpful to track download database issue. -->

  <owner>qinmin@chromium.org</owner>
  <summary>
    Records whether the download database is available when database startup
    completes, before starting any pending downloads. If the database is
    available, it will provide the next download id. Or no download history will
    be persisted.
  </summary>
</histogram>

<histogram name="Download.DOMEvent" enum="DownloadDOMEvent"
    expires_after="2026-04-12">
  <owner>dtrainor@chromium.org</owner>
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    User actions in chrome://downloads. Warning: this histogram was expired from
    M77 to 2022-09-20; data may be missing.
  </summary>
</histogram>

<histogram
    name="Download.DownloadDangerPrompt.{DownloadDangerTypeString}.{Action}"
    enum="SBClientDownloadExtensions" expires_after="2027-01-03">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records when user {Action} while attempting to recover a blocked download
    from chrome://downloads, for a file of type {DownloadDangerTypeString}. This
    is logged from both old the native UI DownloadDangerPrompt as well as its
    replacement WebUI prompt DownloadBypassWarningConfirmationDialog (under the
    ImprovedDownloadPageWarnings feature).
  </summary>
  <token key="Action">
    <variant name="Proceed" summary="decided to bypass warning and proceed"/>
    <variant name="Shown" summary="was shown the dialog"/>
  </token>
  <token key="DownloadDangerTypeString" variants="DownloadDangerTypeString"/>
</histogram>

<histogram name="Download.DownloadSize{Download_Parallelizable}" units="KB"
    expires_after="never">
<!-- expires-never: Used for long term download system health monitoring. -->

  <owner>dtrainor@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The size of successfully completed downloads. {Download_Parallelizable}
  </summary>
  <token key="Download_Parallelizable">
    <variant name=".Parallelizable" summary="Parallelizable download."/>
  </token>
</histogram>

<histogram name="Download.DuplicatePdfDownloadTriggered"
    enum="BooleanOpenInline" expires_after="2026-12-27">
  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records whether a download is a duplicate when user triggers a pdf download.
    This is logged when the download starts, and is only recorded on Android.
    The value logs whether the pdf will be opened inline.
  </summary>
</histogram>

<histogram name="Download.HttpResponseCode{BackgroundDownload}"
    enum="HttpResponseCode" expires_after="never">
<!-- expires-never: Used to monitor download system health. -->

  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The count of HTTP Response codes for download requests. {BackgroundDownload}
  </summary>
  <token key="BackgroundDownload">
    <variant name=""/>
    <variant name=".BackgroundDownload"
        summary="Download that started in background."/>
  </token>
</histogram>

<histogram name="Download.Incognito.Message" enum="IncognitoMessageEvent"
    expires_after="2023-06-30">
  <owner>tommasin@chromium.org</owner>
  <owner>chrome-incognito@google.com</owner>
  <summary>
    Records the clicks on Incognito download message in Android, when users
    click download or dismiss the message.
  </summary>
</histogram>

<histogram name="Download.InputStreamReadError"
    enum="DownloadInputStreamReadErrorType" expires_after="2024-01-14">
  <owner>qinmin@chromium.org</owner>
  <owner>shaktisahu@chromium.org</owner>
  <summary>
    Records errors when reading from the mojo input stream before a download
    completes.
  </summary>
</histogram>

<histogram name="Download.InsecureBlocking.Totals"
    enum="InsecureDownloadSecurityStatus" expires_after="2025-01-26">
  <owner>jdeblasio@chromium.org</owner>
  <owner>estark@chromium.org</owner>
  <owner>cthomp@chromium.org</owner>
  <summary>
    Records security state of downloads to support analysis for mixed content
    file download blocking.
  </summary>
</histogram>

<histogram name="Download.InterruptedReason.ParallelDownload"
    enum="InterruptReason" expires_after="never">
<!-- expires-never: Core download metrics, used in go/chrome-download-dashboard. -->

  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>The reason that a parallel download was interrupted.</summary>
</histogram>

<histogram name="Download.InterruptedReason{DownloadSource}"
    enum="InterruptReason" expires_after="never">
<!-- expires-never: Core download metrics, used in go/chrome-download-dashboard. -->

  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The reason that a download was interrupted. {DownloadSource}
  </summary>
</histogram>

<histogram name="Download.Interstitial.UIAction"
    enum="DownloadInterstitialUIAction" expires_after="2026-12-08">
  <owner>alexmitra@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records any user action taken within a download interstitial. Download
    interstitials are shown only on Android inside CCTs.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadAppleWalletOrderFileUI"
    enum="DownloadAppleWalletOrderFileUI" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Result when the warning alert is presented before downloading a .order file
    on iOS. Values indicate if the user has continued the download workflow
    after the presentation of the warning alert. The histogram will be emitted
    once upon presentation of the alert, and a second time when the user
    dismisses the alert by performing one of the alert actions.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadARModelState.USDZ"
    enum="DownloadARModelState" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Logged at different stages of downloading a USDZ MIME type AR model on iOS.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadBundledPassKitResult"
    enum="DownloadPassKitResult" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Recorded when a user attempts to download a bundled PassKit file on iOS.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadCalendarFileUI"
    enum="DownloadCalendarFileUI" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Result when the warning alert is presented before downloading a .ics file on
    iOS. Values indicate if the user has continued the download workflow after
    the presentation of the warning alert.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadedFileAction" enum="DownloadedFileAction"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    The action that a user takes on a file after it has been successfully
    downloaded on iOS.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadedFileNetError" enum="NetErrorCodes"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Positive net error codes that happen in the case of download content fetch
    failure.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadFileInBackground"
    enum="DownloadFileInBackground" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Logged when the download is completed (successfully or not) or in-progress
    download was cancelled because of the app termination. This histogram
    includes information whether the download was successful and whether or not
    the download task was running while the app was active.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadFileResult" enum="DownloadFileResult"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>Result when a user attempts to download a file on iOS.</summary>
</histogram>

<histogram name="Download.IOSDownloadFileUI" enum="DownloadFileUI"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Result when a user attempts to present the download UI on iOS. Looged when
    download is created.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadFileUIGoogleDrive"
    enum="DownloadFileUIGoogleDrive" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Result when the download UI is prexsented on iOS. Values indicate if Google
    Drive is installed and whether or not Install Google Drive promo was shown.
    Logged when download is updated.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadMimeType" enum="DownloadMimeTypeResult"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    MIME type of a download response. Logged when the download UI was offered by
    the browser to the user.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadMobileConfigFileUI"
    enum="DownloadMobileConfigFileUI" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Result when the warning alert is presented before downloading a
    .mobileconfig file on iOS. Values indicate if the user has continued the
    download workflow after the presentation of the warning alert.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadOpenInHasFilePath" enum="Boolean"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Whether the download file path was ready when the user tapped &quot;Open
    in...&quot; from the download manager.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadPassKitResult"
    enum="DownloadPassKitResult" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Recorded when a user attempts to download a PassKit file on iOS.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadReplaced" enum="BooleanReplaced"
    expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    The user discarded in-progress download and replaced with the new one. Only
    recorded after the user interacts with a dialog offering the choice between
    replacing an in-progress download versus downloading separately to a new
    filename.
  </summary>
</histogram>

<histogram name="Download.IOSPresentAddPassesDialogResult"
    enum="PresentAddPassesDialogResult" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>Result of an attempt to present Add Passes dialog on iOS.</summary>
</histogram>

<histogram name="Download.IOSPresentQLPreviewControllerResult"
    enum="PresentQLPreviewController" expires_after="2027-07-22">
  <owner>qpubert@google.com</owner>
  <owner>olivierrobin@chromium.org</owner>
  <owner>bling-squid-squad@google.com</owner>
  <summary>
    Result when a user attempts to present a USDZ MIME type AR model on iOS.
  </summary>
</histogram>

<histogram name="Download.Later.ScheduledDownloadSize" units="Mb"
    expires_after="2022-05-01">
  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The size of downloads when the user tries to download at a scheduled time.
    Recorded when the positive button in download later dialog is clicked.
  </summary>
</histogram>

<histogram name="Download.Later.UI.DialogChoice{DownloadDialogSource}"
    enum="DownloadLaterDialogChoice" expires_after="2022-10-09">
  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The user selection in the download later dialog. Recorded when the user
    starts a download, or clicking the change button on download infobar and
    download home UI. {DownloadDialogSource}
  </summary>
  <token key="DownloadDialogSource">
    <variant name=".DownloadHome" summary="Download home."/>
    <variant name=".Infobar" summary="Download infobar."/>
    <variant name=".Main" summary="Main download later dialog."/>
  </token>
</histogram>

<histogram name="Download.Later.UI.Events" enum="DownloadLaterUiEvent"
    expires_after="2022-10-16">
  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records events for download later feature in download Android UI.
  </summary>
</histogram>

<histogram name="Download.MediaMetadata.Event" enum="MediaMetadataEvent"
    expires_after="never">
<!-- expires-never: Download media parser stability metrics. -->

  <owner>dtrainor@chromium.org</owner>
  <owner>qinmin@chromium.org</owner>
  <summary>Records events for local media metadata parsing.</summary>
</histogram>

<histogram name="Download.MediaParser.Event" enum="MediaParserEvent"
    expires_after="never">
<!-- expires-never: Download media parser stability metrics. -->

  <owner>dtrainor@chromium.org</owner>
  <owner>qinmin@chromium.org</owner>
  <summary>
    Records events when using media parser to analyze local media files.
  </summary>
</histogram>

<histogram name="Download.Memory.UrlChainLength.{Location}" units="count"
    expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Records the number of URLs in the URL chain (url_chain_ member of
    DownloadResponseHandler) when {Location}.
  </summary>
  <token key="Location" variants="DownloadUrlChainLengthLocation"/>
</histogram>

<histogram name="Download.Memory.UrlChainSizeKb.{Location}" units="KB"
    expires_after="2027-02-07">
  <owner>fdoray@chromium.org</owner>
  <owner>catan-team@chromium.org</owner>
  <summary>
    Records the estimated memory usage of the URL chain (url_chain_ member of
    DownloadResponseHandler) in KB when {Location}.
  </summary>
  <token key="Location" variants="DownloadUrlChainLengthLocation"/>
</histogram>

<histogram name="Download.NetworkConnectionType.StartNew{DownloadSource}"
    enum="NetworkConnectionType" expires_after="2023-06-04">
  <owner>dtrainor@chromium.org</owner>
  <summary>
    Network connection type when starting a new download. {DownloadSource}
  </summary>
</histogram>

<histogram name="Download.NonDangerousDialog.Events"
    enum="DangerousDownloadDialogEvent" expires_after="2027-02-07">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records user interactions with the non-dangerous download dialog on Android.
    Records when the dialog is shown, or when user clicks on a button or
    dismisses the dialog.
  </summary>
</histogram>

<histogram name="Download.OpenDownloads.OpenWithExternalAppsSource"
    enum="OpenDownloadWithExternalAppsSource" expires_after="2026-12-01">
  <owner>shuyng@google.com</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records the source when download is forwarding from Chrome to an external
    app to open. Recorded when the view intent is handled; even if the intent
    picker is dismissed. Only record when there is an app to handle the intent.
    Logged on Android only.
  </summary>
</histogram>

<histogram name="Download.OpenDownloads.PerProfileType"
    enum="BrowserProfileType" expires_after="2026-01-18">
  <owner>sideyilmaz@chromium.org</owner>
  <owner>chrome-incognito@google.com</owner>
  <summary>
    Records the profile type for opening the Downloads page. This may be
    triggered by different entry points like mobile menu, notification or info
    bar.
  </summary>
</histogram>

<histogram name="Download.OpenDownloadsFromMenu.PerProfileType"
    enum="BrowserProfileType" expires_after="2024-06-30">
  <owner>sideyilmaz@chromium.org</owner>
  <owner>chrome-incognito@google.com</owner>
  <summary>
    Records the profile type for opening the Downloads page from menu.
  </summary>
</histogram>

<histogram name="Download.OpenMethod" enum="DownloadOpenMethod"
    expires_after="never">
<!-- expires-never: part of top-line metric (internal: go/chrome-browser-nsm) -->

  <owner>dtrainor@chromium.org</owner>
  <owner>chrome-analysis-team@google.com</owner>
  <summary>
    Invocation count for methods of opening a download. For some file types,
    Chrome defaults to opening the file in the browser instead of invoking the
    system handler. The user has the option of overriding this behavior.

    This histogram is of special interest to the chrome-analysis-team@. Do not
    change its semantics or retire it without talking to them first.
  </summary>
</histogram>

<histogram name="Download.PathGenerationEvent{DownloadType}"
    enum="DownloadPathGenerationEvent" expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The download path generation behavior which happens before download path
    validation in download target determination process. {DownloadType}
  </summary>
</histogram>

<histogram name="Download.PathValidationResult{DownloadType}"
    enum="DownloadPathValidationResult" expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The download path validation result before the final download target is
    determined. {DownloadType}
  </summary>
</histogram>

<histogram name="Download.PolicyWarningDialog.Events"
    enum="PolicyWarningDialogEvent" expires_after="2026-12-01">
  <owner>qinmin@chromium.org</owner>
  <summary>
    Records user interactions with the policy warning dialog on Android. Records
    when the dialog is shown, or when user clicks on a button or dismisses the
    dialog.
  </summary>
</histogram>

<histogram name="Download.Progress.InfoBar.Shown"
    enum="DownloadInfoBar.ShownState" expires_after="2027-02-07">
  <owner>yawfrempong@google.com</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records various types of messages representing the state of the downloads as
    they are shown on the download progress infobar on android.

    Warning: this histogram was expired from 2023-06-25 to 2026-12-04; data may
    be missing.
  </summary>
</histogram>

<histogram name="Download.Service.Complete.FileSize.{DownloadClient}"
    units="KB" expires_after="never">
<!-- expires-never: Download service stability metric. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@chromium.org</owner>
  <summary>
    The file size of completed background download. Recorded when background
    downloads are finished.
  </summary>
  <token key="DownloadClient" variants="DownloadClient">
    <variant name=""/>
  </token>
</histogram>

<histogram name="Download.Service.Db.Operation.Failure"
    enum="Download.Service.ModelAction" expires_after="never">
<!-- expires-never: Monitor background download system database stability. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>Records a failed database operation.</summary>
</histogram>

<histogram name="Download.Service.Db.Operation.Success"
    enum="Download.Service.ModelAction" expires_after="never">
<!-- expires-never: Monitor background download system database stability. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>Records a successful database operation.</summary>
</histogram>

<histogram name="Download.Service.Db.Records{Download_Service_EntryState}"
    units="records" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The total number of database records used by download service, and the
    number of records in each entry state. {Download_Service_EntryState}
  </summary>
  <token key="Download_Service_EntryState">
    <variant name=".Active" summary="The active state."/>
    <variant name=".Available" summary="The available state."/>
    <variant name=".Complete" summary="The complte state."/>
    <variant name=".New" summary="The initial state."/>
    <variant name=".Paused" summary="The paused state."/>
  </token>
</histogram>

<histogram name="Download.Service.Driver.InterruptReason"
    enum="InterruptReason" expires_after="never">
<!-- expires-never: Monitor background download system errors. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The interrupt reason for failed downloads in download service.
  </summary>
</histogram>

<histogram name="Download.Service.Entry.Event"
    enum="Download.Service.EntryEvent" expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>dtrainor@chromium.org</owner>
  <owner>shaktisahu@chromium.org</owner>
  <summary>
    An action the download service took on an active download. Note that this
    histogram was expired between M88 and 2023-03-03.
  </summary>
</histogram>

<histogram name="Download.Service.Entry.RetryCount" units="attempts"
    expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>dtrainor@chromium.org</owner>
  <owner>shaktisahu@chromium.org</owner>
  <summary>
    Records how many attempts have taken place at the time of a retry for a
    download in the Download Service. This differs from
    Download.Service.Entry.ResumptionCount, which records resumptions not
    complete restarts. Note that this histogram was expired between M88 and
    2023-03-03.
  </summary>
</histogram>

<histogram
    name="Download.Service.Files.CleanUp.External{Download_Service_CleanUpReason}"
    units="files" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The number of files that have been deleted by external application or the
    user, when performing clean up tasks in download service.
    {Download_Service_CleanUpReason}
  </summary>
</histogram>

<histogram
    name="Download.Service.Files.CleanUp.Failure{Download_Service_CleanUpReason}"
    units="attempts" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The number of failed file deletion attempts, when performing clean up tasks
    in download service. {Download_Service_CleanUpReason}
  </summary>
</histogram>

<histogram
    name="Download.Service.Files.CleanUp.Success{Download_Service_CleanUpReason}"
    units="files" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The number of files successfully deleted, when performing clean up tasks in
    download service. {Download_Service_CleanUpReason}
  </summary>
</histogram>

<histogram name="Download.Service.Files.DirCreationError"
    enum="PlatformFileError" expires_after="never">
<!-- expires-never: Download service stability metric. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The error code when failed to create the download directory.
  </summary>
</histogram>

<histogram name="Download.Service.Files.LifeTime" units="ms"
    expires_after="never">
<!-- expires-never: Download service stability metric. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The lifestime of a download file, which begins from the download completion
    to the file being deleted by the clean up task.
  </summary>
</histogram>

<histogram name="Download.Service.Finish.Type"
    enum="Download.Service.CompletionType" expires_after="2023-08-27">
  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>The completion type for downloads in download service.</summary>
</histogram>

<histogram name="Download.Service.OnUploadDataReceived.PauseReason"
    enum="Download.Service.PauseReason" expires_after="never">
<!-- expires-never: Used for detecting anomalies in background download service. -->

  <owner>shaktisahu@chromium.org</owner>
  <summary>
    The reason for suspending a download right after the upload data is received
    from the client. Every pause will result in two entries in the histogram:
    ANY and a more specific reason.
  </summary>
</histogram>

<histogram name="Download.Service.PauseReason"
    enum="Download.Service.PauseReason" expires_after="never">
<!-- expires-never: Used for detecting anomalies in background download service. -->

  <owner>shaktisahu@chromium.org</owner>
  <summary>
    The reason for pausing an in-progress download. Every pause will result in
    two entries in the histogram: ANY and a more specific reason.
  </summary>
</histogram>

<histogram
    name="Download.Service.Request.ClientAction{Download_Service_Client}"
    enum="Download.Service.ServiceApiAction" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records the API calls on download service. {Download_Service_Client}
  </summary>
  <token key="Download_Service_Client">
    <variant name=".BackgroundFetch" summary="Background fetch."/>
    <variant name=".Debugging" summary="Debugging client."/>
    <variant name=".MountainInternal" summary="Mountain internal client."/>
    <variant name=".OfflinePage" summary="Offline page prefetch."/>
    <variant name=".OptimizationGuidePredictionModels"
        summary="Optimization Guide prediction models."/>
    <variant name=".PluginVmImage" summary="PluginVm image."/>
  </token>
</histogram>

<histogram name="Download.Service.StartUpStatus{Download_Service_StartUpStep}"
    enum="Download.Service.StartUpResult" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The start up result of the download service. {Download_Service_StartUpStep}
  </summary>
  <token key="Download_Service_StartUpStep">
    <variant name=".Initialization"
        summary="The initialization start up step."/>
    <variant name=".Recovery" summary="The recovery start up step."/>
  </token>
</histogram>

<histogram
    name="Download.Service.TaskScheduler.Status{Download_Service_TaskType}"
    enum="Download.Service.ScheduledTaskStatus" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The platform background tasks used by download service will invoke native
    functions after being scheduled. The tasks may be aborted or canceled. This
    metric records the status of background tasks when native functions are
    invoked. {Download_Service_TaskType}
  </summary>
  <token key="Download_Service_TaskType">
    <variant name=".CleanUpTask" summary="Clean up task."/>
    <variant name=".DownloadTask" summary="Download task."/>
  </token>
</histogram>

<histogram name="Download.Shelf.DragInfo" enum="Download.DragInfo"
    expires_after="2023-11-22">
  <owner>chlily@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This tracks drag events on a complete download on the shelf, and also
    general download completion on the shelf as a point of reference.
  </summary>
</histogram>

<histogram name="Download.ShowedDownloadWarning" enum="DownloadItem.DangerType"
    expires_after="never">
<!-- expires-never: Monitors warning bypass rate. -->

  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    A download warning was shown in the shelf/bubble. Note that some downloads
    may not be shown on the shelf, e.g., if a download is not new, is transient,
    or if the shelf is disabled by an extension using the Downloads API.
    Similarly, the bubble also does not show transient downloads. Grouped by the
    type of danger. This histogram is logged on ChromeOS since M93.

    This metric is used to populate a dashboard on go/crsb-site.
  </summary>
</histogram>

<histogram name="Download.ShowedDownloadWarning.DownloadsPage"
    enum="DownloadItem.DangerType" expires_after="2027-02-01">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    A download warning was shown on the chrome://downloads page. This is logged
    once per dangerous or suspicious download, when it is shown for the first
    time on chrome://downloads, once per Chrome session (i.e. may be logged
    again after Chrome restarts). Value logs the type of danger.

    Note: This histogram is recorded each time a warning is shown for a
    download, even when attempting to download the same file.

    Warning: this histogram was expired from 2025-09-08 to 2026-01-27; data may
    be missing.
  </summary>
</histogram>

<histogram name="Download.SourcesChrome" enum="ChromeDownloadSource"
    expires_after="never">
<!-- expires-never: Monitors download system health. -->

  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    The initiation source (if initiated within the above-content layer of
    chrome) for a download.
  </summary>
</histogram>

<histogram name="Download.Start.ContentType" enum="DownloadContentType"
    expires_after="2026-12-27">
  <owner>shaktisahu@chromium.org</owner>
  <owner>drubery@chromium.org</owner>
  <summary>
    Content types of the downloads. This histogram is logged when a download is
    started. Logged on Desktop platforms. Warning: This histogram had expired
    from M85 to M106, data may be missing.
  </summary>
</histogram>

<histogram name="Download.Start.ContentType.NormalProfile"
    enum="DownloadContentType" expires_after="2025-07-13">
  <owner>shaktisahu@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Content types of the downloads that are started in non-incognito profile.
    This histogram is logged when a download is started. Logged on Desktop
    platforms. Warning: This histogram had expired from 2022-05-01 to
    2022-08-15, data may be missing.
  </summary>
</histogram>

<histogram name="Download.Start.ContentType.NormalProfile.{TransientType}"
    enum="DownloadContentType" expires_after="2025-01-31">
  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records content types of the downloads that are started in non-incognito
    profile, divided by whether the download is transient. This histogram is
    logged when a download is started. Logged on Android only.
  </summary>
  <token key="TransientType" variants="TransientType"/>
</histogram>

<histogram name="Download.Start.ContentType.{TransientType}"
    enum="DownloadContentType" expires_after="2027-01-03">
  <owner>qinmin@chromium.org</owner>
  <owner>clank-downloads@google.com</owner>
  <summary>
    Records content types of the downloads, divided by whether the download is
    transient. This histogram is logged when a download is started. Logged on
    Android only.
  </summary>
  <token key="TransientType" variants="TransientType"/>
</histogram>

<histogram name="Download.Start.PerProfileType" enum="BrowserProfileType"
    expires_after="2026-03-15">
  <owner>sideyilmaz@chromium.org</owner>
  <owner>chrome-incognito@google.com</owner>
  <summary>
    The browser profile type for each download started, recorded just after
    download successfully started.
  </summary>
</histogram>

<histogram name="Download.UserValidatedDangerousDownload"
    enum="DownloadItem.DangerType" expires_after="never">
<!-- expires-never: Monitors warning bypass rate. -->

  <owner>drubery@chromium.org</owner>
  <owner>chrome-safebrowsing-team@chromium.org</owner>
  <summary>
    User chose to save a download which was marked dangerous. Grouped by the
    type of danger.

    This metric is used to populate a dashboard on go/crsb-site.
  </summary>
</histogram>

<histogram name="Download.UserValidatedDangerousDownload.DownloadsPage"
    enum="DownloadItem.DangerType" expires_after="2027-03-02">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    User chose to save a download which was marked dangerous or suspicious from
    the chrome://downloads page, or the bypass prompt triggered from there.
    Value logs the type of danger.
  </summary>
</histogram>

<histogram name="Download.VideoThumbnail.Event" enum="VideoThumbnailEvent"
    expires_after="never">
<!-- expires-never: Download media parser stability metrics. -->

  <owner>dtrainor@chromium.org</owner>
  <owner>qinmin@chromium.org</owner>
  <summary>Records events for local video thumbnail retrieval.</summary>
</histogram>

<histogram name="Download.WarningData.ActionAdded" enum="DownloadWarningAction"
    expires_after="2026-11-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the warning action that is successfully added in warning action
    event. Logged each time an action is taken on the download warning. For the
    SHOWN action, only logged for the first time. Not logged if the action is
    not added because the first warning is missing or the events have exceeded
    the max length.
  </summary>
</histogram>

<histogram name="Download.WarningData.AddWarningActionEventOutcome2"
    enum="DownloadAddWarningActionEventOutcome" expires_after="2026-10-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a download warning action event was sent, or if not, then
    why not. Logged each time an action is taken on the download warning.
    Version 2 was introduced to log NOT_ADDED_DOWNLOAD_NOT_DANGEROUS.
  </summary>
</histogram>

<histogram name="Download.WarningData.SurfaceWithoutWarningShown"
    enum="DownloadWarningSurface" expires_after="2026-10-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the warning surface that does not have a warning shown event logged
    in advance. Logged each time an action is taken on the download warning and
    there is no warning shown event logged (the NOT_ADDED_MISSING_FIRST_WARNING
    bucket in DownloadAddWarningActionEventOutcome).
  </summary>
</histogram>

<histogram name="Download.WebUi.DocumentLoadedInMainFrameTime" units="ms"
    expires_after="2025-06-08">
  <owner>awado@google.com</owner>
  <owner>jacastro@chromium.org</owner>
  <summary>
    The amount of time between starting the provisional load and fully loading
    the document in the main frame of the chrome://downloads page. This
    corresponds to the WebContentsObserver::DocumentLoadedInFrame method.
  </summary>
</histogram>

<histogram name="Download.WebUi.LoadCompletedInMainFrame" units="ms"
    expires_after="2025-10-12">
  <owner>awado@google.com</owner>
  <owner>jacastro@chromium.org</owner>
  <summary>
    The amount of time between starting the provisional load and having
    completed the onload handler in the main frame of the chrome://downloads
    page. This corresponds to the
    WebContentsObserver::DocumentOnLoadCompletedInPrimaryMainFrame method.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
