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

<!-- LINT.IfChange(EnterpriseConnector) -->

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

<!-- LINT.ThenChange(//components/enterprise/connectors/core/common.cc:EnterpriseConnector) -->

<!-- LINT.IfChange(GeminiAntiscamProtectionContentCategory) -->

<variants name="GeminiAntiscamProtectionContentCategory">
  <variant name="Charity" summary="charity"/>
  <variant name="Cryptocurrency" summary="cryptocurrency"/>
  <variant name="Empty" summary="empty"/>
  <variant name="GovernmentImpersonation" summary="government impersonation"/>
  <variant name="Investment" summary="investment"/>
  <variant name="Job" summary="job"/>
  <variant name="Miscellaneous" summary="miscellaneous"/>
  <variant name="NoMatchFound" summary="not a match for any of the categories"/>
  <variant name="OnlineShopping" summary="online shopping"/>
  <variant name="Phishing" summary="phishing"/>
  <variant name="Prize" summary="prize"/>
  <variant name="Romance" summary="romance"/>
  <variant name="TechSupport" summary="tech support"/>
  <variant name="TrojanizedSoftware" summary="trojanized software"/>
</variants>

<!-- LINT.ThenChange(//chrome/browser/safe_browsing/gemini_antiscam_protection/gemini_antiscam_protection_service.cc:GetContentCategory) -->

<variants name="GmsSafeBrowsingApiProtocol">
  <variant name="" summary=""/>
  <variant name=".LocalBlocklist" summary="local blocklist"/>
  <variant name=".RealTime" summary="real time"/>
</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="Applies both to consumer and enterprise checks."/>
  <variant name=".Consumer" summary="Applies only to consumer checks."/>
  <variant name=".Enterprise" summary="Applies only to enterprise checks."/>
</variants>

<variants name="ReferrerAttribution">
  <variant name=".ApkDownloadTelemetry"
      summary="APK downloads referrer attribution."/>
  <variant name=".CSDAttribution"
      summary="Client side detection referrer attribution."/>
  <variant name=".DownloadAttribution"
      summary="Download referrer attribution."/>
  <variant name=".MalwareInterstitialAttribution"
      summary="Malware interstitial referrer attribution."/>
  <variant name=".NativeFileSystemWriteAttribution"
      summary="Native File System Write attribution."/>
  <variant name=".PasswordEventAttribution" summary=""/>
  <variant name=".PhishingInterstitialAttribution"
      summary="Phishing interstitial referrer attribution."/>
  <variant name=".UwsInterstitialAttribution"
      summary="UwS interstitial referrer attribution."/>
</variants>

<variants name="SafeBrowsing_SBStore_Metrics">
  <variant name=".CertCsdDownloadAllowlist" summary=""/>
  <variant name=".CertCsdDownloadWhitelist" summary=""/>
  <variant name=".ChromeExtMalware" summary=""/>
  <variant name=".IpMalware" summary=""/>
  <variant name=".UrlBilling" summary=""/>
  <variant name=".UrlCsdAllowlist" summary=""/>
  <variant name=".UrlCsdDownloadAllowlist" summary=""/>
  <variant name=".UrlCsdDownloadWhitelist" summary=""/>
  <variant name=".UrlCsdWhitelist" summary=""/>
  <variant name=".UrlHighConfidenceAllowlist" summary=""/>
  <variant name=".UrlMalBin" summary=""/>
  <variant name=".UrlMalware" summary=""/>
  <variant name=".UrlSoceng" summary=""/>
  <variant name=".UrlSubresourceFilter" summary=""/>
  <variant name=".UrlSuspiciousSite" summary=""/>
  <variant name=".UrlUws" summary=""/>
</variants>

<variants name="SafeBrowsing_V5Store_Metrics">
  <variant name=".ChromeExtMalware_v5" summary=""/>
  <variant name=".UrlBilling_v5" summary=""/>
  <variant name=".UrlCsdAllowlist_v5" summary=""/>
  <variant name=".UrlCsdDownloadAllowlist_v5" summary=""/>
  <variant name=".UrlHighConfidenceAllowlist_v5" summary=""/>
  <variant name=".UrlMalBin_v5" summary=""/>
  <variant name=".UrlMalware_v5" summary=""/>
  <variant name=".UrlSoceng_v5" summary=""/>
  <variant name=".UrlSubresourceFilter_v5" summary=""/>
  <variant name=".UrlSuspiciousSite_v5" summary=""/>
  <variant name=".UrlUws_v5" summary=""/>
</variants>

<variants name="SafeBrowsingCheckUrlStep">
  <variant name="DatabaseNotReadyQueueDelay"
      summary="time spent waiting in queue because database was not ready"/>
  <variant name="GetFullHashDuration"
      summary="total duration of get full hash wait (cache or network)"/>
  <variant name="GetFullHashQueueDelay"
      summary="wait time in UI thread message loop before starting get full
               hash"/>
  <variant name="LocalLookup"
      summary="total end-to-end local lookup time on the UI thread"/>
  <variant name="LocalLookup.DbThreadQueueDelay"
      summary="time spent waiting in the DB thread's task queue"/>
  <variant name="LocalLookup.StoreLookupDuration"
      summary="actual lookup execution time in the store on DB thread"/>
  <variant name="LocalLookup.UiCallbackQueueDelay"
      summary="wait time returning back to UI thread message loop"/>
  <variant name="ResponseProcessingDuration"
      summary="time spent parsing and handling response on UI thread"/>
</variants>

<variants name="SafeBrowsingV4OrSB">
  <variant name="SB" summary="Safe Browsing"/>
  <variant name="V4" summary="Safe Browsing V4"/>
</variants>

<variants name="SafeBrowsingV4OrV5OrSB">
  <variant name="SB" summary="Safe Browsing"/>
  <variant name="V4" summary="Safe Browsing V4"/>
  <variant name="V5" summary="Safe Browsing V5"/>
</variants>

<variants name="SafeBrowsingV5OrSB">
  <variant name="SB" summary="Safe Browsing"/>
  <variant name="V5" summary="Safe Browsing V5"/>
</variants>

<variants name="ThreatSources">
  <variant name=""/>
  <variant name=".AndroidSafeBrowsing"/>
  <variant name=".AndroidSafeBrowsingRealTime"/>
  <variant name=".LocalPVer4"/>
  <variant name=".NativePVer5RealTime"/>
  <variant name=".Unknown"/>
  <variant name=".UrlRealTimeCheck"/>
</variants>

<variants name="V5CacheType">
  <variant name="HPRT" summary="hash-prefix real-time lookup"/>
  <variant name="V5Cache" summary="local lists v5 lookup"/>
</variants>

<variants name="V5CacheTypeForCounts">
  <variant name="HPRT.Cache" summary="hash-prefix real-time lookup"/>
  <variant name="V5Cache" summary="local lists v5 lookup"/>
</variants>

<variants name="V5ProcessUpdateType">
  <variant name="V5ProcessFullUpdate" summary="full update"/>
  <variant name="V5ProcessPartialUpdate" summary="partial update"/>
</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 on desktop. 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.AdvancedProtection.Enabled"
    enum="BooleanEnabled" expires_after="2027-02-14">
  <owner>pkotwicz@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the user has Advanced Protection enabled in Android
    settings. Logged on startup. 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="2027-01-03">
  <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.

    Warning: this histogram was expired from 2025-10-31 to 2025-12-23; data may
    be missing.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.IsInAllowlist.{AllowlistSource}Result"
    enum="AndroidRealTimeIsInAllowlistResult" expires_after="2027-05-10">
  <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="2026-11-15">
  <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="2027-02-07">
  <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="2025-10-31">
  <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="2027-01-03">
  <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.

    Warning: this histogram was expired from 2025-10-31 to 2025-12-15; data may
    be missing.
  </summary>
  <token key="AllowlistSource" variants="RealTimeUrlAllowlistSource"/>
</histogram>

<histogram
    name="SafeBrowsing.Android.RealTimeAllowlist.PopulateResourceFileElapsed"
    units="ms" expires_after="2025-10-31">
  <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="2027-01-10">
  <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.

    In M123, this was expanded to cover new kinds of failure leading to
    incomplete referrer chains.

    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="2027-02-07">
  <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.AndroidTelemetry.DownloadDirectlyTriggeredByIntent"
    enum="Boolean" expires_after="2027-02-07">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records whether an APK download on Android was triggered by an intent.
    It is true even when the intent URL does server-side redirects to the final
    redirect URL. It is false however in the case of any client-side navigation,
    whether triggered by the user or not. This is logged on every suspicious APK
    download.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ApplicationAdvancedProtectionStatusDetector.Changed.{ApplicationAPStatus}"
    enum="ApplicationAdvancedProtectionEvent" expires_after="2026-10-20">
  <owner>minap@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records events that change application-wide Advanced Protection status
    to {ApplicationAPStatus}.
  </summary>
  <token key="ApplicationAPStatus">
    <variant name="Disabled"
        summary="Application Advanced Protection status changed to disabled"/>
    <variant name="Enabled"
        summary="Application Advanced Protection status changed to enabled"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.AsyncCheck.CommittedNavigationIdsSize"
    units="count" expires_after="2027-01-03">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of committed navigation ids stored in async check tracker. Logged
    each time DidFinishNavigation is called. The size keeps growing until the
    tab is closed, so this histogram helps us track if we should clean up the
    ids at some point.
  </summary>
</histogram>

<histogram name="SafeBrowsing.AsyncCheck.HasPostCommitInterstitialSkipped"
    enum="BooleanSkipped" expires_after="2027-02-13">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether post commit interstitial is skipped when the check is completed
    and the result is don't proceed. Skipped means the check is completed before
    the navigation is finished, so the delay of the warning is minimum.
  </summary>
</histogram>

<histogram name="SafeBrowsing.AsyncCheck.PendingCheckersSize" units="count"
    expires_after="2026-12-22">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of pending checkers stored in async check tracker. Logged each time
    TransferUrlChecker is called. This histogram helps us track if we leak any
    pending checker.
  </summary>
</histogram>

<histogram name="SafeBrowsing.BlockingPage.ThreatType" enum="SBThreatType"
    expires_after="2026-11-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the threat type that triggers the safe browsing blocking page. Logged
    each time a safe browsing blocking page is created. Note that this metric
    may be biased towards SB_THREAT_TYPE_SAFE, the default threat type.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.BrowserThrottle.IntervalBetweenStartAndProcess{ResponseType}"
    units="ms" expires_after="2027-02-13">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the interval between when the browser URL loader starts a request and
    when the browser 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="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.BrowserThrottle.IsAsyncCheckerTransferred"
    enum="BooleanTransferred" expires_after="2027-02-14">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the async checker is transferred to the tracker when it can be
    transferred (sync check is completed and WillProcessResponse is called). If
    false, it means the async check is already completed. Only logged when async
    check is eligible for this URL loader.
  </summary>
</histogram>

<histogram name="SafeBrowsing.BrowserThrottle.IsAsyncCheckFasterThanSyncCheck"
    enum="BooleanYesNo" expires_after="2027-01-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs true if the browser throttle's async checks completed faster than its
    sync checks, and false if the sync checks completed faster. Is not logged if
    there is a tie, which can happen for skipped checks. Logged when the browser
    throttle destructs. Only logged if async checks are eligible.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.BrowserThrottle.IsAsyncCheckTrackerAliveOnTransfer"
    enum="BooleanAvailable" expires_after="2027-01-24">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the async check tracker is alive when the async checker is
    about to be transferred from the browser throttle to the tracker. Only
    logged when async check is eligible for this URL loader. The majority of the
    time the tracker should be alive, this metric is used to detect if the
    tracker is destroyed unexpectedly (i.e. the throttle outlives the tracker).
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.BrowserThrottle.IsCheckCompletedOnProcessResponse"
    enum="BooleanCompleted" expires_after="2027-02-07">
  <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.RequestDestination{RequestedSkippedOrChecked}"
    enum="RequestDestination" expires_after="2027-02-07">
  <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 browser URL
    loader throttle, and whether the URL check was {RequestedSkippedOrChecked}.
    Logged each time WillStartRequest is called.
  </summary>
  <token key="RequestedSkippedOrChecked">
    <variant name="" summary="requested"/>
    <variant name=".Checked" summary="checked"/>
    <variant name=".Skipped" summary="skipped"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.BrowserThrottle.TotalDelay2{ResponseType}"
    units="ms" expires_after="2027-02-07">
  <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 URL loaded
    {ResponseType}. This metric logs for each request, recording zero delay when
    the request is not deferred.
  </summary>
  <token key="ResponseType">
    <variant name=".FromCache" summary="from local cache (e.g. HTTP cache)"/>
    <variant name=".FromNetwork" summary="from network"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.BrowserThrottle.TotalDelay2{UserCategory}"
    units="ms" expires_after="2027-01-03">
  <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 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.CheckBrowseUrl.HasLocalMatch2"
    enum="BooleanMatched" expires_after="2027-01-17">
  <owner>thefrog@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.Action"
    enum="SafeBrowsingCheckUrlAction" expires_after="2027-02-14">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The action of URL check conducted by the Safe Browsing reputation lookup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.CheckUrl.Result.HashDatabase" enum="SBThreatType"
    expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The threat type result of the Safe Browsing local blocklist check. Logged
    each time a local browse URL check in DatabaseManagerMechanism completes.
  </summary>
</histogram>

<histogram name="SafeBrowsing.CheckUrl.Timeout" enum="BooleanTimedOut"
    expires_after="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.TimeTaken.{CheckType}" units="ms"
    expires_after="2027-01-31">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long a Safe Browsing {CheckType} lookup took. Logged each time
    this kind of check completes, even if it times out. Note: This is the check
    that was initially attempted, even if it ended up falling back to a
    different type of check.
  </summary>
  <token key="CheckType">
    <variant name="HashDatabase" summary="hash-prefix database"/>
    <variant name="HashRealTime" summary="hash-prefix real-time"/>
    <variant name="UrlRealTime" summary="URL real-time"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.CheckUrl.UrlRealTimeWithBackgroundHashRealTimeMechanismTriggered"
    enum="Boolean" expires_after="2026-07-12">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a background hash real-time lookup was triggered within the
    UrlRealTimeMechanism for the real-time URL checks.
  </summary>
</histogram>

<histogram name="SafeBrowsing.CheckUrl.UrlScheme" enum="SafeBrowsingUrlScheme"
    expires_after="2027-03-06">
  <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.BadRequestReportType"
    enum="ClientSafeBrowsingReportType" expires_after="2027-01-24">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the report type of client safe browsing reports that failed due to
    HTTP error 400: BAD_REQUEST. Logged each time the response is received once
    a report has been sent.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ClientSafeBrowsingReport.DownloadReportSize"
    units="bytes" expires_after="2027-03-02">
  <owner>yawfrempong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of a download client Safe Browsing report. Logged each time before
    a download report is sent.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.DownloadWarningActionSize"
    units="units" expires_after="2027-01-19">
  <owner>yawfrempong@google.com</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.Mainframe"
    enum="BooleanAvailable" expires_after="2026-11-11">
  <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 mainframe. If it is
    false, no report will be sent.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.HasThreatDetailsForTab.SecurityInterstitial"
    enum="BooleanAvailable" expires_after="2026-11-11">
  <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 security interstitial 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>
</histogram>

<!-- LINT.IfChange(ClientSafeBrowsingReportTypeString) -->

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.NetworkResult.{ReportType}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-01-31">
  <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 for
    report type {ReportType}.
  </summary>
  <token key="ReportType">
    <variant name="AdSample" summary="AdSample"/>
    <variant name="APKDownload" summary="APKDownload"/>
    <variant name="BlockedAdPopup" summary="BlockedAdPopup"/>
    <variant name="BlockedAdRedirect" summary="BlockedAdRedirect"/>
    <variant name="DangerousDownloadAutoDeleted"
        summary="DangerousDownloadAutoDeleted"/>
    <variant name="DangerousDownloadByAPI" summary="DangerousDownloadByAPI"/>
    <variant name="DangerousDownloadOpened" summary="DangerousDownloadOpened"/>
    <variant name="DangerousDownloadProfileClosed"
        summary="DangerousDownloadProfileClosed"/>
    <variant name="DangerousDownloadRecovery"
        summary="DangerousDownloadRecovery"/>
    <variant name="DangerousDownloadWarning"
        summary="DangerousDownloadWarning"/>
    <variant name="DangerousDownloadWarningAndroid"
        summary="DangerousDownloadWarningAndroid"/>
    <variant name="ExternalAppRedirect" summary="ExternalAppRedirect"/>
    <variant name="NotificationPermissionAccepted"
        summary="NotificationPermissionAccepted"/>
    <variant name="PhishySiteInteractions" summary="PhishySiteInteractions"/>
    <variant name="ServiceWorkerBehavior" summary="ServiceWorkerBehavior"/>
    <variant name="Unknown" summary="Unknown"/>
    <variant name="URLBilling" summary="URLBilling"/>
    <variant name="URLClientSidePhishing" summary="URLClientSidePhishing"/>
    <variant name="URLMalware" summary="URLMalware"/>
    <variant name="URLPasswordProtectionPhishing"
        summary="URLPasswordProtectionPhishing"/>
    <variant name="URLPhishing" summary="URLPhishing"/>
    <variant name="URLRealTimeAndHashRealTimeDiscrepancy"
        summary="URLRealTimeAndHashRealTimeDiscrepancy"/>
    <variant name="URLSuspicious" summary="URLSuspicious"/>
    <variant name="URLUnwanted" summary="URLUnwanted"/>
    <variant name="WarningShown" summary="WarningShown"/>
  </token>
</histogram>

<!-- LINT.ThenChange(//components/safe_browsing/core/browser/ping_manager.cc:ClientSafeBrowsingReportTypeString) -->

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.NetworkResult{IsAccessTokenIncluded}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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="" summary="response is received"/>
    <variant name=".NoAccessToken" summary="has no access token"/>
    <variant name=".YesAccessToken" summary="has an access token"/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.PasswordReuse.RepeatVisit2"
    enum="BooleanRepeatVisit" expires_after="2026-12-27">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    After a user has interacted with a PhishGuard UI, record whether the user
    has visited the page before.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.PersistDownloadReportResult"
    enum="ClientReportPersistDownloadReportResult" expires_after="2026-10-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result of the call to persisting a download report on disk.
    Logged each time a download report needs to be persisted at shutdown.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.PersisterReadReportSuccessful"
    enum="BooleanSuccess" expires_after="2026-12-22">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether reading a persisted report is successful. Logged each time a
    persisted report is found on startup.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSafeBrowsingReport.PersisterReportCountOnStartup"
    units="count" expires_after="2026-10-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>Record the number of persisted report on startup.</summary>
</histogram>

<histogram name="SafeBrowsing.ClientSafeBrowsingReport.PersisterWriteResult"
    enum="ClientReportPersisterWriteResult" expires_after="2027-04-10">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result of persisting a report on disk. Logged each time the
    persister write a report on disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ClientSafeBrowsingReport.ReportType"
    enum="ClientSafeBrowsingReportType" expires_after="2027-01-03">
  <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="2026-10-26">
  <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.ClientSafeBrowsingReport.ResponseReceived"
    enum="ClientSafeBrowsingReportType" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs per report type when the network request to send the report completes.
    Logged each time the response is received once a report has been sent.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ClientSafeBrowsingReport.ResponseSuccessful"
    enum="ClientSafeBrowsingReportType" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs per report type when the network request to send the report completes
    when the response was 200 OK and no net error. Logged each time the response
    is received once a report has been sent.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSidePhishingDetection.AllowlistAsyncMatchResult"
    enum="AllowlistAsyncMatchResult" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the result of an asynchronous CSD allowlist lookup in
    AllowlistCheckerClient. Recorded when an async lookup completes or times
    out.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ClientSidePhishingDetection.AllowlistCheckDuration"
    units="ms" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the duration of checking a URL against the local client-side
    phishing detection allowlist in AllowlistCheckerClient. Recorded when the
    check completes, whether synchronously (immediate match/no match) or after
    an asynchronous lookup completes.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ClientSidePhishingDetection.AllowlistMatchResult"
    enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2027-01-24">
  <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="2027-02-13">
  <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="2027-06-17">
  <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.Desktop.AdvancedProtection.Enabled"
    enum="BooleanEnabled" expires_after="2027-02-14">
  <owner>pkotwicz@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the user's signed-in account is enrolled in the Google
    Advanced Protection Program. Records false if the profile is not signed-in.
    Logged on startup. 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.Enhanced.ProtegoRequestSentInLast24Hours"
    enum="SafeBrowsingEnhancedProtegoPingType" expires_after="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.Enhanced.ProtegoRequestSentInLast24Hours2"
    enum="SafeBrowsingEnhancedProtegoPingType" expires_after="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Similar to the metric SafeBrowsing.Enhanced.ProtegoRequestSentInLast24Hours.
    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. Different from
    ProtegoRequestSentInLast24Hours, if the user has sent a ping of multiple
    types since the last time this metric was logged, kWithToken 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.Enhanced.ProtegoRequestSentInLast28Days"
    enum="SafeBrowsingEnhancedProtegoPingType" expires_after="2026-11-15">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Similar to the SafeBrowsing.Enhanced.ProtegoRequestSentInLast7Days metric,
    records whether an ESB user has sent a Protego ping to the Safe Browsing
    consumer API servers within the last 28 days. 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. Pings that had a
    token are logged preferrentially over pings without a token. This metric is
    logged at most once per day and only for users that have enhanced protection
    enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Enhanced.ProtegoRequestSentInLast7Days"
    enum="SafeBrowsingEnhancedProtegoPingType" expires_after="2027-09-08">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Similar to the SafeBrowsing.Enhanced.ProtegoRequestSentInLast24Hours2
    metric, records whether an ESB user has sent a Protego ping to the Safe
    Browsing consumer API servers within the last 7 days. 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. Pings that
    had a token are logged preferrentially over pings without a token. 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="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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="2026-12-22">
  <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="2027-02-13">
  <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="2027-03-14">
  <owner>jacastro@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.EsbDownloadRowPromo.Outcome"
    enum="SafeBrowsingEsbDownloadRowPromoOutcome" expires_after="2026-10-25">
  <owner>awado@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the outcome of showing an ESB promotion on a download item on the
    chrome://downloads page. Promotions are only shown on downloads that have
    been determined to be dangerous and only when the user is able to enable
    enhanced protection. The histogram outcome is recorded on display and on
    every click on the promotion.
  </summary>
</histogram>

<histogram name="SafeBrowsing.EsbPromotionFlow.IphShown"
    enum="SafeBrowsingReferralMethod" expires_after="2026-09-20">
  <owner>awado@google.com</owner>
  <owner>chrome-counter-abuse-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="2027-05-11">
  <owner>richche@google.com</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="2027-05-11">
  <owner>richche@google.com</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="2027-05-11">
  <owner>richche@google.com</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="2027-05-11">
  <owner>richche@google.com</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{Trigger}"
    enum="BooleanSuccess" expires_after="2027-05-11">
  <owner>richche@google.com</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{Trigger}. Write requests happen on Chrome shutdown and when an
    extension telemetry upload is not successful.
  </summary>
  <token key="Trigger">
    <variant name="" summary=""/>
    <variant name=".AtShutdown" summary="at shutdown"/>
    <variant name=".AtWriteInterval" summary="at write interval"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.ExtensionSafetyHub.ThreeDotDetails"
    units="Navigation" expires_after="2027-05-11">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extensions that trigger a safety check review are displayed to the user via
    a panel on the chrome://extensions/ page. If a user clicks the three dot
    menu's get more details button, we record it here.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionSafetyHub.Trigger.{Action}"
    enum="SafetyCheckWarningReason" expires_after="2027-05-11">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Extensions that trigger a safety check review are displayed to the user via
    a panel on the chrome://extensions/ page. These extensions should be
    reviewed by the user and acknowledged or removed. This metric records when
    an extension is {Action} in the extension review panel on the
    chrome://extensions/ page.
  </summary>
  <token key="Action">
    <variant name="Kept" summary="kept"/>
    <variant name="Removed" summary="removed"/>
    <variant name="Shown" summary="shown"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.Enterprise.ReportSize"
    units="bytes" expires_after="2027-05-11">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of an enterprise telemetry report. This is recorded once for each
    send to Chrome Enterprise Reporting server, regardless of whether it was
    successful. Sending attempts occur periodically (default period is 5
    minutes).
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.Enterprise.Signals.SignalType"
    enum="SBExtensionTelemetrySignalsSignalType" expires_after="2027-05-11">
  <owner>richche@google.com</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 cookies.get API call is invoked). Applicable only to
    enterprise.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.FileData.CollectionDuration"
    units="ms" expires_after="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <owner>richche@google.com</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="2027-05-11">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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="2027-05-11">
  <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="2027-05-11">
  <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="2027-05-11">
  <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.SearchHijackingDetector.HeuristicMatch"
    enum="Boolean" expires_after="2026-12-20">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the search hijacking detector's heuristic has been matched.
    A match is triggered when the number of omnibox searches exceeds the number
    of search engine results page (SERP) landings by a certain threshold within
    a given time interval. This is logged each time the heuristic check is
    performed.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.ExtensionTelemetry.SearchHijackingDetector.SearchVsSerpCount"
    enum="SBExtensionTelemetrySearchVsSerpCount" expires_after="2026-12-20">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records a comparison of the omnibox search and search engine results page
    (SERP) landing counts at a given time interval. This is logged each time the
    heuristic check is performed if at least one of the two counts is greater
    than 0.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.Signals.Discarded"
    enum="SBExtensionTelemetrySignalsSignalType" expires_after="2027-05-11">
  <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="2027-05-11">
  <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. Applicable only to ESB.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.UploadSize" units="bytes"
    expires_after="2027-05-11">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.UploadSize.{SignalType}"
    units="bytes" expires_after="2027-05-11">
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The data size of the {SignalType} generated for an extension. The size is
    recorded at the time of telemetry report creation, regardless of whether the
    report is uploaded or not.
  </summary>
  <token key="SignalType">
    <variant name="CookiesGet" summary="CookiesGet telemetry signal"/>
    <variant name="CookiesGetAll" summary="CookiesGetAll telemetry signal"/>
    <variant name="DeclarativeNetRequest"
        summary="DeclarativeNetRequest telemetry signal"/>
    <variant name="DeclarativeNetRequestAction"
        summary="DeclarativeNetRequestAction telemetry signal"/>
    <variant name="PotentialPasswordTheft"
        summary="PotentialPasswordTheft telemetry signal"/>
    <variant name="RemoteHostContacted"
        summary="RemoteHostContacted telemetry signal"/>
    <variant name="TabsApi" summary="TabsApi signal"/>
    <variant name="TabsExecuteScript"
        summary="TabsExecuteScript telemetry signal"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.ExtensionTelemetry.UploadSuccess"
    enum="BooleanSuccess" expires_after="2027-05-11">
  <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="2027-05-11">
  <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="2026-11-15">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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="2027-09-27">
  <owner>yawfrempong@google.com</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.FailedUpdateDestinationVersion"
    units="FileTypePolices Version" expires_after="2027-01-06">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the new config version when we fail to update due to the new version
    being lower than the current version.
  </summary>
</histogram>

<histogram name="SafeBrowsing.FileTypeUpdate.FailedUpdateSourceVersion"
    units="FileTypePolices Version" expires_after="2027-01-06">
  <owner>drubery@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the current config version when we fail to update due to the new
    version being lower than the current version.
  </summary>
</histogram>

<histogram name="SafeBrowsing.FileTypeUpdate.ResourceBundleResult"
    enum="SBFileTypeUpdateResult" expires_after="2027-01-06">
  <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="2027-01-06">
  <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.GeminiAntiscamProtection.IsHistoryServiceResultValid"
    enum="BooleanSuccess" expires_after="2027-01-26">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the history service was able to determine the number of
    visits to the URL. If the history service was not able to determine the
    number of visits, we don't need to run Gemini. Logged when the history
    service checks if the URL has been visited, before possibly running Gemini.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.GeminiAntiscamProtection.ShouldSkipDueToPreviousVisit"
    enum="BooleanRepeatVisit" expires_after="2027-01-26">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the URL has been visited before. If the URL has been visited
    before, we don't need to run Gemini. Logged when the history service checks
    if the URL has been visited, before possibly running Gemini.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.GeminiAntiscamProtection.{GeminiAntiscamProtectionContentCategory}.ScamScore"
    units="score" expires_after="2027-01-26">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the scam score (or probability of the page being a scam). Logged
    when the Gemini model response is parsed, the scam score is extracted from
    the response, and the content category is
    {GeminiAntiscamProtectionContentCategory}.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.GeminiAntiscamProtection.{GeminiAntiscamProtectionResponseStatus}.Latency"
    units="ms" expires_after="2027-01-26">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the latency of receiving a response from the Gemini Antiscam
    Protection request. Log when the response is received and
    {GeminiAntiscamProtectionResponseStatus}.
  </summary>
  <token key="GeminiAntiscamProtectionResponseStatus">
    <variant name="FailedEmptyResponse" summary="the value is empty."/>
    <variant name="FailedParsingError"
        summary="the value cannot be parsed, so it is invalid."/>
    <variant name="Success" summary="the value is valid."/>
  </token>
</histogram>

<histogram name="SafeBrowsing.GetReferringAppInfo.Duration" units="ms"
    expires_after="2027-01-12">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the duration GetReferringAppInfo. Recorded on downloads in Clank, PG
    pings, and viewing the Referrer Chain tab of chrome://safe-browsing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GetReferringAppInfo.WithWebApk.Duration"
    units="ms" expires_after="2026-12-06">
  <owner>chlily@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the elapsed time in GetReferringAppInfo() when requesting WebAPK
    info to be retrieved from Java. This is recorded on a subset of calls for
    which SafeBrowsing.GetReferringAppInfo.Duration is recorded.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GetReferringAppInfo.WithWebApk.FoundWebApk"
    enum="BooleanFound" expires_after="2026-12-06">
  <owner>chlily@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether GetReferringAppInfo(), when requesting WebAPK info to be
    retrieved from Java, found a valid WebAPK start_url.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ApiExceptionStatusCode"
    enum="SafeBrowsingApiExceptionStatusCode" expires_after="2027-01-03">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the status code from SafeBrowsing API. Only logged if the API throws
    an ApiException. The code definition can be found in
    https://developers.google.com/android/reference/com/google/android/gms/common/api/CommonStatusCodes.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.CheckDelta{Protocol}"
    units="microseconds" expires_after="2027-01-31">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The microseconds between sending the SafeBrowsing API {Protocol} 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>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.HasUnknownExceptionType"
    enum="BooleanSafeBrowsingApiUnknownException" expires_after="2026-10-11">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the Safe Browsing API throws an unknown exception type. Only
    logged if the API throws an exception.
  </summary>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.IsAvailable{Protocol}"
    enum="BooleanAvailable" expires_after="2027-02-07">
  <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 {Protocol} URL check starts.
  </summary>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram
    name="SafeBrowsing.GmsSafeBrowsingApi.JavaValidationResult{Protocol}"
    enum="SafeBrowsingApiJavaValidationResult" expires_after="2027-02-07">
  <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 {Protocol} 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>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.LookupResult{Protocol}"
    enum="SafeBrowsingApiLookupResult" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the {Protocol} 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>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ResponseStatus{Protocol}"
    enum="SafeBrowsingApiResponseStatus" expires_after="2027-01-10">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the {Protocol} 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>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram
    name="SafeBrowsing.GmsSafeBrowsingApi.ThreatAttributeCount{Protocol}"
    units="entries" expires_after="2027-04-10">
  <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
    {Protocol} lookup result is successful.
  </summary>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ThreatAttribute{Protocol}"
    enum="SafeBrowsingApiThreatAttribute" expires_after="2026-12-22">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records each threat attribute from SafeBrowsing API if the {Protocol} 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>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram name="SafeBrowsing.GmsSafeBrowsingApi.ThreatType2{Protocol}"
    enum="SafeBrowsingApiThreatType" expires_after="2027-02-07">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the threat type from SafeBrowsing API if the {Protocol} lookup
    result is successful. In rare circumstance (e.g. version mismatch), there
    may be out of range samples in this histogram. The second version is
    introduced because SOCIAL_ENGINEERING is switched from 2 to 5.
  </summary>
  <token key="Protocol" variants="GmsSafeBrowsingApiProtocol"/>
</histogram>

<histogram name="SafeBrowsing.HPRT.AllowlistSizeTooSmall"
    enum="BooleanUnavailable" expires_after="2027-02-05">
  <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="2027-02-05">
  <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.BackoffEnabled.Network.Result.WhenEnteredBackoff"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
  <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 when
    the service is in backoff mode. This is the network result that was present
    when we entered backoff mode. Logged when a lookup check is attempted while
    in backoff.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.HPRT.BackoffEnabled.OperationOutcome.WhenEnteredBackoff"
    enum="SafeBrowsingHPRTOperationOutcome" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the operation outcome for hash-prefix real-time lookups when the
    service is in backoff mode. This is the operation outcome that was present
    when we entered backoff mode. Logged when a lookup check is attempted while
    in backoff.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.BackoffState" enum="BooleanBackoff"
    expires_after="2027-02-05">
  <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.CacheHitAllPrefixes" enum="BooleanCacheHit"
    expires_after="2027-02-05">
  <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.CanGetReputationOfUrl"
    enum="BooleanCanCheckUrl" expires_after="2027-02-05">
  <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.FailedNetResultIsFromEarlyOhttpClientDestruct"
    enum="BooleanYesNo" expires_after="2027-02-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged when a SafeBrowsing hash-prefix real-time lookup request results in a
    net error ERR_FAILED. Specifies whether or not the error was caused by the
    OHTTP client destructing before it completed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.FoundUnmatchedFullHashes"
    enum="BooleanFound" expires_after="2027-02-05">
  <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="2027-02-05">
  <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.HashDatabaseFallbackThreatType{TriggerType}"
    enum="SBThreatType" expires_after="2027-02-05">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the threat type when the hash-prefix real-time lookup falls back to
    hash-prefix local database lookup. This happens when {TriggerType}.
  </summary>
  <token key="TriggerType">
    <variant name=".AllowlistMatch" summary="the URL matches the allowlist"/>
    <variant name=".OriginalCheckFailed"
        summary="the hash-prefix real-time lookup failed"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.HasOhttpKey" enum="BooleanHasKey"
    expires_after="2027-02-05">
  <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="2027-02-05">
  <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="FeatureOff" summary="the feature being disabled"/>
    <variant name="IneligibleForLocation" summary="the location"/>
    <variant name="IneligibleForSafeBrowsingState"
        summary="not having standard protection or enhanced protection"/>
    <variant name="IneligibleForSessionOrLocation"
        summary="the feature being disabled for the session or the location"/>
    <variant name="NoGoogleChromeBranding"
        summary="the session not being branded"/>
    <variant name="NotAllowedByPolicy" summary="not being allowed by policy"/>
    <variant name="OffTheRecord" summary="being off the record"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.IsLookupServiceFound" enum="BooleanFound"
    expires_after="2027-02-05">
  <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="2027-02-05">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.Result.WhenEnteringBackoff"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-05">
  <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{Suffix}" units="ms"
    expires_after="2027-02-05">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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. Note that this {Suffix}.
  </summary>
  <token key="Suffix">
    <variant name="" summary="includes the time to get the OHTTP key"/>
    <variant name=".Failure"
        summary="includes the time to get the OHTTP key, and is only logged
                 when the network request fails"/>
    <variant name=".Hash" summary="excludes the time to get the OHTTP key"/>
    <variant name=".Hash.Failure"
        summary="excludes the time to get the OHTTP key, and is only logged
                 when the network request fails"/>
    <variant name=".Hash.Success"
        summary="excludes the time to get the OHTTP key, and is only logged
                 when the network request succeeds"/>
    <variant name=".Success"
        summary="includes the time to get the OHTTP key, and is only logged
                 when the network request succeeds"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.Network.{ResponseSource}Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-05">
  <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 that
    are obtained from {ResponseSource}. Logged on each resource check for which
    a lookup request is sent to the server. Not logged if the response is not
    from {ResponseSource}.
  </summary>
  <token key="ResponseSource">
    <variant name=""
        summary="aggregated OHTTP handler callback or direct fetch"/>
    <variant name="InnerResponse"
        summary="inner OHTTP response (Safe Browsing)"/>
    <variant name="NetError" summary="internal OHTTP handler net error"/>
    <variant name="OuterResponse" summary="outer OHTTP response (proxy)"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.BackoffState"
    enum="BooleanBackoff" expires_after="2027-02-05">
  <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="2027-02-05">
  <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.FirstLookupResponseCodeFromCurrentKey"
    enum="HttpResponseCode" expires_after="2027-02-05">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    HTTP response code from the first SafeBrowsing hash-prefix real-time lookup
    using the current ohttp key. Logged only for the first response after a new
    ohttp key is fetched. This histogram helps us understand how often a new key
    fails to work. Not logged if this is the first request using the key that is
    retrieved from disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.HasCachedKey"
    enum="BooleanHasKey" expires_after="2027-02-05">
  <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="2027-02-05">
  <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{Version}{Suffix}"
    units="ms" expires_after="2027-02-05">
  <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 {Suffix}. {Version}
  </summary>
  <token key="Version">
    <variant name="" summary=""/>
    <variant name="2"
        summary="This version of the histogram logs a larger set of buckets
                 since the request timeout length is longer than the default
                 max bucket of 10 seconds."/>
  </token>
  <token key="Suffix">
    <variant name="" summary="is sent to the server"/>
    <variant name=".Empty" summary="is empty"/>
    <variant name=".Failure" summary="fails"/>
    <variant name=".Invalid" summary="is invalid"/>
    <variant name=".NoKeys" summary="has no keys"/>
    <variant name=".Success" summary="succeeds"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.NumKeys" units="keys"
    expires_after="2027-02-05">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the number of keys in the OHTTP key fetch response. Logged on each
    successful key fetch response that is received from the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.Outcome"
    enum="SafeBrowsingKeyFetchOutcome" expires_after="2027-02-05">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the outcome of the OHTTP key fetch. Logged on each key fetch response
    that is received from the server.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OhttpKeyService.ResponseSize{Suffix}"
    units="bytes" expires_after="2027-02-05">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the size of the OHTTP key fetch response. Logged on each key fetch
    response that is received from the server and valid at the network level
    {Suffix}.
  </summary>
  <token key="Suffix">
    <variant name="" summary=""/>
    <variant name=".Invalid" summary="and where keys are invalid"/>
    <variant name=".NoKeys" summary="and has no keys"/>
    <variant name=".Valid" summary="and where keys are valid"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.HPRT.OperationOutcome"
    enum="SafeBrowsingHPRTOperationOutcome" expires_after="2027-02-05">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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
    when the service is returning a response, which can be: if the result is
    found in the local cache, if the lookup doesn't run because the service is
    in backoff mode, if the lookup doesn't run because the OHTTP key can't be
    fetched, or after the lookup network request returns.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.OperationOutcome.WhenEnteringBackoff"
    enum="SafeBrowsingHPRTOperationOutcome" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the operation outcome for hash-prefix real-time lookups when
    entering backoff mode.
  </summary>
</histogram>

<histogram name="SafeBrowsing.HPRT.Request.CountOfPrefixes" units="prefixes"
    expires_after="2027-02-05">
  <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="2027-02-05">
  <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.IOS.IsCheckCompletedOnShouldAllowResponse"
    enum="BooleanCompleted" expires_after="2027-05-10">
  <owner>danieltwhite@google.com</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.RepeatedResponseCalled"
    enum="BooleanSubsequentResponse" expires_after="2027-03-08">
  <owner>danieltwhite@google.com</owner>
  <owner>joemerramos@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether a subsequent Safe Browsing navigation response without a
    matching call to ShouldAllowRequest was called. Logs on each subsequent
    navigation response policy callback.
  </summary>
</histogram>

<histogram name="SafeBrowsing.IOS.TotalDelay" units="ms"
    expires_after="2027-05-11">
  <owner>danieltwhite@google.com</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="2027-05-31">
  <owner>danieltwhite@google.com</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="2026-11-20">
  <owner>domfc@chromium.org</owner>
  <owner>nancylanxiao@google.com</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="2026-11-20">
  <owner>domfc@chromium.org</owner>
  <owner>nancylanxiao@google.com</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="2026-11-20">
  <owner>domfc@chromium.org</owner>
  <owner>nancylanxiao@google.com</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.MultipartUploader.NetworkResult.{UploaderConsumer}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2026-11-29">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>drubery@chromium.org</owner>
  <owner>nancylanxiao@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The net error or HTTP response code returned when a multipart uploader
    response is received for {UploaderConsumer}.
  </summary>
  <token key="UploaderConsumer">
    <variant name="ConsumerUpload" summary="consumer uploads"/>
    <variant name="DownloadFeedback" summary="download feedback"/>
    <variant name="EnterpriseUpload" summary="enterprise uploads"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.NavigationIdMatchedInUnsafeResource"
    enum="BooleanMatched" expires_after="2026-12-22">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the navigation id of the current navigation matches the one
    that is stored in unsafe resources. A warning will likely be shown if the
    value is true. Logged when PopUnsafeResourceForNavigation is called and the
    URL already matches. This histogram will help us understand how many
    warnings are skipped because the navigation id doesn't match.
  </summary>
</histogram>

<histogram name="SafeBrowsing.NavigationThrottle.IsSameURL"
    enum="BooleanSameURL" expires_after="2027-02-14">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the URL being navigated to is the same as the URL flagged by
    Safe Browsing. They can be different if a server redirect is encountered.
    Logged each time a pre-commit Safe Browsing error page is about to show. If
    the URL is not the same, the URL displayed in the URL bar will be incorrect.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.NotificationContentDetection.AllowlistCheckLatency"
    units="ms" expires_after="2027-01-03">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the latency of performing an allowlist check that happens before
    (possibly) performing inference on the notification content detection model.
    Logged when there is a request to display a persisitent notification.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.NotificationContentDetection.DisplayPersistentNotificationEvent"
    enum="DisplayPersistentNotificationEvents" expires_after="2027-01-17">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records 2 events for displaying a persistent notification for the feature
    that shows warnings for suspicious notifications. The first event is logged
    when a request is made to check the model, where the notification would
    otherwise be displayed immediately. The second event is logged when the
    notification content detection code actually displays the notification. This
    histogram is temporary for validating the correctness of the suspicious
    notification warning feature and the two event counts should match.
  </summary>
</histogram>

<histogram name="SafeBrowsing.NotificationContentDetection.SuspiciousScore"
    units="score" expires_after="2027-01-03">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the suspicious label's score (or probability) from the notification
    content detection LiteRT model for some notification contents. Logged each
    time model inference is performed on the notification content model (for
    non-allowlisted sites only).
  </summary>
</histogram>

<histogram name="SafeBrowsing.NotificationRevocationSource"
    enum="NotificationRevocationSource" expires_after="2026-12-27">
  <owner>skrakowi@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the reason an unwanted notification revocation occurred. Logged when
    the notification permission is revoked.
  </summary>
</histogram>

<histogram name="SafeBrowsing.NotificationsGlobalCacheList.OriginIsListed"
    enum="BooleanMatched" expires_after="2026-10-11">
  <owner>skrakowi@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether an origin is on the notifications global cache list. Logged
    when checking if an origin is on the notifications global cache list, only
    when the list has more than 0 entries.
  </summary>
</histogram>

<histogram name="SafeBrowsing.NotificationsGlobalCacheList.Size"
    units="entries" expires_after="2026-10-11">
  <owner>skrakowi@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of entries in the notifications global cache list of top
    legitimate notification senders. Logged when checking if an origin is on the
    notifications global cache list.
  </summary>
</histogram>

<histogram name="SafeBrowsing.NotificationTelemetry.CSBRR.Size" units="bytes"
    expires_after="2026-08-30">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the size of a ClientSafeBrowsingReportRequest (CSBRR) in bytes. It
    is logged when the the NotificationTelemetryService's timer's interval has
    elapsed for an ESB user and the database of ServiceWorkerBehaviors is
    non-empty.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.NotificationTelemetry.ServiceWorkerScopeURL.IsAllowlisted"
    enum="Boolean" expires_after="2027-01-17">
  <owner>anunoy@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the service worker's scope URL is present in the
    SafeBrowsing High Confidence Allowlist. Logged each time a service service
    worker's registration parameters are persisted to storage.
  </summary>
</histogram>

<histogram name="SafeBrowsing.PageLoadToken.ClearReason"
    enum="SafeBrowsingPageLoadTokenClearReason" expires_after="2026-12-22">
  <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="2026-10-15">
  <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="2026-10-15">
  <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="2026-10-15">
  <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.TokenCount" units="entries"
    expires_after="2026-10-15">
  <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.PhishySite.{UserEvent}" units="count"
    expires_after="2027-05-08">
  <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.

    Note: This histogram was expired from 2026-03-29 to 2026-05-08.
  </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="2026-10-04">
  <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.PasswordLeakToggle" enum="Boolean"
    expires_after="2027-05-03">
  <owner>awado@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the current state of the password leak toggle under standard
    protection on the chrome://settings/security page. 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="2026-10-15">
  <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="2026-12-27">
  <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="2027-02-07">
  <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.Enhanced.RegularProfile"
    enum="BooleanEnabled" expires_after="2027-02-14">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Whether the Safe Browsing enhanced protection service is currently enabled.
    Recorded for non-Incognito user profiles on profile startup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Pref.Extended{SafeBrowsingScoutOptInLocations}"
    enum="BooleanEnabled" expires_after="2026-08-23">
  <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.
    {SafeBrowsingScoutOptInLocations}
  </summary>
  <token key="SafeBrowsingScoutOptInLocations">
    <variant name=""/>
    <variant name=".AndroidSettings" summary="The settings UI on Android"/>
    <variant name=".ChromeSettings" summary="The settings UI on Desktop"/>
    <variant name=".DownloadPopup" summary="The Download Feedback popup"/>
    <variant name=".SecurityInterstitial"
        summary="One of the Security Interstitials (malware, SSL, etc)"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.Pref.General" enum="BooleanEnabled"
    expires_after="2027-02-07">
  <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.JsOptimizerSetting"
    enum="SafeBrowsingJsOptimizerSetting" expires_after="2027-02-21">
  <owner>tiffanysong@google.com</owner>
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The current value of the JavascriptOptimizerSetting of the profile. Recorded
    for regular user profiles on profile startup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Pref.MainProfile.SafeBrowsingState"
    enum="SafeBrowsingState" expires_after="never">
<!-- expires-never: required for Safe Browsing State filter on UMA -->

  <owner>jeffcyr@google.com</owner>
  <owner>drubery@chromium.org</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{ReferrerAttribution}"
    enum="SafeBrowsingAttributionResultTypes" expires_after="2027-08-24">
  <owner>xinghuilu@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. {ReferrerAttribution}
  </summary>
</histogram>

<histogram name="SafeBrowsing.ReferrerURLChainSize{ReferrerAttribution}"
    units="units" expires_after="2027-06-07">
  <owner>xinghuilu@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.
    {ReferrerAttribution}
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.RendererThrottle.IsCheckCompletedOnProcessResponse"
    enum="BooleanCompleted" expires_after="2026-12-22">
  <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.RequestDestination"
    enum="RequestDestination" expires_after="2027-04-10">
  <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 renderer URL
    loader throttle, and whether the URL check was requested. Logged each time
    WillStartRequest is called.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ReportUnsafeSite.DialogClosedReason"
    enum="WidgetClosedReason" expires_after="2027-01-17">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Recorded when the report-unsafe-site dialog is closed. Records the reason
    that the dialog was closed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ReportUnsafeSiteDialog.IsTabSplit"
    enum="BooleanTabIsSplit" expires_after="2027-01-17">
  <owner>nwokedi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether the tab is split when the Report-Unsafe-Site dialog is shown.
    When a tab is split and the Report-Unsafe-Site dialog is triggered from the
    app menu, it is possible that the dialog is shown for a different tab than
    the user expected.
  </summary>
</histogram>

<histogram name="SafeBrowsing.ResumableUploader.NetworkResult.EnterpriseUpload"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>drubery@chromium.org</owner>
  <owner>nancylanxiao@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The net error or HTTP response code returned when a resumable uploader
    response is received. This only applies to enterprise uploads.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.AllowlistSizeTooSmall"
    enum="BooleanUnavailable" expires_after="2027-02-07">
  <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.

    In M125 and M126, this contained logs from the full-screen use case of the
    allowlist as well.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.AllStoresAvailable" enum="BooleanAvailable"
    expires_after="2027-02-07">
  <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.

    In M125 and M126, this contained logs from the full-screen use case of the
    allowlist as well.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.BackoffState{UserCategory}"
    enum="BooleanBackoff" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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. Logs whenever a real time URL request is about to be
    attempted, which will not go through if the service is in backoff mode.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.CacheManager.CleanupReachedThreshold"
    units="entries" expires_after="2027-02-02">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a cleanup task trying to remove origin-keyed expired
    real-time URL verdict cache entries per reached the maximum number of
    origins that can be removed per cleanup task. Logged each time a cleanup
    task is run.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.CacheManager.CleanUpTime" units="ms"
    expires_after="2027-02-13">
  <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.RealTimeVerdictCount2"
    units="entries" expires_after="2026-10-15">
  <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 cleanup task is run. It counts both the expired and unexpired
    entries.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.CanCheckDatabase" enum="BooleanEnabled"
    expires_after="2027-06-17">
  <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.ConsumerVersionReason"
    enum="SafeBrowsingRTConsumerVersionReason" expires_after="2027-02-07">
  <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.DnsResolution.Attempted" enum="Boolean"
    expires_after="2027-06-04">
  <owner>bcl@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a DNS resolution was attempted for the main frame URL during
    a real-time Safe Browsing lookup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.DnsResolution.Result"
    enum="SafeBrowsingDnsResolutionResult" expires_after="2027-06-04">
  <owner>bcl@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the result of the DNS resolution for the main frame URL during a
    real-time Safe Browsing lookup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.DnsResolution.Time" units="ms"
    expires_after="2027-06-04">
  <owner>bcl@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the time taken to resolve the DNS for the main frame URL during a
    real-time Safe Browsing lookup.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.EnterpriseRealTimePolicyEnabled.HasDmToken"
    enum="BooleanHasToken" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    When the EnterpriseRealTimeUrlCheckMode policy is enabled, logs whether a DM
    token is available. If the token is unavailable, the enterprise real time
    URL check will not be performed. This histogram reflects how often an admin
    has enabled the policy, but Chrome fails to apply it due to lack of DM
    token. Logged if the policy is enabled when a browser URL loader throttle is
    created.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.GetCache.FallbackThreatType"
    enum="SBThreatType" expires_after="2026-11-11">
  <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{UserCategory}" units="ms"
    expires_after="2027-02-13">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.GetCacheResult{UserCategory}"
    enum="SafeBrowsingRTLookupResponseVerdictType" expires_after="2026-11-29">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.GetToken.TimeTaken{UserCategory}" units="ms"
    expires_after="2027-01-31">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.HasAccessTokenFromFetcher{UserCategory}"
    enum="BooleanHasToken" expires_after="2027-04-10">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.HashDatabaseFallbackThreatType{TriggerType}"
    enum="SBThreatType" expires_after="2026-10-15">
  <owner>xinghuilu@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the threat type when the URL real-time lookup falls back to hash-prefix
    local database lookup. This happens when {TriggerType}.
  </summary>
  <token key="TriggerType">
    <variant name=".AllowlistMatch" summary="the URL matches the allowlist"/>
    <variant name=".CacheMatch" summary="the URL matches the local cache"/>
    <variant name=".OriginalCheckFailed"
        summary="the URL real-time lookup failed"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.RT.HasTokenInRequest{UserCategory}"
    enum="BooleanHasToken" expires_after="2027-02-07">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

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

<histogram name="SafeBrowsing.RT.IsLookupSuccessful.{ReportType}"
    enum="BooleanSuccess" expires_after="2024-11-08">
  <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.IsLookupSuccessful{UserCategory}"
    enum="BooleanSuccess" expires_after="2027-01-03">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.LocalMatch.Result{UserCategory}"
    enum="SafeBrowsingAllowlistAsyncMatch" expires_after="2027-01-31">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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 for real time URL check request. Logged each time a top
    frame URL navigation happens for users who have the real time URL lookups
    enabled.

    {UserCategory}

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

<histogram name="SafeBrowsing.RT.Network.Result.{ReportType}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
  <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. Warning: this histogram was expired
    from 2024-11-17 to 2025-02-19; data may be missing.
  </summary>
  <token key="ReportType">
    <variant name="NormalPing" summary="normal ping"/>
    <variant name="SampledPing" summary="sampled ping"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.RT.Network.Result{UserCategory}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Network.Time{UserCategory}" units="ms"
    expires_after="2027-01-31">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Request.Concurrent{UserCategory}"
    enum="Boolean" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether a real-time lookup service request is concurrent with an
    existing request for the same sanitized URL. Concurrent requests are batched
    together so that only one network request is made to the backend lookup
    service.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

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

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Request.ReferrerIpAddressCount" units="count"
    expires_after="2027-06-04">
  <owner>bcl@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of IP addresses contained in a referrer chain entry in
    the real-time lookup request. Logged for each referrer chain entry.
  </summary>
</histogram>

<histogram name="SafeBrowsing.RT.Request.Size{UserCategory}" units="bytes"
    expires_after="2027-02-07">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Request.UserPopulation{UserCategory}"
    enum="SafeBrowsingUserPopulation" expires_after="2027-06-17">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.Response.VerdictType.{UserPopulation}"
    enum="SafeBrowsingRTLookupResponseVerdictType" expires_after="2026-11-29">
  <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.Response.VerdictType{UserCategory}"
    enum="SafeBrowsingRTLookupResponseVerdictType" expires_after="2027-02-07">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.RT.SampledRequestSent" enum="Boolean"
    expires_after="2025-05-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{UserCategory}" units="verdicts"
    expires_after="2027-06-17">
  <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.

    {UserCategory}
  </summary>
  <token key="UserCategory" variants="RealTimeUrlCheckUserCategory"/>
</histogram>

<histogram name="SafeBrowsing.SBStore.IsStoreValid{Store}" enum="BooleanValid"
    expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a Safe Browsing store has valid data, when it is queried.
    This is logged once for every 256 times a store is checked.
  </summary>
  <token key="Store" variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.SBStoreRead.Success" enum="BooleanSuccess"
    expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track whether parsing results of reading the SafeBrowsing store file from
    disk succeeded. Recorded every time a store is read from disk.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.SecuritySettingsBundle.BundleStateBeforeShowingEnhancedToast"
    enum="SafeBrowsingSecuritySettingsBundle" expires_after="2026-06-07">
  <owner>vakh@chromium.org</owner>
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the security settings bundle state right before Chrome attempts to
    show a toast for users migrated into the enhanced security settings bundle.
    The toast is only shown if the bundle state is 'enhanced'.

    We expect this to be 'enhanced' in most cases, as otherwise the user
    would've migrated into the enhanced bundle then quickly switched out of it
    before the toast could be shown.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Settings.UserAction.{AccessPoint}"
    enum="SafeBrowsingSettingsUserAction" expires_after="2027-02-07">
  <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>
  <token key="AccessPoint">
    <variant name="Default"
        summary="The user enters the Safe Browsing settings page from a
                 default access point."/>
    <variant name="ParentSettings"
        summary="The user enters the Safe Browsing settings page from the
                 parent setting page."/>
    <variant name="SafetyCheck"
        summary="The user enters the Safe Browsing settings page from the
                 SafetyCheck page."/>
    <variant name="SecurityInterstitial"
        summary="The user enters the Safe Browsing settings page from the
                 security interstitial."/>
    <variant name="SurfaceExplorerPromoSlinger"
        summary="The user enters the Safe Browsing settings page from the
                 Surface Explorer page."/>
    <variant name="TailoredSecurity"
        summary="The user enters the Safe Browsing settings page from the UX
                 shown due to a change in the Tailored Security setting"/>
    <variant name="TipsNotificationsPromo"
        summary="The user enters the Safe Browsing settings page from the UX
                 shown due to interacting with the tips notifications promo."/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.SiteFamiliarity.DeferNavigationToComputeSiteFamiliarity.DeferDuration"
    units="ms" expires_after="2027-01-10">
  <owner>jacastro@chromium.org</owner>
  <owner>tiffanysong@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Recorded during process selection when a navigation is deferred to compute
    site familiarity. Records the time elapsed between when the navigation is
    deferred and when the site familiarity verdict is reached and the navigation
    proceeds.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SiteFamiliarity.Verdict{FrameType}"
    enum="SiteFamiliarity" expires_after="2027-02-21">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged when the site familiarity verdict is finalized for {FrameType}
    navigation. Records the site familiarity verdict (Familiar or Unfamiliar).
    Only logged for non-incognito profiles when the V8 blocking feature is
    active. Familiarity is determined by the standard site familiarity heuristic
    (see SiteFamiliarityFetcher in the codebase).
  </summary>
  <token key="FrameType">
    <variant name="" summary="any (top-frame or cross-site subframe)"/>
    <variant name=".Subframe" summary="a cross-site subframe"/>
    <variant name=".TopFrame" summary="a top-frame"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.SiteProtection.FamiliarityHeuristic"
    enum="SiteFamiliarityHeuristicName" expires_after="2027-01-17">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged after each non-incognito page navigation. Logs the matching
    user-familiarity heuristics for the site. If the site satisifies multiple
    heuristics the metric will be logged multiple times. NO_HEURISTIC_MATCH is
    logged if no user-familiarity heuristics match for the site.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.SiteProtection.FamiliarityHeuristic.Engagement15OrVisitedBeforeTodayOrHighConfidence"
    enum="BooleanMatched" expires_after="2026-10-05">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged after each non-off-the-record page navigation. Logs whether the site
    matches a heuristic which requires - The page to be on the safe browsing
    high confidence allowlist OR - The page to have been visited more than 24
    hours ago OR - The page to have a site engagement score of &gt; 15
  </summary>
</histogram>

<histogram name="SafeBrowsing.SiteProtection.FamiliarityHeuristic.OffTheRecord"
    enum="SiteFamiliarityHeuristicName" expires_after="2027-02-07">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged after each off-the-record page navigation. Logs the matching
    user-familiarity heuristics for the site. If the site satisifies multiple
    heuristics the metric will be logged multiple times. NO_HEURISTIC_MATCH is
    logged if no user-familiarity heuristics match for the site.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.SiteProtection.FamiliarityMetricDataFetchDuration"
    units="ms" expires_after="2026-06-07">
  <owner>pkotwicz@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged when SiteProtectionMetricsObserver has finished asynchronously
    fetching data from local databases in order to compute the user-familiarity
    for a given website. The computation occurs after each non-off-the-record
    page navigation. Logs the duration of fetching the data and doing the
    computation.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.SiteProtection.FamiliarityMetricDataFetchDuration.OffTheRecord"
    units="ms" expires_after="2026-06-07">
  <owner>pkotwicz@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged when SiteProtectionMetricsObserver has finished asynchronously
    fetching data from local databases in order to compute the user-familiarity
    for a given website. The computation occurs after each off-the-record page
    navigation. Logs the duration of fetching the data and doing the
    computation.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SiteProtection.FamiliarityMetricDataFetchStart"
    enum="BooleanHit" expires_after="2026-08-01">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logged as a result of a page navigation when SiteProtectionMetricsObserver
    starts fetching data.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SuspiciousNotificationWarning.Interactions"
    enum="SuspiciousNotificationWarningInteractions" expires_after="2027-01-17">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records user interactions with the warning shown for suspicious
    notifications. Logged when a warning is shown and when a user performs a
    notification action.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.SuspiciousNotificationWarning.ShowOriginalNotifications.SuspiciousNotificationCount"
    units="count" expires_after="2027-01-17">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of suspicious notifications, displayed on a warning
    notification, which have been suspended until the user taps to show the
    original suspicious notifications. Logged when the user taps the &quot;Show
    notification(s)&quot; button.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.SuspiciousNotificationWarning.ShowOriginalNotifications.SuspiciousNotificationsDroppedCount"
    units="count" expires_after="2027-01-17">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of suspicious notifications that were suspended behind a
    warning notification and despite the user tapping to show the original
    suspicious notifications, were unexpectedly dropped. If the expected
    notification count matches the actual count of notifications displayed, 0 is
    recorded. Logged when the user taps the &quot;Show notification(s)&quot;
    button.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SuspiciousSiteWarning.UserInteraction"
    enum="SuspiciousSiteWarningUserInteraction" expires_after="2027-02-01">
  <owner>awado@google.com</owner>
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records specific user interactions with the suspicious site warning dialog
    (e.g., Mark as safe, Back to safety, Dismissed, Manual Navigation, or Close
    tab). Logged when the warning dialog is shown, or when the user interacts
    with or dismisses it.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SuspiciousSiteWarning.VerdictReceived"
    enum="Boolean" expires_after="2027-02-01">
  <owner>awado@google.com</owner>
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a suspicious site warning threat type was received as a
    verdict during a real-time URL lookup. Logged even if the warning itself is
    disabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SuspiciousSiteWarning.WarningOutcome"
    enum="SuspiciousSiteWarningOutcome" expires_after="2027-02-01">
  <owner>awado@google.com</owner>
  <owner>richche@google.com</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the user adhered to the suspicious site warning or bypassed
    it. Logged when the suspicious site dialog is closed by the user interaction
    or navigating back.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SyncedEsbDialogDisabledMessageOutcome"
    enum="SyncedEsbOutcome" expires_after="2026-11-22">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the outcome of the dialog when the ESB setting is synced. This
    dialog appears on Android when the ESB setting is synced, and it presents
    either an OK button to accept or a Turn On button to re-enable ESB. For this
    histogram, it's a dialog with a Turn On button because the ESB is synced to
    off.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SyncedEsbDialogEnabledMessageDismissReason"
    enum="MessageDismissReason" expires_after="2026-12-16">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the dismiss reason of the message for ESB as a synced setting flow.
    This dialog appears on Android when the ESB setting is synced, and it
    presents either an OK button to accept or a Turn On button to re-enable ESB.
  </summary>
</histogram>

<histogram name="SafeBrowsing.SyncedEsbDialogEnabledMessageOutcome"
    enum="SyncedEsbOutcome" expires_after="2027-01-24">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the outcome of the dialog when the ESB setting is synced. This
    dialog appears on Android when the ESB setting is synced, and it presents
    either an OK button to accept or a Turn On button to re-enable ESB. For this
    histogram, it's a dialog with an OK button to accept the change because the
    ESB is synced to on.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurity.ConsentedDesktopDialogDisabledOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2027-02-14">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-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="2027-01-24">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-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="2026-08-22">
  <owner>awado@chromium.org</owner>
  <owner>chrome-counter-abuse-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="2026-12-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.

    Warning: this histogram was expired from 2026-02-01 to 2026-03-05; data may
    be missing.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurity.SyncPromptEnabledNotificationResult2"
    enum="SafeBrowsingTailoredSecurityNotificationResult"
    expires_after="2026-11-29">
  <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="2027-02-07">
  <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="2027-01-26">
  <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.

    Warning: this histogram was expired from 2025-09-29 to 2026-03-05; data may
    be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityService.OAuthTokenErrorState"
    enum="GoogleServiceAuthError" expires_after="2027-07-27">
  <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.OAuthTokenNetworkResult"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2026-09-27">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The net error or HTTP response code returned when trying to fetch the OAuth
    token for a tailored security service query.
  </summary>
</histogram>

<histogram name="SafeBrowsing.TailoredSecurityUnconsentedModalOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2026-06-24">
  <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.

    Warning: this histogram was expired from 2025-12-24 to 2026-03-05; data may
    be missing.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.TailoredSecurityUnconsentedPromotionNotificationOutcome"
    enum="SafeBrowsingTailoredSecurityOutcome" expires_after="2027-02-14">
  <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="2027-02-07">
  <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="2027-02-13">
  <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="2026-11-15">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.DelayTimerState"
    enum="SuspiciousSiteTriggerState" expires_after="2027-04-28">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Tracks the state of the Suspicious Site trigger when its report delay timer
    fires. Warning: this histogram was expired from 2021-07-01 to 2023-11-28;
    data may be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.Triggers.SuspiciousSite.Event"
    enum="SuspiciousSiteTriggerEvent" expires_after="2027-02-07">
  <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.Triggers.SuspiciousSite.ReportRejectionReason"
    enum="SuspiciousSiteTriggerManagerReason" expires_after="2027-04-28">
  <owner>skrakowi@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Tracks the reasons that a report requested by the Suspicious Site trigger is
    rejected by the Trigger Manager. Warning: this histogram was expired from
    2021-11-07 to 2023-11-28; data may be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.URTAndBackgroundHPRT.Result"
    enum="URTAndBackgroundHPRTResult" expires_after="2026-02-01">
  <owner>zackhan@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Tracks the the URL lookup verdicts from URL real-time lookups and the
    background HPRT lookups.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Database.SizeLinear{ThreatTypeKB}"
    units="100 KB" expires_after="2027-02-07">
  <owner>thefrog@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="2027-01-31">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>thefrog@chromium.org</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.Size{SafeBrowsing_SBStore_Metrics}"
    units="KB" expires_after="2027-06-02">
  <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.
    {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4Database.UpdateLatency" units="ms"
    expires_after="2027-07-17">
  <owner>thefrog@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. Warning: this histogram was expired from 2024-03-04 to 2024-04-17, and
    from 2026-03-01 to 2026-07-17; data may be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4GetHash.CacheFullyHit" enum="BooleanCacheHit"
    expires_after="2027-01-24">
  <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="2026-07-27">
  <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="2027-01-27">
  <owner>thefrog@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.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="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.V4LocalDatabaseManager.ThreatInfoSize"
    units="verdicts" expires_after="2026-12-22">
  <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.V4ProcessFullUpdate.AdditionsHashesCount2{SafeBrowsing_SBStore_Metrics}"
    units="entries" expires_after="2027-06-17">
  <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.
    {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ProcessFullUpdate.ApplyUpdate.Result{SafeBrowsing_SBStore_Metrics}"
    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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4ProcessFullUpdate.ApplyUpdateDuration"
    units="ms" expires_after="2027-01-17">
  <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{SafeBrowsing_SBStore_Metrics}"
    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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ProcessFullUpdate.RemovalsHashesCount{SafeBrowsing_SBStore_Metrics}"
    units="entries" expires_after="2026-12-22">
  <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.
    {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ProcessPartialUpdate.AdditionsHashesCount{SafeBrowsing_SBStore_Metrics}"
    units="entries" expires_after="2027-04-10">
  <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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ProcessPartialUpdate.ApplyUpdate.Result{SafeBrowsing_SBStore_Metrics}"
    enum="SafeBrowsingV4ApplyUpdateResult" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4ProcessPartialUpdate.ApplyUpdateDuration"
    units="ms" expires_after="2027-01-17">
  <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{SafeBrowsing_SBStore_Metrics}"
    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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ProcessPartialUpdate.DecodeRemovals.Result{SafeBrowsing_SBStore_Metrics}"
    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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ProcessPartialUpdate.RemovalsHashesCount{SafeBrowsing_SBStore_Metrics}"
    units="entries" expires_after="2027-02-14">
  <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.
    {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4ProcessUpdate.UpdateType"
    enum="SafeBrowsingV4UpdateType" expires_after="2027-01-24">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the type of V4 update being processed. Logged each time an update is
    attempted on a store.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.V4ReadFromDisk.ApplyUpdate.Result{SafeBrowsing_SBStore_Metrics}"
    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. {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V4ReadFromDisk.DecodeAdditions.Result{SafeBrowsing_SBStore_Metrics}"
    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.
    {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4Store.ConvertExtensionBlocklistV5ToV4Result"
    enum="ConvertExtensionBlocklistV5ToV4Result" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the granular outcome of converting the extensions blocklist from v5
    to v4 format. Logged immediately after the conversion attempt completes.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.V4Store.IsStoreValid{SafeBrowsing_SBStore_Metrics}"
    enum="BooleanValid" expires_after="2027-02-13">
  <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).
    {SafeBrowsing_SBStore_Metrics}
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4Store.V5ToV4Migration.TimeTaken{Store}"
    units="ms" expires_after="2026-11-26">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to perform the V5 to V4 migration for a store on
    disk. Recorded when migration is attempted.
  </summary>
  <token key="Store" variants="SafeBrowsing_SBStore_Metrics"/>
</histogram>

<histogram name="SafeBrowsing.V4Store.V5ToV4Migration.V5ReadFailureReason"
    enum="SafeBrowsingV5StoreReadResult" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the reason why reading the V5 store failed during migration to V4.
    Recorded when attempting to parse the v5 store from disk fails.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V4Store.V5ToV4MigrationResult"
    enum="SafeBrowsingV5ToV4MigrationResult" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of migrating a SafeBrowsing store from v5 to v4 on disk.
    Recorded when a migration is attempted even if it does not occur.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.V4Store.VerifyChecksum.ValidStoreChecksumEmpty{SafeBrowsing_SBStore_Metrics}"
    enum="Boolean" expires_after="2027-01-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the expected checksum is empty when verifying the checksum
    of a V4 store. Logged when verifying checksum of a store with valid data.
  </summary>
  <token key="SafeBrowsing_SBStore_Metrics"
      variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V4StoreRead.Result"
    enum="SafeBrowsingV4StoreReadResult" expires_after="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <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.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.V5Database.SizeLinear" units="MB"
    expires_after="2027-06-30">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The total size of the SafeBrowsing database or files on disk in megabytes,
    after reading it from disk on startup and after a database update has
    occurred for V5. Linear version of V5Database.Size histogram.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Database.SizeLinear.UrlSoceng_v5" units="MB"
    expires_after="2027-06-30">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of UrlSoceng SafeBrowsing database or file on disk in megabytes,
    after reading it from disk on startup and after a database update has
    occurred for V5. Linear version of V5Database.Size histogram.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Database.SizeLinear{ThreatTypeKB}_v5"
    units="100 KB" expires_after="2027-06-30">
  <owner>thefrog@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 for V5. Linear version of V5Database.Size histogram.
  </summary>
  <token key="ThreatTypeKB">
    <variant name=".ChromeExtMalware" summary="extension malware"/>
    <variant name=".UrlMalBin" summary="malware"/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V5Database.Size{Store}" units="KB"
    expires_after="2027-06-30">
  <owner>thefrog@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 for
    V5.
  </summary>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

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

<histogram name="SafeBrowsing.V5GetHash.FoundUnmatchedFullHashes"
    enum="Boolean" expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether a V5 GetHash response contained any full hashes that did not
    match the requested prefixes. Logged after a successful V5 GetHash request
    is parsed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5GetHash.NumRequestsSkippedDuringBackoff"
    units="times" expires_after="2027-06-28">
  <owner>thefrog@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 when recovering from backoff if
    any requests were skipped.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5GetHash.OperationOutcome"
    enum="SafeBrowsingV5GetHashOperationOutcome" expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The overall outcome of a V5 GetHash operation. Logged when the operation
    completes, which can be due to a full cache hit, a successful network
    response, a network/HTTP error, a parse failure, or because the request was
    blocked by backoff.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5GetHash.ParseFailureReason"
    enum="SafeBrowsingV5GetHashParseFailureReason" expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The specific reason why parsing or validating a V5 GetHash network response
    failed. Logged when the response parsing fails or when required fields (like
    cache duration) are missing or invalid in the response.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5GetHash.ThreatInfoSize" units="matches"
    expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The number of full hash details that matched the query for V5 local database
    checks. Logged when determining the most severe threat.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5ReadFromDisk.ApplyUpdate.Result{Store}"
    enum="SafeBrowsingV5ApplyUpdateResult" 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 for V5. Having this information
is crucial to know that the Safe Browsing updates are being read, applied, and
parsed correctly. -->

  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of applying a V5StoreFileFormat read from disk after
    parsing it successfully as a protobuf for V5.
  </summary>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.V5Store.ConvertExtensionBlocklistV4ToV5.ChecksumDuration"
    units="ms" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to verify and compute the checksum when converting
    the extensions blocklist hash file from v4 to v5 format. Logged only when
    checksum verification is performed and the hash file conversion completes
    without error.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Store.ConvertExtensionBlocklistV4ToV5Result"
    enum="ConvertExtensionBlocklistV4ToV5Result" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the granular outcome of converting the extensions blocklist from v4
    to v5 format. Logged immediately after the conversion attempt completes.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Store.IsStoreValid{Store}" enum="BooleanValid"
    expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether a v5 store has valid data, when it is queried. This is
    logged once for every 256 times a store is checked.
  </summary>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V5Store.V4ToV5Migration.TimeTaken{Store}"
    units="ms" expires_after="2026-11-26">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to perform the V4 to V5 migration for a store on
    disk. Recorded when migration is attempted.
  </summary>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics"/>
</histogram>

<histogram name="SafeBrowsing.V5Store.V4ToV5Migration.V4ReadFailureReason"
    enum="SafeBrowsingV4StoreReadResult" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the reason why reading the V4 store failed during migration to V5.
    Recorded when attempting to parse the v4 store from disk fails.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Store.V4ToV5MigrationResult"
    enum="V4ToV5MigrationResult" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the result of migrating a SafeBrowsing store from v4 to v5 on disk.
    Recorded when a migration is attempted even if it does not occur.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5StoreRead.Result"
    enum="SafeBrowsingV5StoreReadResult" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the parsing results of reading the SafeBrowsing V5 store file from
    disk. Recorded every time a store is read from disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5StoreWrite.Result"
    enum="SafeBrowsingV5StoreWriteResult" expires_after="2027-06-18">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track the results of writing the SafeBrowsing V5 store file to disk.
    Recorded every time a store is written to disk.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Update.Category{Store}"
    enum="SafeBrowsingUpdateCategory" expires_after="2027-08-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the category of update received from the Safe Browsing v5 update
    service. Logged whenever an update is processed.
  </summary>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.V5Update.Parse.Result" enum="V5ParseResult"
    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>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>Track the parsing results of a status 200 V5Update request.</summary>
</histogram>

<histogram name="SafeBrowsing.V5Update.Result" enum="V5OperationResult"
    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>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track return status from V5Update attempts. This is logged when the update
    request has completed and the response has either been parsed successfully
    or has failed.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Update.RiceInputValidationResult"
    enum="SafeBrowsingV5InputValidationResult" expires_after="2027-05-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the Rice input validation result of a V5 HashList update. Logged
    during parsing of the update response list before decoding.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V5Update.UnexpectedMinimumWaitDuration"
    enum="Boolean" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the minimum wait duration received from the V5 update
    response was unexpected (missing or zero). Logged when parsing the update
    response.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.V8Optimizer.DeferNavigationToComputeSiteFamiliarity"
    enum="BooleanOccurred" expires_after="2027-01-17">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Recorded during NavigationRequest::OnResponseStarted(). Records whether the
    navigation was delayed due to computing whether to disable v8-optimizations
    due to computing site-familiarity.
  </summary>
</histogram>

<histogram
    name="SafeBrowsing.V8Optimizer.DifferentRendererProcess.SameSite.IframeState"
    enum="V8IframeState" expires_after="2027-01-17">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Recorded when a navigation finishes. Records the v8-optimizer state of the
    frame whose navigation just finished as well as the v8-optimizer state of
    the topmost frame. Only recorded for non-topmost frames where the frame
    whose navigation just finished and the topmost frame are same-site. The
    purpose of this metric is to help determine how frequently an &lt;iframe&gt;
    (ex chat.google.com) has v8-optimization disabled when the toplevel frame
    (ex mail.google.com) has v8-optimization enabled.
  </summary>
</histogram>

<histogram name="SafeBrowsing.V8Optimizer.IframeState" enum="V8IframeState"
    expires_after="2027-01-17">
  <owner>jacastro@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Recorded when a navigation finishes. Records the v8-optimizer state of the
    frame whose navigation just finished as well as the v8-optimizer state of
    the topmost frame. Only recorded for non-topmost frames.
  </summary>
</histogram>

<histogram name="SafeBrowsing.WebView.AppOptIn" enum="SafeBrowsingAppOptIn"
    expires_after="2026-07-30">
  <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.

    Warning: this histogram was expired from 2024-06-06 to 2024-07-16 and
    2025-01-05 to 2025-07-30; data may be missing.
  </summary>
</histogram>

<histogram name="SafeBrowsing.WebView.GmsOptIn.ApiCallMatchesDiskCache"
    enum="BooleanMatched" expires_after="2027-05-01">
  <owner>colibie@google.com</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    Records whether the result of the query for Safe Browsing user consent
    matches the value stored in the disk cache. A value of true means they
    match, and false means they do not. The default value of the disk cache is
    false.

    This histogram is recorded when the query, which is called once per WebView
    global process startup, completes successfully.

    Note: Prior to M151, timeouts and errors were recorded as a consent value of
    false.
  </summary>
</histogram>

<histogram name="SafeBrowsing.WebView.GmsOptIn.Result"
    enum="AndroidWebViewGmsApiCallResult" expires_after="2027-05-01">
  <owner>colibie@google.com</owner>
  <owner>src/android_webview/OWNERS</owner>
  <summary>
    Records the result of the call to query Safe Browsing user consent. It logs
    success, timeout, or unknown error. It does not record the actual user
    consent value due to privacy considerations. This histogram is recorded when
    the query, which is called once per WebView global process startup,
    completes successfully or errors out.
  </summary>
</histogram>

<histogram name="SafeBrowsing.{CacheTypeForCounts}.FullHashCount"
    units="entries" expires_after="2027-02-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of full hashes in the local cache for
    {CacheTypeForCounts} 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>
  <token key="CacheTypeForCounts" variants="V5CacheTypeForCounts"/>
</histogram>

<histogram name="SafeBrowsing.{CacheTypeForCounts}.HashPrefixCount"
    units="entries" expires_after="2027-02-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the number of hash prefixes in the local cache for
    {CacheTypeForCounts} 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>
  <token key="CacheTypeForCounts" variants="V5CacheTypeForCounts"/>
</histogram>

<histogram name="SafeBrowsing.{CacheType}.CacheDuration.InitialOnSet"
    units="ms" expires_after="2027-02-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the cache duration that an item will have for a {CacheType}. Logged
    when the item is added to the cache.
  </summary>
  <token key="CacheType" variants="V5CacheType"/>
</histogram>

<histogram name="SafeBrowsing.{CacheType}.CacheDuration.RemainingOnHit"
    units="ms" expires_after="2027-02-05">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs the remaining cache duration that an item has for a {CacheType}. Logged
    when there is a cache hit for the item.
  </summary>
  <token key="CacheType" variants="V5CacheType"/>
</histogram>

<histogram name="SafeBrowsing.{CacheType}.CacheHit" enum="BooleanCacheHit"
    expires_after="2027-02-05">
  <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 {CacheType}. 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>
  <token key="CacheType" variants="V5CacheType"/>
</histogram>

<histogram
    name="SafeBrowsing.{CloudOrLocal}DeepScan.{Connector}.BytesPerSeconds"
    units="bytes" expires_after="2027-02-07">
  <owner>domfc@chromium.org</owner>
  <owner>nancylanxiao@google.com</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="2027-01-31">
  <owner>domfc@chromium.org</owner>
  <owner>drubery@chromium.org</owner>
  <owner>nancylanxiao@google.com</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=".CancelledByUserCancellationTime"
        summary="a CancelledByUserCancellationTime"/>
    <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=".IncompleteResponse" summary="an IncompleteResponse"/>
    <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.{SafeBrowsingV4OrSB}GetHash.Result.BackoffErrorCount"
    units="times" expires_after="2027-06-28">
  <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>
  <token key="SafeBrowsingV4OrSB" variants="SafeBrowsingV4OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrSB}Update.Category{Store}"
    enum="SafeBrowsingUpdateCategory" expires_after="2027-08-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the category of update received from the {SafeBrowsingV4OrSB} update
    service. Logged whenever an update is processed.
  </summary>
  <token key="SafeBrowsingV4OrSB" variants="SafeBrowsingV4OrSB"/>
  <token key="Store" variants="SafeBrowsing_SBStore_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrSB}Update.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>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track return status from {SafeBrowsingV4OrSB} update attempts. The buckets
    of this histogram overlap, so the counts cannot be used as percentages.
  </summary>
  <token key="SafeBrowsingV4OrSB" variants="SafeBrowsingV4OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}CheckUrl.TimeTaken.{StepName}"
    units="ms" expires_after="2027-05-10">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the duration of the {StepName} step in a Safe Browsing
    {SafeBrowsingV4OrV5OrSB} URL check. Logged when this step completes.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
  <token key="StepName" variants="SafeBrowsingCheckUrlStep"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}DatabaseInitializationTime"
    units="ms" expires_after="2026-12-27">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    How long it took to create the {SafeBrowsingV4OrV5OrSB} database. Logged on
    each startup, when the database is created.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}GetHash.AttemptThreatType"
    enum="SBThreatType" expires_after="2027-08-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs each unique threat type that matched a prefix in the
    {SafeBrowsingV4OrV5OrSB} local database and initiated a full-hash lookup
    attempt (before checking the local cache).
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}GetHash.Network.RequestThreatType"
    enum="SBThreatType" expires_after="2027-08-01">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs each unique threat type included in a {SafeBrowsingV4OrV5OrSB} GetHash
    network request.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}GetHash.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes from the {SafeBrowsingV4OrV5OrSB} GetHash service.
    Logged after a GetHash request finishes to capture the response code or
    error code for that call.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}GetHash.Network.Time"
    units="ms" expires_after="2027-01-17">
  <owner>thefrog@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 {SafeBrowsingV4OrV5OrSB} GetHash request. Logged when the
    network request completes (either successfully or with an error).
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}LocalDatabaseManager.TimeSinceLastUpdateResponse"
    units="ms" expires_after="2027-04-05">
  <owner>danieltwhite@google.com</owner>
  <owner>joemerramos@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 update 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>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}ReadFromDisk.VerifyChecksumDuration"
    units="ms" expires_after="2027-01-17">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records how long it took to verify the checksum of a
    {SafeBrowsingV4OrV5OrSB} store. This is recorded in thread time, to avoid
    recording any disk operations.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}Store.ReadyOnStartup"
    enum="BooleanReady" expires_after="2026-12-27">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Logs whether an individual store has valid data immediately after being
    constructed. This is logged once for each {SafeBrowsingV4OrV5OrSB} store on
    each startup. Failures here can indicate an inability to read data from
    disk.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}StoreFileOpenError"
    enum="PlatformFileError" expires_after="2027-01-03">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the file error when a {SafeBrowsingV4OrV5OrSB} store hash prefix map
    fails to be opened on disk. This can be logged once per map per database
    sync (roughly every 30 minutes).
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}StoreFileWriteError"
    enum="PlatformFileError" expires_after="2027-01-03">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the file error when we fail to write to a previously opened
    {SafeBrowsingV4OrV5OrSB} store hash prefix map file. This can be logged once
    per map per database sync (roughly every 30 minutes).
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}StoreWriteError"
    enum="SBHashPrefixWriteError" expires_after="2027-01-03">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    This records a more specific error for every UNEXPECTED_WRITE_FAILURE in the
    corresponding SafeBrowsing.*StoreWrite.Result histogram. This is logged at
    most once per hash prefix map write (roughly every 30 minutes).
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}Update.Network.Result"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2027-02-07">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Response or error codes when fetching updates from the
    {SafeBrowsingV4OrV5OrSB} update service. Starting M92, the
    ERR_HTTP_RESPONSE_CODE_FAILURE net error is matched to the actual HTTP
    response code.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}Update.Network.Time"
    units="ms" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The time that it took for the update request to Safe Browsing servers using
    the {SafeBrowsingV4OrV5OrSB} update protocol, or how long it took for it to
    time out.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}Update.Network.TimedOut"
    enum="BooleanTimedOut" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records whether the network request timed out when fetching updates from the
    {SafeBrowsingV4OrV5OrSB} update service.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}Update.NextUpdateInterval"
    units="ms" expires_after="2027-02-07">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Records the next update interval for Safe Browsing updates using the
    {SafeBrowsingV4OrV5OrSB} update protocol. Logged when calculating the next
    update interval.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV4OrV5OrSB}Update.ResponseSizeKB"
    units="KB" expires_after="2027-02-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The size of the response sent by the {SafeBrowsingV4OrV5OrSB} update
    service, in KB.
  </summary>
  <token key="SafeBrowsingV4OrV5OrSB" variants="SafeBrowsingV4OrV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{SafeBrowsingV5OrSB}GetHash.CacheHitAllPrefixes"
    enum="BooleanCacheHit" expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    Track whether a {SafeBrowsingV5OrSB} GetHash request was able to be skipped
    because all parts of it were found in the local cache. Logged after the the
    local cache is checked.
  </summary>
  <token key="SafeBrowsingV5OrSB" variants="SafeBrowsingV5OrSB"/>
