chromium/tools/metrics/histograms/metadata/download/histograms.xml

<!--
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
[email protected].
-->

<histogram-configuration>

<histograms>

<variants name="DownloadBubbleViewType">
  <variant name="Full"/>
  <variant name="Partial"/>
</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="TransientType">
  <variant name="NonTransient"/>
  <variant name="Transient"/>
</variants>

<histogram name="Download.Android.OpenDialog.Events"
    enum="OpenDownloadDialogEvent" expires_after="2024-12-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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.ApiFunctions" enum="DownloadFunctions"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Downloads extension API function calls. Warning: this histogram was expired
    from 2020-03-08 to 2022-08-02; data may be missing.
  </summary>
</histogram>

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

  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</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="2024-10-28">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.DownloadCompletionToPartialViewShownLatency"
    units="ms" expires_after="2024-06-01">
  <owner>[email protected]</owner>
  <summary>
    Measures the time (in ms) from a successful download completion to when
    Download Bubble partial view becomes visible. Recorded only for Desktop
    platforms, where Download Bubble is enabled.
  </summary>
</histogram>

<histogram name="Download.Bubble.ProcessedCommand2" enum="DownloadCommand"
    expires_after="2025-02-23">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

<histogram
    name="Download.Bubble.Subpage.{DownloadDangerTypeString}.{ButtonType}ButtonActionTime"
    units="ms" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Measures the time (in ms) between the Download bubble warning subpage being
    shown, and one of the buttons being acted upon. The warning subpage is shown
    when the user sees a download warning on the full or the partial view, and
    navigates to the subpage for more actions. Recorded only for Desktop
    platforms, where Download Bubble is enabled. In M105, FirstButtonActionTime
    is replaced with SecondaryButtonActionTime, SecondButtonActionTime is
    replaced with PrimaryButtonActionTime.
  </summary>
  <token key="ButtonType">
    <variant name="Primary"/>
    <variant name="Secondary"/>
  </token>
  <token key="DownloadDangerTypeString" variants="DownloadDangerTypeString"/>
</histogram>

<histogram name="Download.Bubble.SubpageAction"
    enum="DownloadBubbleSubpageAction" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Record the user actions taken on the Download bubble warning subpage. The
    warning subpage is shown when the user sees a download warning on the full
    or the partial view, and navigates to the subpage for more actions. Recorded
    only for Desktop platforms, where Download Bubble is enabled.
  </summary>
</histogram>

<histogram name="Download.Bubble.ToolbarButtonClickToFullViewShownLatency"
    units="ms" expires_after="2024-10-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.Bubble.{DownloadBubbleViewType}View.VisibleTime"
    units="ms" expires_after="2024-11-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Measures the time (in ms) for which the full view (opened manually) or the
    partial view (opened by the browser for new and completed downloads) are
    visible. Recorded only for Desktop platforms, where Download Bubble is
    enabled.
  </summary>
  <token key="DownloadBubbleViewType" variants="DownloadBubbleViewType"/>
</histogram>

<histogram name="Download.Bubble.{DownloadBubbleViewType}ViewSize"
    units="items" expires_after="2024-12-07">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Measures the size of the full view (opened manually) or the partial view
    (opened by the browser for new and completed downloads). The full view
    contains all recent downloads (last 24 hours), and the partial view contains
    all recent downloads that user has not paid attention to, or acted upon.
    Recorded only for Desktop platforms, where Download Bubble is enabled.
  </summary>
  <token key="DownloadBubbleViewType" variants="DownloadBubbleViewType"/>
</histogram>

<histogram name="Download.CancelReason" enum="DownloadCancelReason"
    expires_after="2023-10-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Types of video files that are downloaded.</summary>
</histogram>

<histogram base="true" name="Download.Counts" enum="DownloadCountType"
    expires_after="2025-01-05">
<!-- Name completed by histogram_suffixes name="DownloadSource" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Various individual counts in the download system; see DownloadCountType for
    details.
  </summary>
</histogram>

<histogram name="Download.DangerousDialog.Events"
    enum="DangerousDownloadDialogEvent" expires_after="2025-01-26">
  <owner>[email protected]</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.DangerousDownloadInterstitial.Action"
    enum="DangerousDownloadInterstitialAction" expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records user action while attempting to recover a blocked download from
    chrome://downloads. This is logged when the user interacts with the
    dangerous download interstitial.
  </summary>
</histogram>

<histogram
    name="Download.DangerousDownloadInterstitial.InteractionTime.{InteractionType}"
    units="ms" expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Measures the time (in ms) between {InteractionType} on the dangerous
    download interstitial. The interstitial is shown when attempting to recover
    a blocked download from chrome://downloads. This is logged at most once per
    dangerous download.
  </summary>
  <token key="InteractionType">
    <variant name="CancelInterstitial"
        summary="opening and canceling the interstitial"/>
    <variant name="CompleteSurvey" summary="opening and submitting the survey"/>
    <variant name="OpenSurvey"
        summary="opening the interstitial and opening the survey"/>
    <variant name="SaveDangerous"
        summary="opening and bypassing the interstitial"/>
  </token>
