<!--
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 SafeBrowsing 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="CloudOrLocalDeepScan">
  <variant name="" summary="cloud"/>
  <variant name="Local" summary="local"/>
</variants>

<variants name="EnterpriseConnector">
  <variant name="Download"/>
  <variant name="DragAndDrop"/>
  <variant name="FileTransfer"/>
  <variant name="Paste"/>
  <variant name="Print"/>
  <variant name="Upload"/>
</variants>

<variants name="HPRTExperimentDelayedResponseMaybeRedirects">
  <variant name="" summary=""/>
  <variant name=".Redirects"
      summary="Represents combined results from multiple redirects. Whether
               it delayed the response and by how much is a slight
               underestimate because the time taken is calculated by summing
               up individual URL check times, which does not include the
               client-side processing between individual check runs. The
               underestimation is expected to be minimal since it involves
               only local code running."/>
</variants>

<variants name="HPRTExperimentMaybeRedirects">
  <variant name="" summary=""/>
  <variant name=".Redirects"
      summary="Represents combined results from multiple redirects."/>
</variants>

<variants name="HPRTExperimentMechanism">
  <variant name="HPD" summary="the hash-prefix database mechanism"/>
  <variant name="HPRT" summary="the hash-prefix real-time mechanism"/>
  <variant name="URT" summary="the URL real-time mechanism"/>
</variants>

<variants name="MetricsCollectorTimesDisabledEnabledDuration">
  <variant name="LongEnabled"
      summary="ESB enabled duration was greater than 24 hours"/>
  <variant name="MediumEnabled"
      summary="ESB enabled duration was between 1 hour and 24 hours"/>
  <variant name="NeverEnabled"
      summary="There is no enabled duration because ESB wasn't manually
               enabled, or it has been longer than kEventMaxDurationDay days
               since the latest enabled event."/>
  <variant name="ShortEnabled"
      summary="ESB enabled duration was less than 1 hour"/>
</variants>

<variants name="MetricsCollectorUserState">
  <variant name="EnhancedProtection" summary="enhanced protection"/>
  <variant name="Managed" summary="Safe Browsing managed mode"/>
  <variant name="StandardProtection" summary="standard protection"/>
</variants>

<variants name="RealTimeUrlAllowlistSource">
  <variant name="DynamicUpdate"
      summary="allowlist is generated through the component updater"/>
  <variant name="ResourceBundle"
      summary="allowlist is generated through the local resource file"/>
</variants>

<variants name="RealTimeUrlCheckUserCategory">
  <variant name="" summary="consumer or enterprise"/>
  <variant name=".Consumer" summary="consumer"/>
  <variant name=".Enterprise" summary="enterprise"/>
  <variant name=".None" summary="neither consumer nor enterprise"/>
</variants>

<variants name="RequestedSkippedOrChecked">
  <variant name="" summary="requested"/>
  <variant name=".Checked" summary="checked"/>
  <variant name=".Skipped" summary="skipped"/>
</variants>

<variants name="ThrottleProcess">
  <variant name="Browser" summary="Browser"/>
  <variant name="Renderer" summary="Renderer"/>
</variants>

<histogram name="SafeBrowsing.AdvancedProtection.Enabled"
    enum="AdvancedProtectionEnabledStatus" expires_after="2024-02-04">
  <owner>meacer@chromium.org</owner>
  <owner>trusty-transport@chromium.org</owner>
  <summary>
    Records whether the user has Advanced Protection enabled. Logged on startup
    when the enabled status changes. Can be logged multiple times for a user. In
    practice, this counts the number of Chrome startups with Advanced Protection
    enabled/disabled, rather than the actual user count.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.InstallerLoadFromDiskPbFileEmpty"
    units="bool" expires_after="2023-10-26">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether LoadFromDisk is attempting to read an empty pb file path.
    Logged whenever a component update or initial component load occurs for the
    RealTimeUrlChecksAllowlist component.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.IsInAllowlist.{AllowlistSource}Result"
    enum="AndroidRealTimeIsInAllowlistResult" expires_after="2024-02-20">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Measures the result from performing an allowlist check when the
    {AllowlistSource}.
  </summary>
  <token key="AllowlistSource" variants="RealTimeUrlAllowlistSource"/>
</histogram>

<histogram name="SafeBrowsing.Android.RealTimeAllowlist.IsInAllowlistElapsed"
    units="ms" expires_after="2024-03-03">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Measures the time it takes to perform a real time url allowlist check.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.Populate.{AllowlistSource}Result"
    enum="AndroidRealTimePopulateAllowlistResult" expires_after="2024-02-20">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Measures the outcome of populating the allowlist, when the
    {AllowlistSource}.
  </summary>
  <token key="AllowlistSource" variants="RealTimeUrlAllowlistSource"/>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.Populate.{AllowlistSource}Size"
    units="entries" expires_after="2024-02-20">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Measures the number of entries in the allowlist when the {AllowlistSource}.
    This metric is only recorded when populating the allowlist is successful.
  </summary>
  <token key="AllowlistSource" variants="RealTimeUrlAllowlistSource"/>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.Populate.{AllowlistSource}Version"
    units="versioncode" expires_after="2024-02-20">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the version of the allowlist when the {AllowlistSource}. This metric
    is only recorded when populating the allowlist is successful.
  </summary>
  <token key="AllowlistSource" variants="RealTimeUrlAllowlistSource"/>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.PopulateResourceFileElapsed"
    units="ms" expires_after="2024-03-03">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Measures the time it takes to initialize a real time url allowlist.
  </summary>
</histogram>

<histogram name="SafeBrowsing.AndroidTelemetry.ApkDownload.IncompleteReason"
    enum="ApkDownloadTelemetryIncompleteReason" expires_after="2024-08-16">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records if the telemetry ping sent for APK download contained a full
    referrer chain, or if there was an error collecting the referrer chain.
    Logged each time a user opted into extended reporting downloads an APK file
    from a normal window on Android. Warning: this histogram was expired from
    2023-06-10 to 2023-08-16; data may be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.AndroidTelemetry.ApkDownload.Outcome"
    enum="ApkDownloadTelemetryOutcome" expires_after="2024-08-16">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a telemetry ping for APK download was sent, or if not, then
    why not. Logged each time a user downloads an APK file on Android. Warning:
    this histogram was expired from 2023-07-09 to 2023-08-16; data may be
    missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.BlockingPage.RequestDestination"
    enum="RequestDestination" expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the request destination that triggers the safe browsing blocking page.
    Logged each time a safe browsing blocking page is created. This metric is
    useful to show the priority of checking each request destination in real
    time. Note that this metric may be bias towards kDocument, because the
    default request destination is set to kDocument.
  </summary>
</histogram>

<histogram name="SafeBrowsing.BrowserThrottle.CheckerOnIOLifetime" units="ms"
    expires_after="2024-03-10">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long the BrowserURLLoaderThrottle::CheckerOnIO object exists
    for. Logged when the object destructs.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.BrowserThrottle.IsCheckCompletedOnProcessResponse"
    enum="BooleanCompleted" expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the Safe Browsing check is completed when the URL loader starts
    to process a response. If not, the URL loader will be deferred until the
    Safe Browsing check is completed. Logs each time the URL loader dispatches
    WillProcessResponse() and the Safe Browsing check doesn't block the URL.

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

<histogram name="SafeBrowsing.BrowserThrottle.TotalDelay" units="ms"
    expires_after="2024-03-24">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when the URL loader was deferred by Safe Browsing
    check and when the check is completed. Logs each time the URL loader was
    deferred by Safe Browsing check and the Safe Browsing check doesn't block
    the URL.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.BrowserThrottle.TotalDelay2.EnterpriseFullUrlLookup{AllowlistCheckStatus}"
    units="ms" expires_after="2024-01-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when the browser URL loader was deferred by Safe
    Browsing check and when the check is completed, for enterprise real time URL
    check request with {AllowlistCheckStatus} during the check. This metric is
    different from SafeBrowsing.BrowserThrottle.TotalDelay as it logs for each
    request, recording zero delay when the request is not deferred.
  </summary>
  <token key="AllowlistCheckStatus">
    <variant name=".AllowlistBypassed" summary="allowlist bypassed"/>
    <variant name=".AllowlistChecked" summary="allowlist checked"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.BrowserThrottle.TotalDelay2{UserCategory}"
    units="ms" expires_after="2024-03-10">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when the browser URL loader was deferred by Safe
    Browsing check and when the check is completed, for {UserCategory} URL check
    request. This metric is different from
    SafeBrowsing.BrowserThrottle.TotalDelay as it logs for each request,
    recording zero delay when the request is not deferred.
  </summary>
  <token key="UserCategory">
    <variant name=".ConsumerFullUrlLookup" summary="consumer real time"/>
    <variant name=".EnterpriseFullUrlLookup" summary="enterprise real time"/>
    <variant name=".HashPrefixDatabaseCheck" summary="hash-prefix database"/>
    <variant name=".HashPrefixRealTimeCheck" summary="hash-prefix real-time"/>
    <variant name=".NoneFullUrlLookup"
        summary="neither consumer nor enterprise"/>
    <variant name=".SkippedCheck" summary="skipped"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.BrowserThrottle.WillProcessResponseCount"
    units="times" expires_after="2024-02-11">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of times that WillProcessResponse has been called for a
    single BrowserUrlLoaderThrottle. Logged each time WillProcessResponse is
    called.
  </summary>
</histogram>

<histogram name="SafeBrowsing.CheckBrowseUrl.HasLocalMatch"
    enum="BooleanMatched" expires_after="2024-02-11">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the Safe Browsing check via CheckBrowseUrl method matched any
    local hash prefixes. Logged each time the Safe Browsing reputation of a URL
    is checked using local blocklists.
  </summary>
</histogram>

<histogram name="SafeBrowsing.CheckUrl.Timeout" enum="BooleanTimedOut"
    expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Counts the number of times the Safe Browsing reputation lookup timeout
    happens. Logged each time the Safe Browsing reputation of a URL is checked.
  </summary>
</histogram>