</histogram>

<histogram
    name="SafeBrowsing.{SafeBrowsingV5OrSB}GetHash.Request.CountOfPrefixes"
    units="prefixes" expires_after="2027-07-14">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The number of prefixes requested in a single GetHash request
    ({SafeBrowsingV5OrSB}). Recorded when a network request is sent.
  </summary>
  <token key="SafeBrowsingV5OrSB" variants="SafeBrowsingV5OrSB"/>
</histogram>

<histogram name="SafeBrowsing.{V5ProcessUpdateType}.ApplyUpdate.Result{Store}"
    enum="SafeBrowsingV5ApplyUpdateResult" expires_after="2027-06-16">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The result of applying a {V5ProcessUpdateType} received from the PVer5
    SafeBrowsing service.
  </summary>
  <token key="V5ProcessUpdateType" variants="V5ProcessUpdateType"/>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsing.{V5ProcessUpdateType}.ApplyUpdateDuration"
    units="ms" expires_after="2027-06-16">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The time it takes to apply a {V5ProcessUpdateType} received from the
    SafeBrowsing service.
  </summary>
  <token key="V5ProcessUpdateType" variants="V5ProcessUpdateType"/>
</histogram>

<histogram
    name="SafeBrowsing.{V5ProcessUpdateType}.Decode{AdditionsOrRemovals}.Result{Store}"
    enum="SafeBrowsingV5DecodeResult" expires_after="2027-06-16">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The result of decoding Rice-encoded {AdditionsOrRemovals} from
    {V5ProcessUpdateType}s received from the server.
  </summary>
  <token key="V5ProcessUpdateType" variants="V5ProcessUpdateType"/>
  <token key="AdditionsOrRemovals">
    <variant name="Additions" summary="additions"/>
    <variant name="Removals" summary="removals"/>
  </token>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram
    name="SafeBrowsing.{V5ProcessUpdateType}.{AdditionsOrRemovals}HashesCount{Store}"
    units="hashes" expires_after="2027-06-16">
  <owner>thefrog@chromium.org</owner>
  <owner>chrome-counter-abuse-alerts@google.com</owner>
  <summary>
    The number of {AdditionsOrRemovals} hashes successfully decoded from a
    {V5ProcessUpdateType}.
  </summary>
  <token key="V5ProcessUpdateType" variants="V5ProcessUpdateType"/>
  <token key="AdditionsOrRemovals">
    <variant name="Additions" summary="additions"/>
    <variant name="Removals" summary="removals"/>
  </token>
  <token key="Store" variants="SafeBrowsing_V5Store_Metrics">
    <variant name=""/>
  </token>
</histogram>

<histogram name="SafeBrowsingBinaryUploadRequest.DlpResult"
    enum="BooleanSuccess" expires_after="2026-12-27">
  <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="2027-01-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="2027-01-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="2027-01-17">
<!-- Note to owner: This histogram can be renewed 1 full year if it is still
useful for Chirp alerts (go/crca-alerts). -->

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

</histograms>

</histogram-configuration>