</histogram>

<histogram name="Download.DangerousDownloadInterstitial.SurveyResponse"
    enum="DangerousDownloadInterstitialSurveyOptions"
    expires_after="2025-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records user response to the optional survey on the chrome://downloads
    dangerous download interstitial. This is logged when the user attempts to
    save the dangerous download and a survey option is selected.
  </summary>
</histogram>

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

  <owner>[email protected]</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="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</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 base="true" name="Download.DownloadSize" units="KB"
    expires_after="never">
<!-- expires-never: Used for long term download system health monitoring. -->

<!-- Name completed by histogram_suffixes name="Download.Parallelizable" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The size of successfully completed downloads.</summary>
</histogram>

<histogram name="Download.DuplicatePdfDownloadTriggered"
    enum="BooleanOpenInline" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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" enum="HttpResponseCode"
    expires_after="never">
<!-- expires-never: Used to monitor download system health. -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The count of HTTP Response codes for download requests.</summary>
</histogram>

<histogram name="Download.Incognito.Message" enum="IncognitoMessageEvent"
    expires_after="2023-06-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records errors when reading from the mojo input stream before a download
    completes.
  </summary>
</histogram>

<histogram base="true" name="Download.InsecureBlocking.Extensions"
    enum="InsecureDownloadExtensions" expires_after="2024-02-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records file extension of download to support analysis for mixed content
    file download blocking. Warning: this histogram was expired from M94 through
    M95; data may be missing.
  </summary>
</histogram>

<histogram name="Download.InsecureBlocking.Totals"
    enum="InsecureDownloadSecurityStatus" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records security state of downloads to support analysis for mixed content
    file download blocking.
  </summary>
</histogram>

<histogram base="true" name="Download.InterruptedReason" enum="InterruptReason"
    expires_after="never">
<!-- Name completed by histogram_suffixes name="DownloadSource" -->

<!-- expires-never: Core download metrics, used in go/chrome-download-dashboard. -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The reason that a download was interrupted.</summary>
</histogram>

<histogram name="Download.Interstitial.UIAction"
    enum="DownloadInterstitialUIAction" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.IOSDownloadARModelState.USDZ"
    enum="DownloadARModelState" expires_after="2023-10-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-10-14">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-10-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2023-10-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Result when a user attempts to download a file on iOS.</summary>
</histogram>

<histogram name="Download.IOSDownloadFileUI" enum="DownloadFileUI"
    expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-10-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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.IOSDownloadPassKitResult"
    enum="DownloadPassKitResult" expires_after="2024-10-14">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Recorded when a user attempts to download a PassKit file on iOS.
  </summary>
</histogram>

<histogram name="Download.IOSDownloadReplaced" enum="BooleanReplaced"
    expires_after="2023-10-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2023-10-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Result of an attempt to present Add Passes dialog on iOS.</summary>
</histogram>

<histogram name="Download.IOSPresentQLPreviewControllerResult"
    enum="PresentQLPreviewController" expires_after="2024-11-17">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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 base="true" name="Download.Later.UI.DialogChoice"
    enum="DownloadLaterDialogChoice" expires_after="2022-10-09">
<!-- Name completed by histogram_suffixes name="DownloadDialogSource" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

<histogram name="Download.Later.UI.Events" enum="DownloadLaterUiEvent"
    expires_after="2022-10-16">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records events when using media parser to analyze local media files.
  </summary>
</histogram>

<histogram base="true" name="Download.NetworkConnectionType.StartNew"
    enum="NetworkConnectionType" expires_after="2023-06-04">
<!-- Name completed by histogram_suffixes name="DownloadSource" -->

  <owner>[email protected]</owner>
  <summary>Network connection type when starting a new download.</summary>
</histogram>

<histogram name="Download.Open.ContentType" enum="DownloadContentType"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Content types of the downloads being opened. This histogram is logged
    whenever a download is opened, whether from the shelf/bubble or
    chrome://downloads. Logged on Desktop platforms.
  </summary>
</histogram>

<histogram name="Download.OpenDownloads.PerProfileType"
    enum="BrowserProfileType" expires_after="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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.PartialView.RowShownTimeToOpenDownloadClick"
    units="ms" expires_after="2024-12-08">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time interval from when the partial view was shown to when the user
    clicked on the partial view row to open it. This is only logged for
    downloads without a warning. This is only logged if the user clcks the main
    button to open the download at all, and is only logged for the partial view.
    It may be logged multiple times per download, if the user clicks to open the
    download multiple times. It is also logged when the download does not
    actually open, due to existing clickjacking mitigations. Only short times
    are logged because this is intended to study clickjacking potential and
    longer times are not relevant.
  </summary>
</histogram>