<histogram name="SafeBrowsing.CheckUrl.UrlScheme" enum="SafeBrowsingUrlScheme"
    expires_after="2024-03-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the scheme of the URL whose Safe Browsing reputation is about to be
    checked. Logged before it has been determined whether or not the scheme is
    valid for Safe Browsing.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.DownloadWarningActionSize"
    units="units" expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Counts the length of the download_warning_actions field in a client Safe
    Browsing report. Logged each time the field is populated before a report is
    sent.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.HasThreatDetailsAtFinish.{ResourceType}"
    enum="BooleanAvailable" expires_after="2024-02-20">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a threat details job is in progress before sending client
    safe browsing report for blocking page triggered by {ResourceType}. If it is
    false, no report will be sent.
  </summary>
  <token key="ResourceType">
    <variant name="Mainframe" summary="mainframe"/>
    <variant name="Subresource" summary="subresource"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.HasThreatDetailsAtStart.{ResourceType}"
    enum="BooleanAvailable" expires_after="2024-02-20">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a threat details job has already started before starting to
    collect threat details for blocking page triggered by {ResourceType}. If it
    is true, no report will be sent after user interacts with the warning.
  </summary>
  <token key="ResourceType">
    <variant name="Mainframe" summary="mainframe"/>
    <variant name="Subresource" summary="subresource"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.HasThreatDetailsForTab{TriggerType}"
    enum="BooleanAvailable" expires_after="2024-02-20">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a threat details job is running on the current tab before
    sending {TriggerType} client safe browsing report. The job can be already
    deleted if the current tab is closed directly before the report is sent.
    Only log if the report should be sent.
  </summary>
  <token key="TriggerType">
    <variant name="" summary="any"/>
    <variant name=".SecurityInterstitial" summary="security interstitial"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.HasThreatDetailsInContainer.SecurityInterstitial"
    enum="BooleanAvailable" expires_after="2024-03-10">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a threat details job is found in the data collector
    container before sending security interstitial client safe browsing report.
    The report will not be sent if it is unavailable. Only log if the report
    should be sent and there is an available collector in the data collector
    map.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.NetworkResult.{IsAccessTokenIncluded}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-12-27">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the network result for a client safe browsing report request when
    the request {IsAccessTokenIncluded}.
  </summary>
  <token key="IsAccessTokenIncluded">
    <variant name="NoAccessToken" summary="has no access token"/>
    <variant name="YesAccessToken" summary="has an access token"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.ClientSafeBrowsingReport.ReportType"
    enum="ClientSafeBrowsingReportType" expires_after="2024-03-24">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the report type of client safe browsing reports. Logged each time a
    report is about to be sent. It's not logged on failed cases (e.g.
    serialization error or empty report).
  </summary>
</histogram>

<histogram name="SafeBrowsing.ClientSafeBrowsingReport.RequestHasToken"
    enum="BooleanSent" expires_after="2024-02-25">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a sent client safe browsing report request contains a
    GAIA-tied OAuth2 token. This token is sent only for signed-in Enhanced Safe
    Browsing users.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ClientSidePhishingDetection.AllowlistMatchResult"
    enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2024-03-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the result of checking a URL against the local client-side phishing
    detection allowlist. This is triggered whenever the allowlist is checked,
    which applies both to client-side detection checks and password protection
    requests.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.Daily.BypassCountLast28Days.{UserState}.AllEvents"
    units="events" expires_after="2024-03-23">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the total number of bypass events in the last 28 days. Recorded for all
    non-Incognito profiles that are under {UserState} every 24 hours and at
    startup if the last recording was more than 24 hours ago.
  </summary>
  <token key="UserState" variants="MetricsCollectorUserState"/>
</histogram>

<histogram
    name="SafeBrowsing.Daily.SecuritySensitiveCountLast28Days.{UserState}.AllEvents"
    units="events" expires_after="2024-03-23">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the total number of security sensitive events in the last 28 days.
    Recorded for all non-Incognito profiles that are under {UserState} every 24
    hours and at startup if the last recording was more than 24 hours ago.
  </summary>
  <token key="UserState" variants="MetricsCollectorUserState"/>
</histogram>

<histogram name="SafeBrowsing.DelayedWarnings.Event"
    enum="SafeBrowsingDelayedWarningEvent" expires_after="2021-08-22">
  <obsolete>
    Removed in M103 as this histogram is no longer needed.
  </obsolete>
  <owner>meacer@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records when a user in the Delayed Warnings experiment group visits a page
    with a delayed SafeBrowsing phishing warning, triggers the delayed warning
    (via keypress), or leaves the page without interacting. Only recorded when
    user has not disabled URL elision via &quot;Always Show Full URLs&quot;
    context menu item, or by installing the Suspicious Site Reporter extension.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Enhanced.ProtegoRequestSentInLast24Hours"
    enum="SafeBrowsingEnhancedProtegoPingType" expires_after="2024-05-18">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether an ESB user has sent a Protego ping to the Safe Browsing
    consumer API servers within the last 24 hours. If a ping was sent since the
    last time this metric was logged, then this metric will report the type of
    that ping, otherwise it will report that none was sent. If the user has sent
    a ping of multiple types since the last time this metric was logged, then
    only the type of the most recent ping will be reported. This metric is
    logged at most once per day and only for users that have enhanced protection
    enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.EsbDisabled.LastBypassEventType"
    enum="SBMetricsCollectorEventType" expires_after="2024-03-23">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the last bypass event type before a user disables Enhanced Safe
    Browsing. Logged each time a user disables Enhanced Safe Browsing. Logged at
    most three times a week.
  </summary>
</histogram>

<histogram name="SafeBrowsing.EsbDisabled.LastEnabledInterval" units="days"
    expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the time interval between the last time Enhanced Safe Browsing was
    enabled and the current disabling event. Logged each time a user disables
    Enhanced Safe Browsing. Logged at most three times a week. If Enhanced Safe
    Browsing was enabled more than 30 days go, no metric is logged.
  </summary>
</histogram>

<histogram name="SafeBrowsing.EsbDisabled.LastSecuritySensitiveEventType"
    enum="SBMetricsCollectorEventType" expires_after="2024-03-23">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the last security sensitive event type before a user disables
    Enhanced Safe Browsing. Logged each time a user disables Enhanced Safe
    Browsing. Logged at most three times a week.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.EsbDisabled.TimesDisabledLast28Days.{EnabledDuration}"
    units="times" expires_after="2024-02-28">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of times Enhanced Safe Browsing was disabled the last 28
    days. Logged each time a user disables ESB. The length of the interval that
    ESB was enabled is summarized by {EnabledDuration}. The maximum number of
    times ESB is disabled is tracked is 30, so anything above that is not
    logged.
  </summary>
  <token key="EnabledDuration"
      variants="MetricsCollectorTimesDisabledEnabledDuration"/>
</histogram>

<histogram name="SafeBrowsing.EsbPromotionFlow.IphShown"
    enum="SafeBrowsingReferralMethod" expires_after="2024-01-26">
  <owner>awado@google.com</owner>
  <owner>chrome-safebrowsing-alerts@google.com</owner>
  <summary>
    Records the amount of times the In-Product-Help (IPH) bubble is triggered on
    the Chrome security settings page from one of the three Enhanced Safe
    Browsing referral/promotion methods.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionPersister.AgedFileFound"
    enum="BooleanFound" expires_after="2024-07-01">
  <owner>psarouthakis@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records if a persisted file is older than 3 days. Every file that is found
    on disk will have its age checked.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionPersister.CacheSize" units="files"
    expires_after="2024-07-01">
  <owner>psarouthakis@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of persisted files on disk when the telemetry persister
    is first initiated. The cache size is only checked when the persister init
    function is run.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionPersister.PersistedFileSize"
    units="bytes" expires_after="2024-07-01">
  <owner>psarouthakis@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of a persisted file in bytes. This is recorded for any file found
    on disk, regardless of if it was successfully read.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionPersister.ReadResult"
    enum="BooleanSuccess" expires_after="2024-07-01">
  <owner>psarouthakis@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the read request succeeded or not. This is recorded once for every
    time the persister attempts to read from a file. Read requests happen when
    the telemetry service successfully uploads a file. If the persister attempts
    to read from an empty filepath, it will be marked as a failure.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionPersister.WriteResult"
    enum="BooleanSuccess" expires_after="2024-07-01">
  <owner>psarouthakis@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the write request succeeded or not. This is recorded once for every
    file written. Write requests happen on Chrome shutdown and when an extension
    telemetry upload is not successful.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FileData.CollectionDuration"
    units="ms" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram measures how long it takes to collect file
    data for all the offstore extensions installed. It is emitted after each
    pass of the collection process completes which occurs periodically (every 2
    hours by default). The histogram is not emitted if there are no off-store
    extensions installed or if the collection process is interrupted due to the
    browser session ending or disabling Enhanced Safe Browsing for the profile.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.FileData.LargestFileSizeObserved"
    units="bytes" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the largest file size observed while
    collecting files to process (regardless of whether it exceeds the file size
    limit). Logged by the FileProcessor at periodic intervals (default: once per
    day) for each off-store extension installed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FileData.NumFilesFound"
    units="files" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the number of applicable files found
    in an extension's directories. An applicable file must be non-empty, within
    the max size limit, and among the applicable types (eg. JS, HTML, CSS). The
    manifest.json file is also included. Logged by the FileProcessor at periodic
    intervals (default: once per day) for each off-store extension installed.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.FileData.NumFilesOverProcessingLimit"
    units="files" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the number of files not processed
    because they exceeded the max files to process per extension limit. Logged
    by the FileProcessor at periodic intervals (default: once per day) for each
    off-store extension installed.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.FileData.NumFilesOverSizeLimit"
    units="files" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the number of files not processed
    because they exceeded the size limit for processing. Logged by the
    FileProcessor at periodic intervals (default: once per day) for each
    off-store extension installed (if applicable).
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FileData.NumFilesProcessed"
    units="files" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the number of successfully processed
    files, including the manifest.json file. Logged by the FileProcessor at
    periodic intervals (default: once per day) for each off-store extension
    installed.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.FileData.NumOffstoreExtensions"
    units="extensions" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the number of off-store extensions
    installed in a user profile. It is emitted at the start of each pass of the
    collection process which occurs periodically (every 2 hours by default). The
    histogram is emitted even if there are no off-store extensions installed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FileData.ProcessedFileSize"
    units="bytes" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records the size of a successfully processed
    file. Logged by the FileProcessor at periodic intervals (default: once per
    day) for each off-store extension installed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FileData.ValidExtension"
    enum="BooleanValid" expires_after="2024-07-23">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extension telemetry includes file data such as file hashes for off-store
    extension files. This histogram records true for a valid extension, and
    false if the extension root directory or manifest.json file is invalid.
    Logged by the FileProcessor at periodic intervals (default: once per day)
    for each off-store extension installed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FilePersistedAtWriteInterval"
    enum="Boolean" expires_after="2023-10-22">
  <owner>psarouthakis@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records if the extension telemetry service is persisting a report at a write
    interval. True represents a persist event during a write interval, false
    represents a persist event during Chrome shutdown. Recorded when the
    extension telemetry service persists a telemetry report to disk.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.NetworkRequestResponseCodeOrError"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-02-25">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The HTTP response code or net error from each upload attempt. This is
    recorded once for each network request made as part of an upload, i.e. if an
    upload fails the first time, but a retry succeeds, this metric is recorded
    twice. Upload attempts occur periodically (default period is 1 hour) and
    there are multiple retries attempted (if necessary) after every upload
    interval.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.OffstoreExtensionDisabledReason"
    enum="SBExtensionTelemetryDisableReason" expires_after="2024-02-22">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the reason an off-store extension is disabled. This histogram is
    emitted when Chrome disables an off-store extension based on a verdict
    received from the Extension Telemetry Server.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.OffstoreExtensionReenabled_PastDisabledReason"
    enum="SBExtensionTelemetryDisableReason" expires_after="2024-02-22">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the previous blocklist state for an off-store extension when it is
    re-enabled. This histogram is emitted when Chrome re-enables a previously
    disabled off-store extension based on a new verdict from the Extension
    Telemetry Server that un-blocklists the extension.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.RetriesTillUploadSuccess"
    units="retries" expires_after="2024-03-17">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Counts how many retries were needed to successfully complete the upload
    request. This is emitted only for a successful upload. Upload attempts occur
    periodically (default period is 1 hour) and there are multiple retries
    attempted (if necessary) after every upload interval.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.Signals.Discarded"
    enum="SBExtensionTelemetrySignalsSignalType" expires_after="2024-03-03">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records discarded extension telemetry signals by type. Logged each time a
    signal is discarded because it contains invalid data (e.g., invalid
    extension id). The signal type recorded here only corresponds to a a raw
    signal that is created externally and passed to extension service. The count
    for a combined signal (that is created internally and derived from other raw
    signals) should always be 0 since the internally generated signal data
    should always be valid.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.Signals.SignalType"
    enum="SBExtensionTelemetrySignalsSignalType" expires_after="2024-02-04">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the extension telemetry signal type. Logged each time a signal is
    triggered (eg. a tabs.executeScript API call is invoked). The signal can be
    a raw signal that is created externally and passed to extension service or a
    combined signal that is created internally and derived from other raw
    signals.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.UploadSize" units="bytes"
    expires_after="2024-02-25">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of the upload request body. This is recorded once for each upload,
    regardless of whether it was successful. Upload attempts occur periodically
    (default period is 1 hour).
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.UploadSuccess"
    enum="BooleanSuccess" expires_after="2024-02-25">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the overall upload request succeeded or not. This is recorded once
    for an upload request, regardless of how many retries were needed to
    complete the upload. Upload attempts occur periodically (default period is 1
    hour) and there are multiple retries attempted (if necessary) after every
    upload interval.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.{Result}UploadDuration"
    units="ms" expires_after="2024-03-05">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Measures the total duration (including delay due to retries) of a {Result}
    upload request. This is recorded after the last retry on every {Result}
    upload. Upload attempts occur periodically (default period is 1 hour) and
    there are multiple retries attempted (if necessary) after every upload
    interval.
  </summary>
  <token key="Result">
    <variant name="Failed" summary="failed"/>
    <variant name="Successful" summary="successful"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.FileTypeUpdate.DynamicUpdateResult"
    enum="SBFileTypeUpdateResult" expires_after="2024-03-10">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The result of reading/parsing/accepting a new proto for the FileTypePolices
    repo of file extensions and their meta data.

    This is for the file types loaded from the component-update system. This
    includes both those loaded from disk shortly after startup, and those
    received over the network when the component version changes
  </summary>
</histogram>

<histogram name="SafeBrowsing.FileTypeUpdate.DynamicUpdateVersion"
    units="FileTypePolicies Version" expires_after="2024-07-23">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Integer version number citing which version of the proto data chrome just
    loaded. Latest version is in download_file_types.asciipb.

    This is for the file types loaded from the component-update system. This
    includes both those loaded from disk shortly after startup, and those
    received over the network when the component version changes
  </summary>
</histogram>