<histogram name="Download.PartialView.StartTimeToOpenDownloadClick" units="ms"
    expires_after="2025-02-10">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The time interval from when the download started to when the user clicked on
    the partial view row to open it. This is only logged for downloads without a
    warning. This is only logged if the user clcks the main button to open the
    download at all, and is only logged for the partial view. It may be logged
    multiple times per download, if the user clicks to open the download
    multiple times. It is also logged when the download does not actually open,
    due to existing clickjacking mitigations. Only short times are logged
    because this is intended to study clickjacking potential and longer times
    are not relevant.
  </summary>
</histogram>

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

<!-- Name completed by histogram_suffixes name="DownloadType" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The download path generation behavior which happens before download path
    validation in download target determination process.
  </summary>
</histogram>

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

<!-- Name completed by histogram_suffixes name="DownloadType" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The download path validation result before the final download target is
    determined.
  </summary>
</histogram>

<histogram name="Download.Progress.InfoBar.Shown"
    enum="DownloadInfoBar.ShownState" expires_after="2023-06-25">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records various types of messages representing the state of the downloads as
    they are shown on the download progress infobar on android.
  </summary>
</histogram>

<histogram name="Download.Retry.InterruptReason" enum="InterruptReason"
    expires_after="2025-10-06">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    Records the last interrupt reason for a download that has just been retried
    through the download bubble.
  </summary>
</histogram>

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

  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Records a successful database operation.</summary>
</histogram>

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

<!-- Name completed by histogram_suffixes
     name="Download.Service.EntryState" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The total number of database records used by download service, and the
    number of records in each entry state.
  </summary>
</histogram>

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

  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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 base="true" name="Download.Service.Files.CleanUp.External"
    units="files" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

<!-- Name completed by histogram_suffixes
     name="Download.Service.CleanupReason" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of files that have been deleted by external application or the
    user, when performing clean up tasks in download service.
  </summary>
</histogram>

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

<!-- Name completed by histogram_suffixes
     name="Download.Service.CleanupReason" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of failed file deletion attempts, when performing clean up tasks
    in download service.
  </summary>
</histogram>

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

<!-- Name completed by histogram_suffixes
     name="Download.Service.CleanupReason" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    The number of files successfully deleted, when performing clean up tasks in
    download service.
  </summary>
</histogram>

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

  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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 base="true" name="Download.Service.Finish.Time" units="ms"
    expires_after="M85">
<!-- Name completed by histogram_suffixes
     name="Download.Service.CompletionType" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The time to complete the download in download service.</summary>
</histogram>

<histogram name="Download.Service.Finish.Type"
    enum="Download.Service.CompletionType" expires_after="2023-08-27">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</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>[email protected]</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 base="true" name="Download.Service.Request.ClientAction"
    enum="Download.Service.ServiceApiAction" expires_after="never">
<!-- expires-never: Monitors download service system health. -->

<!-- Name completed by histogram_suffixes
     name="Download.Service.Client" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Records the API calls on download service.</summary>
</histogram>

<histogram base="true" name="Download.Service.StartUpStatus"
    enum="Download.Service.StartUpResult" expires_after="never">
<!-- Name completed by histogram_suffixes
     name="Download.Service.StartUpStep" -->

<!-- expires-never: Monitors download service system health. -->

  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>The start up result of the download service.</summary>
</histogram>

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

<!-- Name completed by histogram_suffixes
     name="Download.Service.TaskType" -->

  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

<histogram name="Download.Shelf.DragInfo" enum="Download.DragInfo"
    expires_after="2023-11-22">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.ShelfContextMenuAction"
    enum="DownloadShelfContextMenuAction" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>
    This histogram is used to record the different actions and events associated
    with the download shelf context menu on Linux, MacOS, and Windows. The menu
    may also be shown on the download bubble. Specifically, it 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.ShowedDownloadWarning" enum="DownloadItem.DangerType"
    expires_after="never">
<!-- expires-never: Monitors warning bypass rate. -->

  <owner>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

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

  <owner>[email protected]</owner>
  <owner>[email protected]</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="M110">
  <owner>[email protected]</owner>
  <owner>[email protected]</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-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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="2025-01-31">
  <owner>[email protected]</owner>
  <owner>[email protected]</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="2024-12-30">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</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="2025-01-26">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>[email protected]</owner>
  <owner>[email protected]</owner>
  <summary>Records events for local video thumbnail retrieval.</summary>
</histogram>

<histogram name="Download.WarningData.ActionAdded" enum="DownloadWarningAction"
    expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.AddWarningActionEventOutcome"
    enum="DownloadAddWarningActionEventOutcome" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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.
  </summary>
</histogram>

<histogram name="Download.WarningData.SurfaceWithoutWarningShown"
    enum="DownloadWarningSurface" expires_after="2025-01-05">
  <owner>[email protected]</owner>
  <owner>[email protected]</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-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</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-02-02">
  <owner>[email protected]</owner>
  <owner>[email protected]</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>