<histogram name="SafeBrowsing.FileTypeUpdate.ResourceBundleResult"
    enum="SBFileTypeUpdateResult" expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The result of reading/parsing/accepting a new proto for the FileTypePolices
    repo of file extensions and their meta data.

    This is for the file types loaded from the resource bundle packaged with
    Chrome, which is always loaded at startup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.FileTypeUpdate.ResourceBundleVersion"
    units="FileTypePolicies Version" expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Integer version number citing which version of the proto data chrome just
    loaded. Latest version is in download_file_types.asciipb.

    This is for the file types loaded from the resource bundle packaged with
    Chrome, which is always loaded at startup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.CheckDelta"
    units="microseconds" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The microseconds between sending the SafeBrowsing API call and receiving the
    response. The end time is fixed in java code and does not include any thread
    hops or extra work. Note that this does include task queue time to respond
    to the IPC (and that queue time is often non-trivial). This is logged each
    time a response is received from SafeBrowsing API. This histogram is
    comparable with SB2.RemoteCall.CheckDelta which measures a similar duration
    for SafetyNet API calls.

    This histogram only records metrics on machines with high-resolution clocks.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.IsAvailable"
    enum="BooleanAvailable" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the SafeBrowsing API is available. The API can be
    unavailable if a non-recoverable error was encountered in a previous call.
    This is logged when a SafeBrowsing API URL check starts.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.JavaValidationResult"
    enum="SafeBrowsingApiJavaValidationResult" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result after validating the response from SafeBrowsing API. The
    result can be invalid if there is a version mismatch bewteen Chrome and
    GMSCore. This histogram is logged exactly once after a response is received
    from SafeBrowsing API. If there are multiple invalid values, they will be
    logged in the following order: lookup result, threat type, threat attribute
    and response status.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.LookupResult"
    enum="SafeBrowsingApiLookupResult" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the lookup result from SafeBrowsing API. In rare circumstance (e.g.
    version mismatch), there may be out of range samples in this histogram.

    This histogram may be skewed towards success or recoverable failure buckets,
    because Chrome will not retry after a non-recoverable failure is
    encountered. Check SafeBrowsing.GmsSafeBrowsingApi.IsAvailable to see how
    often that happens.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ResponseStatus"
    enum="SafeBrowsingApiResponseStatus" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the response status from SafeBrowsing API if the lookup result is
    successful. In rare circumstance (e.g. version mismatch), there may be out
    of range samples in this histogram.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ThreatAttribute"
    enum="SafeBrowsingApiThreatAttribute" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records each threat attribute from SafeBrowsing API if the lookup result is
    successful. May be logged more than once in one single response when there
    are multiple threat attributes. In rare circumstance (e.g. version
    mismatch), there may be out of range samples in this histogram.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ThreatAttributeCount"
    units="entries" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the length of threat attributes from SafeBrowsing API if the lookup
    result is successful.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ThreatType"
    enum="SafeBrowsingApiThreatType" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the threat type from SafeBrowsing API if the lookup result is
    successful. In rare circumstance (e.g. version mismatch), there may be out
    of range samples in this histogram.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HitReport.IsSubresource"
    enum="BooleanIsSubresource" expires_after="2024-03-10">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a hit report is triggered by a subresource. Logged when a
    hit report is sent.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.AllowlistSizeTooSmall"
    enum="BooleanUnavailable" expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the size of the high confidence allowlist is too small. It can
    happen if it is misconfigured on the server-side, or the local file is
    corrupted on the disk. If too small, the allowlist is considered as
    unavailable. Logged each time a top frame URL navigation happens for users
    who have hash-prefix real-time lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.AllStoresAvailable" enum="BooleanAvailable"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the local Safe Browsing stores are available. If not, all URLs
    are marked as safe during the lookup. Logged each time a top frame URL
    navigation happens for users who have hash-prefix real-time lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.BackoffState" enum="BooleanEnabled"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs if the hash-prefix real-time lookup service is currently in backoff
    state due to previous errors. Logs whenever a hash-prefix real-time request
    is about to be attempted, which will not go through if the service is in
    backoff mode.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Cache.FullHashCount" units="entries"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of full hashes in the local hash-prefix real-time lookup
    cache for this profile. Logged each time cleanup of expired entries is
    performed on the cache, which happens every 30 minutes. The value represents
    the count before cleanup and includes expired entries.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Cache.HashPrefixCount" units="entries"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of hash prefixes in the local hash-prefix real-time
    lookup cache for this profile. Logged each time cleanup of expired entries
    is performed on the cache, which happens every 30 minutes. The value
    represents the count before cleanup and includes expired entries.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.CacheHit" enum="BooleanCacheHit"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether there was a cache hit when a hash prefix was searched for in
    the local cache for hash-prefix real-time lookups. A cache hit means the
    prefix was found in the cache (whether or not it has associated full
    hashes), which allows for that prefix not to be re-requested. This histogram
    is false in the case of a cache miss for the hash prefix. This is logged for
    each hash prefix in a lookup when the cache is searched.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.CacheHitAllPrefixes" enum="BooleanCacheHit"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether all hash prefixes were found in the hash-prefix real-time
    lookups local cache. It indicates that as a result of the cache, there was
    no need to send a request to Safe Browsing servers. This is logged each time
    a lookup occurs, when the cache is searched.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.CacheHitAllPrefixesIfNoQueryParams"
    enum="BooleanCacheHit" expires_after="2024-02-25">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether all hash prefixes would be found in the hash-prefix
    real-time lookups local cache if the URL were to have its query parameters
    removed. It indicates that as a result of the cache, there would be no need
    to send a request to Safe Browsing servers. This is logged each time a
    lookup occurs, after the cache is searched.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.CanGetReputationOfUrl"
    enum="BooleanCanCheckUrl" expires_after="2024-03-01">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether Safe Browsing can get the reputation of a URL when a
    hash-prefix real-time check is needed. Logged when URL is loading and
    hash-prefix real-time check is enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.FoundUnmatchedFullHashes"
    enum="BooleanFound" expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the response from the hash-prefix real-time lookup contained
    any full hashes that did not match the requested hash prefixes. This is
    logged after the network request for the lookup returns.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.GetCache.Time" units="ms"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between the start of getting a result from the cache and
    when the cached item is actually obtained for hash-prefix real-time lookups.
    This is an indicator of the efficiency of retrieving from the cache.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.HasOhttpKey" enum="BooleanHasKey"
    expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether hash realtime service can obtain a non empty key from OHTTP key
    service. The lookup will fail if there is no key. Logged each time a top
    frame URL navigation happens for users who have hash-prefix real-time
    lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Ineligible.{IneligibleReason}"
    enum="BooleanIneligible" expires_after="2024-03-24">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether hash-prefix real-time lookups are ineligible due to
    {IneligibleReason}. Logged when a browser URL loader throttle is created.
    Additionally, logged when creating a SafeBrowsing URL checker on iOS. There
    may be multiple reasons why the lookups are ineligible, but this reason is
    one of them.
  </summary>
  <token key="IneligibleReason">
    <variant name="IneligibleForSessionOrLocation"
        summary="the feature being disabled for the session or the location"/>
    <variant name="NotAllowedByPolicy" summary="not being allowed by policy"/>
    <variant name="NotStandardProtection"
        summary="not having standard protection"/>
    <variant name="OffTheRecord" summary="being off the record"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.IsLookupServiceFound" enum="BooleanFound"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the hash-prefix real-time lookup service is found when a hash-
    prefix real-time check is needed. The lookup service is available if it is
    not nullptr. Logged when the hash-prefix real-time check is enabled and the
    URL doesn't match the allowlist.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.LocalMatch.Result"
    enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the result of checking the URL against the local Safe Browsing high
    confidence allowlist. Logged each time a top frame URL navigation happens
    for users who have hash-prefix real-time lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Network.HttpResponseCode.{NetError}"
    enum="HttpResponseCode" expires_after="2024-02-20">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    HTTP response code from a SafeBrowsing hash-prefix real-time lookup when the
    net error is {NetError}. Logged after a lookup request with that net error
    finishes.
  </summary>
  <token key="NetError">
    <variant name="InternetDisconnected" summary="ERR_INTERNET_DISCONNECTED"/>
    <variant name="NetworkChanged" summary="ERR_NETWORK_CHANGED"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from SafeBrowsing hash-prefix real-time lookups.
    Logged on each resource check for which a lookup request is sent to the
    server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Network.Result.WhenEnteringBackoff"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-03-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from SafeBrowsing hash-prefix real-time lookups.
    Logged when the resource check's lookup request results in entering backoff
    mode.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Network.Time" units="ms"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the roundtrip time it took to perform a Safe Browsing hash-prefix
    real-time lookup. Logged on each resource check for which a lookup request
    is sent to the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.BackoffState"
    enum="BooleanEnabled" expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs if the OHTTP key service is currently in backoff state due to previous
    errors. Logs whenever a key fetch request is about to be attempted (either
    triggered by hash prefix lookup, asynchronous workflow or server hint),
    which will not go through if the service is in backoff mode.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.FetchKeyTriggerReason"
    enum="SafeBrowsingOhttpFetchKeyTriggerReason" expires_after="2024-03-07">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs how the key fetch is triggered. Logs whenever a key fetch request is
    about to be attempted (either triggered by hash prefix lookup, asynchronous
    workflow or server hint), which will not go through if the service is in
    backoff mode.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.HasCachedKey"
    enum="BooleanHasKey" expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether OHTTP key service has a valid key cached in memory. Logged each
    time a key is requested through the get OHTTP key API.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from OHTTP key hosting endpoint. Logged on each key
    fetch request that is sent to the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.Network.Time" units="ms"
    expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the roundtrip time it took to fetch a new OHTTP key. Logged on each key
    fetch request that is sent to the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OperationResult"
    enum="SafeBrowsingHPRTOperationResult" expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the return status for hash-prefix real-time lookups. This is logged
    after network request for the lookup returns.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Request.CountOfPrefixes" units="prefixes"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The number of prefixes included in a hash-prefix real-time lookup request
    sent to the Google Safe Browsing servers. This excludes any prefixes found
    in the local cache.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.ThreatInfoSize" units="verdicts"
    expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the number of unsafe threat type verdicts received in the check
    response (including cached results) that are relevant to hash-prefix
    real-time checks. Logged each time a lookup request completes without errors
    or when the request does not need to be sent because all the results are in
    the local cache.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRTExperiment.Redirects.AllChecksEligible"
    enum="Boolean" expires_after="2024-02-04">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    When there are redirects in an HPRT experiment and not all of them are
    ineligible for the experiment, this logs true if all of them are eligible.
    (It logs false if some are ineligible.) Eligible is defined as: if a lookup
    was unsafe, it would display a warning. Ineligibility can happen for this
    log if WebContents disappears partway through the experiment, or if some but
    not all of the redirects have already shown a warning on the WebContents and
    have been bypassed by the user. This is logged when the HPRT experiment is
    about to conclude, once all lookup mechanisms have completed or timed out,
    BrowserUrlLoaderThrottle has reached WillProcessResponse or has destructed
    CheckerOnIO before that occurred, and the eligibility of each check has been
    determined.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.DelayedResponseResult"
    enum="HPRTExperimentCombinedResult" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records which mechanisms delayed the page response. Logged when the HPRT
    experiment concludes, which is once all lookup mechanisms have completed or
    timed out, BrowserUrlLoaderThrottle has reached WillProcessResponse or has
    destructed CheckerOnIO before that occurred, and the eligibility of each
    check has been determined and at least one is eligible. Eligible is defined
    as: if a lookup was unsafe, it would display a warning. {MaybeRedirects}
  </summary>
  <token key="MaybeRedirects"
      variants="HPRTExperimentDelayedResponseMaybeRedirects"/>
</histogram>

<histogram name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.TimedOutResult"
    enum="HPRTExperimentCombinedResult" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records which mechanisms timed out. Logged when the HPRT experiment
    concludes, which is once all lookup mechanisms have completed or timed out,
    BrowserUrlLoaderThrottle has reached WillProcessResponse or has destructed
    CheckerOnIO before that occurred, and the eligibility of each check has been
    determined and at least one is eligible. Eligible is defined as: if a lookup
    was unsafe, it would display a warning. {MaybeRedirects}
  </summary>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.WarningsResult"
    enum="HPRTExperimentCombinedResult" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records which mechanisms resulted in a warning. Logged when the HPRT
    experiment concludes, which is once all lookup mechanisms have completed or
    timed out, BrowserUrlLoaderThrottle has reached WillProcessResponse or has
    destructed CheckerOnIO before that occurred, and the eligibility of each
    check has been determined and at least one is eligible. Eligible is defined
    as: if a lookup was unsafe, it would display a warning. {MaybeRedirects}
  </summary>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram
    name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.{Mechanism1}FasterThan{Mechanism2}Amount"
    units="ms" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records by how much {Mechanism1} was faster than {Mechanism2}. Logged when
    the HPRT experiment concludes, which is once all lookup mechanisms have
    completed or timed out, BrowserUrlLoaderThrottle has reached
    WillProcessResponse or has destructed CheckerOnIO before that occurred, and
    the eligibility of each check has been determined and at least one is
    eligible. Eligible is defined as: if a lookup was unsafe, it would display a
    warning. {MaybeRedirects}
  </summary>
  <token key="Mechanism1" variants="HPRTExperimentMechanism"/>
  <token key="Mechanism2" variants="HPRTExperimentMechanism"/>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram
    name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.{Mechanism}.DelayedResponse"
    units="HPRTExperimentUnknownNoYes" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether {Mechanism} delayed the page response. Logged when the HPRT
    experiment concludes, which is once all lookup mechanisms have completed or
    timed out, BrowserUrlLoaderThrottle has reached WillProcessResponse or has
    destructed CheckerOnIO before that occurred, and the eligibility of each
    check has been determined and at least one is eligible. Eligible is defined
    as: if a lookup was unsafe, it would display a warning. {MaybeRedirects}
  </summary>
  <token key="Mechanism" variants="HPRTExperimentMechanism"/>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram
    name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.{Mechanism}.DelayedResponseTime"
    units="ms" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records by how much {Mechanism} delayed the page response. Logged when all
    lookup mechanisms in the HPRT experiment have completed or timed out,
    BrowserUrlLoaderThrottle has reached WillProcessResponse, and the
    eligibility of each check has been determined and at least one is eligible.
    If BrowserUrlLoaderThrottle destructs CheckerOnIO before WillProcessResponse
    is called, there is no log. Eligible is defined as: if a lookup was unsafe,
    it would display a warning. {MaybeRedirects}
  </summary>
  <token key="Mechanism" variants="HPRTExperimentMechanism"/>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram
    name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.{Mechanism}.TimedOut"
    units="BooleanSuccess" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether {Mechanism} timed out. Logged when the HPRT experiment
    concludes, which is once all lookup mechanisms have completed or timed out,
    BrowserUrlLoaderThrottle has reached WillProcessResponse or has destructed
    CheckerOnIO before that occurred, and the eligibility of each check has been
    determined and at least one is eligible. Eligible is defined as: if a lookup
    was unsafe, it would display a warning. {MaybeRedirects}
  </summary>
  <token key="Mechanism" variants="HPRTExperimentMechanism"/>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram
    name="SafeBrowsing.HPRTExperiment{MaybeRedirects}.{Mechanism}.TimeTaken"
    units="ms" expires_after="2023-11-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records by how long {Mechanism} took. Logged when the HPRT experiment
    concludes, which is once all lookup mechanisms have completed or timed out,
    BrowserUrlLoaderThrottle has reached WillProcessResponse or has destructed
    CheckerOnIO before that occurred, and the eligibility of each check has been
    determined and at least one is eligible. Eligible is defined as: if a lookup
    was unsafe, it would display a warning. {MaybeRedirects}
  </summary>
  <token key="Mechanism" variants="HPRTExperimentMechanism"/>
  <token key="MaybeRedirects" variants="HPRTExperimentMaybeRedirects"/>
</histogram>

<histogram name="SafeBrowsing.IOS.IsCheckCompletedOnShouldAllowResponse"
    enum="BooleanCompleted" expires_after="2024-06-27">
  <owner>ajuma@chromium.org</owner>
  <owner>joemerramos@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the Safe Browsing check is completed when a navigation response
    has arrived. If not, the navigation will be deferred until the Safe Browsing
    check is completed. Logs on each navigation response policy callback.
  </summary>
</histogram>

<histogram name="SafeBrowsing.IOS.SubframeCheck.Skipped" enum="BooleanSkipped"
    expires_after="2024-09-26">
  <owner>ajuma@chromium.org</owner>
  <owner>joemerramos@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether a subframe Safe Browsing check is skipped. This is recorded
    once for every subframe navigation policy decision.
  </summary>
</histogram>

<histogram name="SafeBrowsing.IOS.TotalDelay" units="ms"
    expires_after="2024-06-27">
  <owner>ajuma@chromium.org</owner>
  <owner>joemerramos@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when a navigation response policy decision was
    deferred by Safe Browsing check and when the check is completed. Logs each
    time that a navigation was deferred by Safe Browsing check and the Safe
    Browsing check doesn't block the URL.
  </summary>
</histogram>

<histogram name="SafeBrowsing.IOS.TotalDelay2{UserCategory}" units="ms"
    expires_after="2024-07-21">
  <owner>ajuma@chromium.org</owner>
  <owner>joemerramos@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when a navigation response policy decision was
    deferred by a Safe Browsing check and when the check is completed, for a
    {UserCategory} URL check request. This metric is different from
    SafeBrowsing.IOS.TotalDelay as it logs for each request, including those not
    deferred and those that are blocked, recording zero delay when the request
    is not deferred.
  </summary>
  <token key="UserCategory">
    <variant name=".FullUrlLookup" summary="real time"/>
    <variant name=".HashPrefixDatabaseCheck" summary="hash-prefix database"/>
    <variant name=".HashPrefixRealTimeCheck" summary="hash-prefix real-time"/>
    <variant name=".SkippedCheck" summary="skipped"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.LocalBinaryUploadRequest.DlpResult"
    enum="BooleanSuccess" expires_after="2023-10-20">
  <owner>rogerta@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records whether local DLP scanning succeeded or not. It is logged once
    for each binary upload with DLP scanning enabled (file download or upload
    with the appropriate enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsing.LocalBinaryUploadRequest.Duration" units="ms"
    expires_after="2023-10-20">
  <owner>rogerta@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records the duration of each binary upload request. It is logged once
    for each binary upload (file download or upload with the appropriate
    enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsing.LocalBinaryUploadRequest.Result"
    enum="BooleanSuccess" expires_after="2023-10-20">
  <owner>rogerta@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records whether DLP scanning succeeded or not. It is logged once for
    each binary upload with DLP scanning enabled (file download or upload with
    the appropriate enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsing.Macros.DocumentSize" units="KB"
    expires_after="2022-06-05">
  <obsolete>
    Removed 05-2022. This metric was historically stable and not being used.
  </obsolete>
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the size (in KB) of a download if it is a PDF or Office document
    before Safe Browsing client side checks are started.
  </summary>
</histogram>

<histogram name="SafeBrowsing.MetricsCollectorEventCountAtCleanup"
    units="events" expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the number of events in the metrics collector at cleanup time. This is
    logged at the beginning of cleanup, which occurs once every 24 hours.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.NavigationObserver.MissingInitiatorRenderFrameHostPortal"
    enum="BooleanExists" expires_after="2023-04-23">
  <owner>vollick@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>Logs the number of times we have a missing initiator RFH.</summary>
</histogram>

<histogram
    name="SafeBrowsing.NavigationObserver.NavigationEventsRecordedLength"
    units="count" expires_after="2024-02-25">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Count of how many NavigationEvents are recorded prior to appending recent
    navigations to the referrer chain.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.NavigationObserver.NotificationNavigationEventAdded"
    enum="BooleanAccepted" expires_after="2024-02-23">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the number of times we have added Push notification-intiated navigation
    events.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.NavigationObserver.NotificationOriginAddedToReferrerChain"
    enum="BooleanAccepted" expires_after="2024-02-23">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the number of times a notification's service worker's URL is added as a
    referrer in a referrer chain.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.ClearReason"
    enum="SafeBrowsingPageLoadTokenClearReason" expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the reason that page load tokens are cleared. Logged each time
    tokens are cleared.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.Duration" units="ms"
    expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the duration between a token is created and a token is retrieved.
    Logged each time GetPageLoadToken is called and the token is found in the
    token map.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.HasExpired" enum="BooleanExpired"
    expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a page load token has expired when it is retrieved. Logged
    each time GetPageLoadToken is called and the token is found in the token
    map.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.PasswordProtectionHasToken"
    enum="BooleanExists" expires_after="2023-12-24">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a page load token is found before password protection
    request is sent. Logged only when real time URL check is enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.RealTimeCheckHasToken"
    enum="BooleanExists" expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a page load token is found before real time URL check
    request is sent. Logged only when the check is on a subframe URL.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.TokenCount" units="entries"
    expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of page load tokens stored in verdict cache manager.
    Logged each time after a periodic clean up on expired tokens is performed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PakIntegrity.{PakFile}" enum="BooleanSuccess"
    expires_after="2024-05-01">
  <owner>drubery@chromium.org</owner>
  <owner>rsesek@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Reports whether the {PakFile} file's SHA-256 hash matches the digest
    produced at build-time. This detects on-disk corruption of the .pak file.
    Recorded at startup on ChromeOS, Linux, Mac, and Windows.
  </summary>
  <token key="PakFile">
    <variant name="Chrome100" summary="chrome_100_percent.pak"/>
    <variant name="Chrome200" summary="chrome_200_percent.pak"/>
    <variant name="Resources" summary="resources.pak"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.PhishySite.{UserEvent}" units="count"
    expires_after="2024-05-20">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of times a user {UserEvent} a site that was flagged as
    phishy by safe browsing. Logged after 5 minutes of inactivity or when the
    user leaves the page.
  </summary>
  <token key="UserEvent">
    <variant name="ClickEventCount" summary="clicks within"/>
    <variant name="KeyEventCount" summary="types into"/>
    <variant name="PasteEventCount" summary="pastes into"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.Pref.Daily.Extended" enum="BooleanEnabled"
    expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the Safe Browsing extended reporting service is currently enabled.
    Recorded for all non-Incognito profiles every 24 hours and at startup, if
    the last recording was more than 24 hours ago.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Pref.Daily.SafeBrowsingModeManaged"
    enum="BooleanManagedPref" expires_after="2024-01-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the Safe Browsing mode is managed by the user's admin. Recorded for
    all non-Incognito profiles every 24 hours and at startup if the last
    recording was more than 24 hours ago.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Pref.Daily.SafeBrowsingState"
    enum="SafeBrowsingState" expires_after="2024-09-29">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The current Safe Browsing state of the profile. Recorded for all
    non-Incognito profiles every 24 hours and at startup, if the last recording
    was more than 24 hours ago.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Pref.Enhanced" enum="BooleanEnabled"
    expires_after="2024-02-11">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the Safe Browsing enhanced protection service is currently enabled.
    Recorded for all non-Incognito profiles on profile startup.

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

<histogram name="SafeBrowsing.Pref.Extended" enum="BooleanEnabled"
    expires_after="2024-02-11">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the Safe Browsing extended reporting service is currently enabled.
    Recorded for all non-Incognito profiles on profile startup.

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

<histogram name="SafeBrowsing.Pref.General" enum="BooleanEnabled"
    expires_after="2024-02-11">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the Safe Browsing service is currently enabled. Recorded for all
    non-Incognito profiles on profile startup.

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

<histogram name="SafeBrowsing.Pref.MainProfile.SafeBrowsingState"
    enum="SafeBrowsingState" expires_after="2024-02-25">
  <owner>jeffcyr@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The current Safe Browsing state of the main profile. Recorded for all uma
    log at upload time by the SafeBrowsingMetricsProvider for the main profile
    only.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ReferrerAttributionResult"
    enum="SafeBrowsingAttributionResultTypes" expires_after="2024-09-21">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The result of referrer attribution, including different types of success or
    failure. This is incremented each time a safe browsing ping or download ping
    is generated.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ReferrerURLChainSize" units="units"
    expires_after="2024-02-20">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The length of referrer URL chain we get from referrer attribution. This is
    logged each time a safe browsing ping or download ping is generated.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.RendererThrottle.IsCheckCompletedOnProcessResponse"
    enum="BooleanCompleted" expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the Safe Browsing check is completed when the renderer URL
    loader starts to process a response. If not, the renderer URL loader will be
    deferred until the Safe Browsing check is completed. Logs each time the
    renderer URL loader dispatches WillProcessResponse() and the Safe Browsing
    check doesn't block the URL.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RendererThrottle.TotalDelay" units="ms"
    expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when the renderer URL loader was deferred by Safe
    Browsing check and when the check is completed. Logs each time the renderer
    URL loader was deferred by Safe Browsing check and the Safe Browsing check
    doesn't block the URL.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RendererThrottle.TotalDelay3" units="ms"
    expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when the renderer URL loader was deferred by Safe
    Browsing check and when the check is completed. This metric is different
    from SafeBrowsing.RendererThrottle.TotalDelay as it logs for each request,
    recording zero delay when the request is not deferred. This metric is
    different from SafeBrowsing.RendererThrottle.TotalDelay2 as it logs zero
    delay when the check is skipped.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.AllowlistSizeTooSmall"
    enum="BooleanUnavailable" expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the size of the high confidence allowlist is too small. It can
    happen if it is misconfigured on the server-side, or the local file is
    corrupted on the disk. If too small, the allowlist is considered as
    unavailable. Logged each time a top frame URL navigation happens for users
    who have the real time URL lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.AllStoresAvailable" enum="BooleanAvailable"
    expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the local Safe Browsing stores are available. If not, all URLs
    are marked as safe during real time URL lookup. Logged each time a top frame
    URL navigation happens for users who have the real time URL lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Backoff.State" enum="BooleanEnabled"
    expires_after="2024-02-11">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs if the real time URL lookup service is currently in backoff state due
    to previous errors. Logged each time a top frame URL navigation happens in
    non-incognito mode for users who have real time URL lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.CacheManager.CleanUpTime" units="ms"
    expires_after="2023-12-24">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the time it takes to run a cleanup task in cache manager. Logged each
    time a cleanup task is run.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.CacheManager.RealTimeVerdictCount"
    units="entries" expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of real time URL verdicts stored for this profile. Logged
    each time a new real time url verdict is cached.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.CanCheckDatabase" enum="BooleanEnabled"
    expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether Safe Browsing database can be checked in Safe Browsing URL
    checker. Logged each time a URL is checked by Safe Browsing URL checker.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.CannotCheckInvalidUrl" enum="BooleanEnabled"
    expires_after="2023-12-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the URL cannot be checked because it is not valid. Logged each
    time a URL is checked by Safe Browsing URL checker if real-time URL lookups
    are enabled and eligible for the request destination.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.ConsumerVersionReason"
    enum="SafeBrowsingRTConsumerVersionReason" expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the reason why a consumer version is preferred over the enterprise
    version for the RealTime URL Lookup service. Logged on all platforms with
    RealTime URL Lookup service, and logged whenever a URL is checked by Safe
    Browsing URL checker. May even be logged multiple times per URL check,
    depending on how many times the function is called.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.GetCache.FallbackThreatType"
    enum="SBThreatType" expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the threat type of cached verdicts. If the threat type is not safe, it
    means the cache is a false positive. False positive verdicts are safe
    verdicts in cache manager but turns out to be dangerous in the Safe Browsing
    database. Logged each time a URL is checked by real time URL lookup and the
    response is safe from the cache manager.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.GetCache.Time" units="ms"
    expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between the start of getting a result from the cache and
    when the cache is actually obtained. The time includes bouncing between IO
    and UI threads. This is an indicator of the efficiency of loading the cache.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.GetCacheResult"
    enum="SafeBrowsingRTLookupResponseVerdictType" expires_after="2024-02-04">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the result of real time URL cache lookup. If the result is
    VERDICT_TYPE_UNSPECIFIED, that means cache miss and a ping will be sent
    afterwards. Otherwise, ping won't be sent. This is an indicator of cache hit
    rate.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.GetCacheResultIsFromPastSession"
    enum="Boolean" expires_after="2024-03-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    If the real-time URL cache lookup had a cache hit, logs whether the cache
    entry was defined in a previous browser session rather than the current one.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.GetToken.Time" units="ms"
    expires_after="2024-02-20">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between the start of a token request and when the token is
    actually obtained. Logged each time a user performs a real-time Safe
    Browsing URL check with token.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.HasTokenFromFetcher" enum="BooleanHasToken"
    expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether a token received from the token fetcher is nonempty. Logged
    each time a response is received from the token fetcher. It shows the
    validity of the tokens received from the token fetcher.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.HasTokenInRequest" enum="BooleanHasToken"
    expires_after="2023-10-08">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether a token is attached when a URL lookup request is sent. Logged
    each time a URL lookup request is sent. It shows the percentage of URL
    lookup requests that are attached with tokens.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.IsLookupServiceAvailable"
    enum="BooleanAvailable" expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the real time URL lookup service is available when a real time
    URL check is needed. The real time URL lookup service is available if it is
    not nullptr and it is not in backoff mode. Logged when real time URL check
    is enabled and the URL doesn't match the allowlist.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.IsLookupSuccessful" enum="BooleanSuccess"
    expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the response of the real time URL lookup is successful. Logged
    on each resource check for which a lookup request is sent to the server. A
    failure can be either a network error or a parsing error.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.IsLookupSuccessful.{ReportType}"
    enum="BooleanSuccess" expires_after="2023-10-17">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the response of the real time URL lookup is successful when the
    report type is {ReportType}. Logged on each resource check for which a
    lookup request is sent to the server. A failure can be either a network
    error or a parsing error.
  </summary>
  <token key="ReportType">
    <variant name="NormalPing" summary="normal ping"/>
    <variant name="SampledPing" summary="sampled ping"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.RT.IsPopulationMbbOrEsb" enum="Boolean"
    expires_after="2022-10-23">
  <obsolete>
    Removed 09-2022. This histogram was added as part of a short-lived
    investigation, which is no longer being prioritized.
  </obsolete>
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the user population field is from the enabled populations
    (MBB and ESB) or not. Logged on every real time lookup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.LocalMatch.Result"
    enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2024-03-24">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the result of checking the URL against the local Safe Browsing high
    confidence allowlist. Logged each time a top frame URL navigation happens
    for users who have the real time URL lookups enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.LocalMatch.Result.{IsMainframe}{UserCategory}"
    enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2024-03-10">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the result of checking the {IsMainframe} URL against the local Safe
    Browsing high confidence allowlist for {UserCategory} real time URL check
    request. Logged each time a top frame URL navigation happens for users who
    have the real time URL lookups enabled. It can also be logged for
    non-mainframe URL hits for EnhancedProtection users.

    Until M117, this was being logged twice each time for iOS. Bucket ratios
    were still correct, just not total counts.
  </summary>
  <token key="IsMainframe">
    <variant name="Mainframe" summary="mainframe"/>
    <variant name="NonMainframe" summary="non mainframe"/>
  </token>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-02-25">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from SafeBrowsing real time URL lookups. Logged on
    each resource check for which a lookup request is sent to the server.
    Starting M92, the ERR_HTTP_RESPONSE_CODE_FAILURE net error is matched to the
    actual HTTP response code.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Network.Result.{ReportType}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2023-10-17">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from SafeBrowsing real time URL lookups when the
    report type is {ReportType}. Logged on each resource check for which a
    lookup request is sent to the server.
  </summary>
  <token key="ReportType">
    <variant name="NormalPing" summary="normal ping"/>
    <variant name="SampledPing" summary="sampled ping"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.RT.Network.Time" units="ms"
    expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the roundtrip time it took to perform a Safe Browsing real time URL
    lookup. Logged on each resource check for which a lookup request is sent to
    the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Request.ReferrerChainLength{UserCategory}"
    units="units" expires_after="2024-03-02">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the length of the referrer chain in a {UserCategory} real time URL
    check request. Logged on each resource check for which a lookup request is
    sent to the server.
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Request.Size" units="bytes"
    expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of a real time URL check request in bytes. Logged on each resource
    check for which a lookup request is sent to the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Request.UserPopulation"
    enum="SafeBrowsingUserPopulation" expires_after="2024-08-16">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the user population that was checked by Safe Browsing real time URL
    lookup. Logged on each resource check for which a lookup request is sent to
    the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.RequestDestinations.Checked"
    enum="RequestDestination" expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the request destination that was checked by Safe Browsing real time URL
    lookup. Logged on each resource check that is eligible for real time URL
    checks.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.RequestDestinations.Requested"
    enum="RequestDestination" expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the request destination that was requested to be checked by Safe
    Browsing real time URL lookup. Logged on each resource check.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Response.VerdictType"
    enum="SafeBrowsingRTLookupResponseVerdictType" expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the verdict type of the response from real time URL check. Logged each
    time a response is received and the threat info size is greater than 0.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Response.VerdictType.{UserPopulation}"
    enum="SafeBrowsingRTLookupResponseVerdictType" expires_after="2023-10-06">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the verdict type of the response from real time URL check from an
    {UserPopulation} user. This histogram tells us whether EnhancedProtection
    users are more likely to get dangerous verdicts as well as the average
    number of Protego pings for EnhancedProtection users and
    non-EnhancedProtection users.
  </summary>
  <token key="UserPopulation">
    <variant name="EnhancedProtection" summary="Enhanced Protection"/>
    <variant name="NotEnhancedProtection"
        summary="Any Non-Enhanced Protection"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.RT.SampledRequestSent" enum="Boolean"
    expires_after="2024-02-11">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the type of the real time URL check requests. It could be a sampled
    report request that only happens 1% of the time when URLs match the Protego
    allowlist, or a full report request otherwise when an real time URL request
    is sent.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.ThreatInfoSize" units="verdicts"
    expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the number of verdicts received in the real time URL check response.
    Logged on each resource check for which a lookup request is sent to the
    server.
  </summary>
</histogram>

<histogram base="true" name="SafeBrowsing.Settings.UserAction"
    enum="SafeBrowsingSettingsUserAction" expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the user action performed on the Safe Browsing settings page. Depending
    on the enum value, logged when the page is showned to the user or when the
    user performs an action on the page.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurity.ConsentedDesktopDialogDisabledOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2024-03-24">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-safebrowsing-alerts@google.com</owner>
  <summary>
    Records the result of displaying the Chrome enhanced protection
    opt-in/disabled dialog to sync users. It is logged once each time Chrome is
    informed that the account level enhanced protection bit has been disabled.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurity.ConsentedDesktopDialogEnabledOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2024-02-25">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-safebrowsing-alerts@google.com</owner>
  <summary>
    Records the result of displaying the Chrome enhanced protection
    opt-in/enabled dialog to sync users. It is logged once each time Chrome is
    informed that the account level enhanced protection bit has been enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurity.IsRecoveryTriggered"
    enum="Boolean" expires_after="2024-03-24">
  <owner>awado@chromium.org</owner>
  <owner>chrome-safebrowsing-alerts@google.com</owner>
  <summary>
    Records whether the observer-based retry mechanism for the
    ChromeTailoredSecurityService has been triggered or not which is logged on
    every update to the synced account ESB timestamp.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurity.ShouldRetryOutcome"
    enum="SafeBrowsingTailoredSecurityShouldRetryOutcome"
    expires_after="2024-09-06">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the outcome of running the tailored security retry logic. It is
    logged once each time Chrome starts for syncing users in the cases where the
    retry attempt could occur.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurity.SyncPromptEnabledNotificationResult"
    enum="SafeBrowsingTailoredSecurityNotificationResult"
    expires_after="2022-12-11">
  <obsolete>
    This metric was useful until 2022-07-29, when the experiment for
    TailoredSecurityDesktopNotice began and values for NoBrowserAvailable and
    NoWebContentsAvailable could also contain results from showing the disabled
    modal (due to crbug/1348654).
  </obsolete>
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result of trying to show the Chrome enhanced protection
    opt-in/enabled notification to sync users. It is logged once each time
    Chrome is informed that the account level enhanced protection bit has been
    enabled.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurity.SyncPromptEnabledNotificationResult2"
    enum="SafeBrowsingTailoredSecurityNotificationResult"
    expires_after="2024-02-25">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result of trying to show the Chrome enhanced protection
    opt-in/enabled notification to sync users. It is logged once each time
    Chrome is informed that the account level enhanced protection bit has been
    enabled.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurityConsented{Status}{PromptType}Outcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2024-02-20">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the outcome of displaying the {PromptType} when a signed-in, syncing
    user changes their account tailored security setting to {Status}.

    Notification prompts were removed in M113 along with the corresponding UX.
  </summary>
  <token key="Status">
    <variant name="Disabled" summary="disabled"/>
    <variant name="Enabled" summary="enabled"/>
  </token>
  <token key="PromptType">
    <variant name="Message" summary="android or iOS message"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityService.OAuthTokenCompletion"
    enum="BooleanSuccess" expires_after="2024-03-24">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Safe Browsing needs a token in order to make a request to get the tailored
    security service bit. This histogram tracks whether getting a token is
    successful or not.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityService.OAuthTokenErrorState"
    enum="GoogleServiceAuthError" expires_after="2024-03-24">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Safe Browsing needs a token in order to make a request to get the tailored
    security service bit. This histogram tracks the HTTP code when getting a
    token is not successful.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityService.OAuthTokenResponseCode"
    units="code" expires_after="2024-03-24">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    HTTP Response code returned by the server when trying to fetch the OAuth
    token for a tailored security service query.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityUnconsentedMessageDismissReason"
    enum="MessageDismissReason" expires_after="2023-11-11">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the specific reason a message was dismissed when a signed-in,
    non-syncing user changes their account tailored security setting and
    dismisses the corresponding message.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityUnconsentedModalOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2024-02-04">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the outcome of displaying a modal dialog on Desktop when a signed-in,
    non-syncing user changes their account tailored security setting in the flow
    of consenting.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurityUnconsentedPromotionNotificationOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2024-03-17">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the outcome of displaying a notification on desktop when a signed-in,
    non-syncing user changes their account tailored security setting not in the
    flow of consenting.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityUnconsented{Flow}MessageOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2024-02-20">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the outcome of displaying the message on Android when a signed-in,
    non-syncing user changes their account tailored security setting and is
    {Flow} of consenting.
  </summary>
  <token key="Flow">
    <variant name="InFlow" summary="in the flow"/>
    <variant name="OutOfFlow" summary="not in the flow"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.TokenFetcher.ErrorType"
    enum="GoogleServiceAuthError" expires_after="2024-02-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the error type from the token fetcher. Logs each time safe browsing
    gets a response from the token fetcher. When the error type is none, it
    means the token is obtained successfully.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Triggers.AdSampler.Action"
    enum="AdSamplerTriggerAction" expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Tracks the actions taken by the Ad Sampling trigger whenever it is executed.
    Warning: this histogram was expired from 2021-07-01 to 2021-10-25; data may
    be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Triggers.SuspiciousSite.Event"
    enum="SuspiciousSiteTriggerEvent" expires_after="2024-02-25">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Tracks the events occurring in the Suspicious Site trigger whenever it is
    executed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Database.DirectoryCreationResult"
    enum="PlatformFileError" expires_after="2024-02-20">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result of trying to create the &quot;Safe Browsing&quot;
    directory for storing the V4 database. Logged once on startup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Database.Size" units="KB"
    expires_after="2024-02-05">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of the SafeBrowsing database or file on disk in kilobytes, after
    reading it from disk on startup and after a database update has occurred.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Database.SizeLinear{ThreatTypeKB}"
    units="100 KB" expires_after="2023-11-11">
  <owner>kristianm@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of {ThreatTypeKB} SafeBrowsing database or file on disk in 100 KB,
    after reading it from disk on startup and after a database update has
    occurred. Linear version of V4Database.Size histogram.
  </summary>
  <token key="ThreatTypeKB">
    <variant name=".ChromeExtMalware" summary="extension malware"/>
    <variant name=".UrlMalBin" summary="malware"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4Database.SizeLinear{ThreatType}" units="MB"
    expires_after="2024-02-20">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of {ThreatType} SafeBrowsing database or file on disk in megabytes,
    after reading it from disk on startup and after a database update has
    occurred. Linear version of V4Database.Size histogram.
  </summary>
  <token key="ThreatType">
    <variant name="" summary="all"/>
    <variant name=".UrlSoceng" summary="social engineering"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4Database.UpdateLatency" units="ms"
    expires_after="2024-02-04">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The latency of updating the SafeBrowsing database. This measures the time
    difference between calls to update the SafeBrowsing V4 database. This gets
    logged after every call for an update to the database, except for the first
    one.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.CacheFullyHit" enum="BooleanCacheHit"
    expires_after="2024-02-20">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track whether a V4 request was able to be skipped because all parts of it
    were found in the local cache. Logged after the V4 local cache is checked.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.CacheHit.Result"
    enum="SafeBrowsingV4FullHashCacheResult" expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>Track cache hits for V4 full hashes.</summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.Check.Result"
    enum="SafeBrowsingV4GetHashCheckResult" expires_after="never">
<!-- expires-never: This is critical to track the health of Safe Browsing full hash requests. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>Track get hash response hits for V4 full hash requests.</summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.CountOfPrefixes" units="prefixes"
    expires_after="2024-02-25">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The number of prefixes included in a full hash request sent to the Google
    Safe Browsing servers. This is recorded each time there's a match found in
    the local database and requires sending a full hash request.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-02-04">
  <owner>vakh@google.com</owner>
  <owner>kcarattini@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from the SafeBrowsing Pver4 service. Logged after a
    GetHash or request finishes to capture the response code or error code for
    that call. Warning: this histogram was expired from M86 to M91. Data may be
    missing. Starting M92, the ERR_HTTP_RESPONSE_CODE_FAILURE net error is
    matched to the actual HTTP response code.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.Network.Time" units="ms"
    expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The time that it took to receive a response from the Google SafeBrowsing
    servers for a full hash request.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.Parse.Result"
    enum="SafeBrowsingParseV4HashResult" expires_after="never">
<!-- expires-never: This reports the reason for the failure to parse the response
from Safe Browsing. Keeping track of these errors is critical to ensure that
Safe Browsing lookup mechanism is working as expected -->

  <owner>vakh@chromium.org</owner>
  <owner>kcarattini@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the parsing results of a status 200 GetV4Hash request.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.Result"
    enum="SafeBrowsingV4OperationResult" expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track return status from V4 GetHash attempts. The buckets of this histogram
    overlap, so the counts cannot be used as percentages.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.Result.BackoffErrorCount" units="times"
    expires_after="2024-02-04">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of GetHash attempts skipped (due to being in backoff)
    within the same backoff time window. Logged if there are any backoff errors
    at the time of backoff window expiry.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4LocalDatabaseManager.ThreatInfoSize"
    units="verdicts" expires_after="2024-02-20">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of verdicts received in the full hash check. Logged each
    time a full hash check response is received.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.V4LocalDatabaseManager.TimeSinceLastUpdateResponse"
    units="ms" expires_after="2024-09-10">
  <owner>ajuma@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the time since the last network response was received for a request
    to udpate the Safe Browsing local database. This will be logged whenever the
    database is queried, but only if at least one such network response has been
    received since the browser was launched.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessFullUpdate.AdditionsHashesCount2"
    units="entries" expires_after="2024-04-18">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of additions hashes in a SafeBrowsing list full update.
    This was added in M92 to accomodate a larger maximum size.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessFullUpdate.ApplyUpdate.Result"
    enum="SafeBrowsingV4ApplyUpdateResult" expires_after="never">
<!-- expires-never: This reports the outcome of applying a full
update for a store received from PVer4 Safe Browsing service.
It helps us determine which Safe Browsing list is failing to
update (when that happens, no list gets updated). -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of applying a full update for a store received from PVer4
    SafeBrowsing service.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessFullUpdate.ApplyUpdateDuration"
    units="ms" expires_after="2024-02-11">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to perform a full update of a V4 store. This is
    recorded in thread time, to avoid recording any disk operations.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessFullUpdate.DecodeAdditions.Result"
    enum="SafeBrowsingV4DecodeResult" expires_after="never">
<!-- expires-never: This reports the outcome of decoding the latest update
received from reason Safe Browsing to apply to the local Safe Browsing
database. It is crucial to know that the Safe Browsing updates are being parsed
and applied correctly. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of decoding the Rice-encoded list of additions of 4-byte
    hash prefixes. This is logged once per store, per update containing
    Rice-encoded additions. This histogram is specific to processing full
    updates received from the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessFullUpdate.RemovalsHashesCount"
    units="entries" expires_after="2024-03-02">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of removals hashes in a SafeBrowsing list full update.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.AdditionsHashesCount"
    units="entries" expires_after="2024-08-16">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of additions hashes in a SafeBrowsing list partial
    update.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.ApplyUpdate.Result"
    enum="SafeBrowsingV4ApplyUpdateResult" expires_after="2024-03-10">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of applying a partial update for a store received from
    PVer4 SafeBrowsing service.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.ApplyUpdateDuration"
    units="ms" expires_after="2024-02-04">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to perform a partial update of a V4 store. This is
    recorded in thread time, to avoid recording any disk operations.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.DecodeAdditions.Result"
    enum="SafeBrowsingV4DecodeResult" expires_after="never">
<!-- expires-never: This reports the outcome of decoding the latest update
received from reason Safe Browsing to apply to the local Safe Browsing
database. It is crucial to know that the Safe Browsing updates are being parsed
and applied correctly. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of decoding the Rice-encoded list of additions of 4-byte
    hash prefixes. This is logged once per store, per update containing
    Rice-encoded additions. This histogram is specific to processing partial
    updates received from the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.DecodeRemovals.Result"
    enum="SafeBrowsingV4DecodeResult" expires_after="never">
<!-- expires-never: This reports the outcome of decoding the latest update
received from reason Safe Browsing to apply to the local Safe Browsing
database. It is crucial to know that the Safe Browsing updates are being parsed
and applied correctly. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of decoding the Rice-encoded list of indexes of hash
    prefixes to remove since the last update. This is logged once per store, per
    update containing Rice-encoded removals.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.RemovalsHashesCount"
    units="entries" expires_after="2024-03-17">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of removals hashes in a SafeBrowsing list partial update.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ReadFromDisk.ApplyUpdate.Result"
    enum="SafeBrowsingV4ApplyUpdateResult" expires_after="never">
<!-- expires-never: This reports the reason for the failure to use the Safe
Browsing database present on user's disk upon launch. Having this information
is crucial to know that the Safe Browsing updates are being read, applied, and
parsed correctly. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of applying an ListUpdateResponse read from disk after
    parsing it successfully as a protobuf.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ReadFromDisk.DecodeAdditions.Result"
    enum="SafeBrowsingV4DecodeResult" expires_after="never">
<!-- expires-never: This reports the outcome of decoding the latest update
received from reason Safe Browsing to apply to the local Safe Browsing
database. It is crucial to know that the Safe Browsing updates are being parsed
and applied correctly. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of decoding the Rice-encoded list of additions of 4-byte
    hash prefixes. This is logged once per store, per Chrome launch. It is
    specific to processing V4StoreFileFormat proto read from disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4ReadFromDisk.VerifyChecksumDuration" units="ms"
    expires_after="2024-02-11">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to verify the checksum of a V4 store. This is
    recorded in thread time, to avoid recording any disk operations.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Store.IsStoreValid" enum="BooleanValid"
    expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a store has valid data, when it is queried. This is logged
    once for every 256 times (a heuristic applied starting M104 for making
    recording more efficient) a store is checked (a few times for each download,
    and once when a potentially dangerous subresource is loaded).
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4StoreRead.Result"
    enum="SafeBrowsingV4StoreReadResult" expires_after="2024-02-25">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the parsing results of reading the SafeBrowsing V4 store file from
    disk. Recorded every time a store is read from disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4StoreWrite.Result"
    enum="SafeBrowsingV4StoreWriteResult" expires_after="never">
<!-- expires-never: This reports the reason for the failure to write the Safe
Browsing database update received from the API backend to the disk. It is crucial
to detect if we ever start failing to write the updates to disk which puts users'
security at risk. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the results of writing the SafeBrowsing V4 store file to disk.
    Recorded every time a store is written to disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4UnusedStoreFileExists.{Store}"
    enum="BooleanExists" expires_after="2024-02-20">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-safebrowsing-alerts@google.com</owner>
  <summary>
    Track the presence of store file {Store}.store, which was previously created
    but has been deprecated and needs to be removed from disk. Logged once per
    startup.
  </summary>
  <token key="Store">
    <variant name="IpMalware" summary="IpMalware"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4Update.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-02-25">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes when fetching updates from the SafeBrowsing PVer4
    service. Starting M92, the ERR_HTTP_RESPONSE_CODE_FAILURE net error is
    matched to the actual HTTP response code.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Update.Parse.Result"
    enum="SafeBrowsingParseV4UpdateResult" expires_after="never">
<!-- expires-never: This reports the reason for the failure to parse the Safe
Browsing database update received from the API backend. It is crucial to detect
if we ever start failing to parse the updates which puts users' security at
risk. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the parsing results of a status 200 GetV4Update request.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Update.ResponseSizeKB" units="KB"
    expires_after="2024-02-25">
  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of the response sent by the SafeBrowsing PVer4 service, in KB.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Update.Result"
    enum="SafeBrowsingV4OperationResult" expires_after="never">
<!-- expires-never: This reports the outcome of fetching the Safe Browsing
database update from the API backend. It is crucial to detect if we ever start
failing to fetch the updates which puts users' security at risk. -->

  <owner>vakh@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track return status from V4 update attempts. The buckets of this histogram
    overlap, so the counts cannot be used as percentages.
  </summary>
</histogram>

<histogram name="SafeBrowsing.WebView.AppOptIn" enum="SafeBrowsingAppOptIn"
    expires_after="2024-06-05">
  <owner>ntfschr@chromium.org</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    Records whether the application has explicitly opted in or out of Safe
    Browsing by manifest tag, or if they're relying on the default behavior.
    This is recorded once during startup.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.{CloudOrLocal}DeepScan.{Connector}.BytesPerSeconds"
    units="bytes" expires_after="2023-10-20">
  <owner>rogerta@chromium.org</owner>
  <owner>webprotect-team@google.com</owner>
  <summary>
    This records the bytes/sec from the size of a {CloudOrLocal} {Connector}
    request divided by the duration of a successful deep scanning upload
    request. It is logged once for each successful binary upload.
  </summary>
  <token key="CloudOrLocal" variants="CloudOrLocalDeepScan"/>
  <token key="Connector" variants="EnterpriseConnector"/>
</histogram>

<histogram
    name="SafeBrowsing.{CloudOrLocal}DeepScan.{Connector}{Result}.Duration"
    units="ms" expires_after="2024-02-20">
  <owner>domfc@chromium.org</owner>
  <owner>drubery@chromium.org</owner>
  <owner>rogerta@chromium.org</owner>
  <owner>sseckler@chromium.org</owner>
  <owner>webprotect-team@google.com</owner>
  <summary>
    This records the {CloudOrLocal} deep scanning duration of a user {Connector}
    request with {Result} result. It is logged once for each binary upload with
    that result.
  </summary>
  <token key="CloudOrLocal" variants="CloudOrLocalDeepScan"/>
  <token key="Connector" variants="EnterpriseConnector"/>
  <token key="Result">
    <variant name="" summary="any"/>
    <variant name=".BypassedByUser" summary="a BypassedByUser"/>
    <variant name=".CancelledByUser" summary="a CancelledByUser"/>
    <variant name=".FailedToGetToken" summary="a FailedToGetToken"/>
    <variant name=".FailedToGetVerdict" summary="a FailedToGetVerdict"/>
    <variant name=".FileEncrypted" summary="a FileEncrypted"/>
    <variant name=".FileTooLarge" summary="a FileTooLarge"/>
    <variant name=".Success" summary="a Success"/>
    <variant name=".Timeout" summary="a Timeout"/>
    <variant name=".TooManyRequests" summary="a TooManyRequests"/>
    <variant name=".Unknown" summary="an Unknown"/>
    <variant name=".UnsupportedFileType" summary="an UnsupportedFileType"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.{Process}Throttle.IntervalBetweenStartAndProcess{ResponseType}"
    units="ms" expires_after="2024-02-20">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the interval between when the {Process} URL loader starts a request and
    when the {Process} URL loader is ready to process the response
    {ResponseType}. Logs each time the URL loader is ready to process the
    response and the start request function is previously called. During this
    interval, Safe Browsing checks are performed in parallel.
  </summary>
  <token key="Process" variants="ThrottleProcess"/>
  <token key="ResponseType">
    <variant name="" summary="from local cache or network"/>
    <variant name=".FromCache" summary="from local cache (e.g. HTTP cache)"/>
    <variant name=".FromNetwork" summary="from network"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.{Process}Throttle.RequestDestination{RequestedSkippedOrChecked}"
    enum="RequestDestination" expires_after="2024-08-16">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the request destination of the URL that is checked by the {Process} URL
    loader throttle, and whether the URL check was {RequestedSkippedOrChecked}.
    Logged each time WillStartRequest is called.
  </summary>
  <token key="Process" variants="ThrottleProcess"/>
  <token key="RequestedSkippedOrChecked" variants="RequestedSkippedOrChecked"/>
</histogram>

<histogram name="SafeBrowsing.{Process}Throttle.TotalDelay2{ResponseType}"
    units="ms" expires_after="2024-08-16">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the latency between when the {Process} URL loader was deferred by Safe
    Browsing check and when the check is completed, for URL loaded
    {ResponseType}. This metric is different from
    SafeBrowsing.{Process}Throttle.TotalDelay as it logs for each request,
    recording zero delay when the request is not deferred.
  </summary>
  <token key="Process" variants="ThrottleProcess"/>
  <token key="ResponseType">
    <variant name=".FromCache" summary="from local cache (e.g. HTTP cache)"/>
    <variant name=".FromNetwork" summary="from network"/>
  </token>
</histogram>

<histogram name="SafeBrowsingBinaryUploadRequest.DlpResult"
    enum="BooleanSuccess" expires_after="2024-09-03">
  <owner>domfc@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records whether DLP scanning succeeded or not. It is logged once for
    each binary upload with DLP scanning enabled (file download or upload with
    the appropriate enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsingBinaryUploadRequest.Duration" units="ms"
    expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records the duration of each binary upload request. It is logged once
    for each binary upload (file download or upload with the appropriate
    enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsingBinaryUploadRequest.MalwareResult"
    enum="BooleanSuccess" expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records whether the malware deep scanning succeeded or not. It is
    logged once for each binary upload with malware scanning enabled (file
    download or upload with the appropriate enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsingBinaryUploadRequest.Result"
    enum="SafeBrowsingBinaryUploadResult" expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records the outcome of each binary upload request. It is logged once
    for each binary upload (file download or upload with the appropriate
    enterprise policies enabled).
  </summary>
</histogram>

<histogram name="SafeBrowsingBinaryUploadRequest.TimeToGetFCMToken" units="ms"
    expires_after="2024-03-17">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This record how long it took for the request to get the FCM token. It is
    logged every time a deep scanning request successfully gets a token.
  </summary>
</histogram>

</histograms>

</histogram-configuration>
