<!--
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 Content 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="FeedNetworkRequestType">
  <variant name=".FeedQuery" summary="FeedQuery"/>
  <variant name=".FollowWebFeed" summary="FollowWebFeed"/>
  <variant name=".ListFollowedWebFeeds" summary="ListFollowedWebFeeds"/>
  <variant name=".ListRecommendedWebFeeds" summary="ListRecommendedWebFeeds"/>
  <variant name=".NextPage" summary="NextPage"/>
  <variant name=".QueryBackgroundFeed" summary="QueryBackgroundFeed"/>
  <variant name=".QueryInteractiveFeed" summary="QueryInteractiveFeed"/>
  <variant name=".QueryNextPage" summary="QueryNextPage"/>
  <variant name=".SupervisedFeed" summary="SupervisedFeed"/>
  <variant name=".UnfollowWebFeed" summary="UnfollowWebFeed"/>
  <variant name=".UploadActions" summary="UploadActions"/>
  <variant name=".WebFeedListContents" summary="WebFeedListContents"/>
</variants>

<histogram name="Content.Classification" enum="ContentClassification"
    expires_after="2026-01-11">
  <owner>sophey@chromium.org</owner>
  <owner>chrome-sherlock@google.com</owner>
  <summary>
    Whether the webpage is a long-form article or not. This is logged when the
    user navigates away from the current page (via loading a different webpage
    or native page). It is only logged if the distillability of the page had
    been determined.
  </summary>
</histogram>

<histogram name="Content.Classification.OpenGraph"
    enum="ContentClassificationOpenGraph" expires_after="2024-04-28">
  <owner>sophey@chromium.org</owner>
  <owner>chrome-sherlock@google.com</owner>
  <summary>
    What the Open Graph Protocol classification of the page is. This is logged
    when the user navigates to the current page. It is only logged if there is
    an 'og:type' property in the HTML of the page.
  </summary>
</histogram>

<histogram name="Content.SharedWorker.CreationContextTypeMismatch"
    enum="SharedWorkerCreationContextTypeMismatch" expires_after="2026-12-27">
  <owner>yyanagisawa@chromium.org</owner>
  <owner>content-owners@chromium.org</owner>
  <summary>
    Records whether the renderer-supplied creation context type matches the
    browser-derived secure context state for a SharedWorker connection. Recorded
    on each SharedWorker connection request.
  </summary>
</histogram>

<histogram name="Content.SharedWorker.Host.DestructionSource"
    enum="SharedWorkerHostDestructionSource" expires_after="2027-02-14">
  <owner>yyanagisawa@chromium.org</owner>
  <owner>chrome-worker@google.com</owner>
  <summary>
    Records the reason why a SharedWorkerHost is destroyed. This is to
    investigate why a shared worker is terminated unexpectedly. This is also
    used for understanding the ratio of destruction cases.
  </summary>
</histogram>

<histogram name="Content.SharedWorker.Service.LastClientCheckTime" units="ms"
    expires_after="2026-12-06">
  <owner>annasato@chromium.org</owner>
  <owner>chrome-worker@google.com</owner>
  <summary>
    The time spent checking if a navigating page with a SharedWorker is the last
    active client. This is recorded whenever a page with a SharedWorker
    connection navigates away.
  </summary>
</histogram>

<histogram
    name="Content.SharedWorker.WebSocket.DoesRequireCrossSiteRequestForCookies"
    enum="Boolean" expires_after="2027-04-10">
  <owner>yyanagisawa@chromium.org</owner>
  <owner>wanderview@chromium.org</owner>
  <summary>
    Records whether a WebSocket connection was initiated from a SharedWorker in
    a context that requires cross-site cookie restrictions (e.g. created via the
    Storage Access API (SAA) or in a third-party context). This helps measure
    the prevalence of workers that should have SameSite cookie restrictions.
    Recorded in SharedWorkerHost::CreateWebSocketConnector.
  </summary>
</histogram>

<histogram name="Content.SslError.CallbackDuration" units="ms"
    expires_after="2027-03-30">
  <owner>peconn@google.com</owner>
  <owner>src/content/OWNERS</owner>
  <summary>
    The amount of time between StoragePartitionImpl::OnSSLCertificateError being
    called and the answer being received. This measures the latency introduced
    by the browser process and the embedder (including any app callbacks) for
    all platforms. Recorded on SSL error.
  </summary>
</histogram>

<histogram name="ContentCapture.CaptureContentTime2" units="microseconds"
    expires_after="2026-12-01">
  <owner>elabadysayed@chromium.org</owner>
  <owner>src/third_party/blink/renderer/core/content_capture/OWNERS</owner>
  <summary>
    The time taken to capture the on-screen content and group them by document.

    Note that this metrics is only recorded on clients on which a
    high-resolution clock is available.
  </summary>
</histogram>

<histogram name="ContentCapture.SentContentCount2" units="count"
    expires_after="2026-12-01">
  <owner>elabadysayed@chromium.org</owner>
  <owner>src/third_party/blink/renderer/core/content_capture/OWNERS</owner>
  <summary>The total number of content captures sent for a document.</summary>
</histogram>

<histogram name="ContentNotifications.ClientStatus.Enabled.ByProvider"
    enum="Boolean" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    The status of the push notifications client toggle for Content.
  </summary>
</histogram>

<histogram name="ContentNotifications.ClientStatus.Sports.ByProvider"
    enum="Boolean" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    The status of the push notifications client toggle for Sports.
  </summary>
</histogram>

<histogram name="ContentNotifications.DismissAction" enum="Boolean"
    expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>The user has dismissed a content notification.</summary>
</histogram>

<histogram name="ContentNotifications.EligibilityType"
    enum="ContentNotificationEligibilityType" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    The Type of elegibility for a given user for the Content Notifications
    feature. Includes details about what UI entrypoint type the user is elegible
    for as well as whether they are in the control group for that entrypoint.
  </summary>
</histogram>

<histogram name="ContentNotifications.Notification.Action"
    enum="ContentNotificationActionType" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    Reports what actions has the user taken on a notification. This metric
    matches NAUs sent.
  </summary>
</histogram>

<histogram name="ContentNotifications.NotificationActionUpload.Success"
    enum="Boolean" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    After a notification action upload, whether the request succeeded or failed.
  </summary>
</histogram>

<histogram name="ContentNotifications.OpenURLAction.HasURL" enum="Boolean"
    expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    After a notification interaction, if the URL has successfully been parsed or
    if it has failed.
  </summary>
</histogram>

<histogram
    name="ContentNotifications.Promo.ProvisionalNotifications.Entrypoint"
    enum="ContentNotificationPromoProvisionalEntrypoint"
    expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    Provisional notifications were turned on from the Notifications Promo.
  </summary>
</histogram>

<histogram name="ContentNotifications.Promo.Snackbar.Event"
    enum="ContentNotificationSnackbarEvent" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    Log the Set Up List Content Notification confirmation snackbar events.
  </summary>
</histogram>

<histogram name="ContentNotifications.Promo.TopOfFeed.Action"
    enum="ContentNotificationTopOfFeedPromoAction" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    The action taken by the user in response to the Top of Feed Content
    Notifications promo.
  </summary>
</histogram>

<histogram name="ContentNotifications.Promo.TopOfFeed.Event"
    enum="ContentNotificationTopOfFeedPromoAction" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    An event from the the Top of Feed Content Notifications promo.
  </summary>
</histogram>

<histogram name="ContentNotifications.Registration.BrowserStateUnavailable"
    enum="Boolean" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    This logs if a SNo registration has not succeeded due to a BrowserState
    being unavailable at the time due to a Browser not being initialized.
  </summary>
</histogram>

<histogram name="ContentNotifications.Settings.Action"
    enum="ContentNotificationSettingsAction" expires_after="2027-01-20">
  <owner>scottyoder@google.com</owner>
  <owner>bling-pandamonium@google.com</owner>
  <summary>
    The action taken by the user in the content notification settings view.
  </summary>
</histogram>

<histogram name="ContentSettings.AllowStorageAccessSync" units="ms"
    expires_after="2027-02-14">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Measures how long a sync call to ContentSettingsManager::AllowStorageAccess
    blocks the renderer thread. Logged each time the renderer asks the browser
    for storage permission status synchronously.
  </summary>
</histogram>

<histogram name="ContentSettings.AllowStorageAccessSync.CacheHit"
    enum="Boolean" expires_after="2027-02-14">
  <owner>sisidovski@chromium.org</owner>
  <owner>chrome-loading@google.com</owner>
  <summary>
    Logged when the renderer checks storage permissions. True if the permission
    was already cached in ContentSettingsAgentImpl (e.g. via eager fetching),
    false if it required a synchronous Mojo IPC to the browser process.
  </summary>
</histogram>

<histogram name="ContentSettings.Bubble.StorageAccess.Action"
    enum="ContentSettingBubbleAction" expires_after="2024-07-10">
  <owner>fsenra@chromium.org</owner>
  <owner>dullweber@chromium.org</owner>
  <summary>Logs actions within the StorageAccess bubble.</summary>
</histogram>

<histogram name="ContentSettings.ExtensionEmbeddedSettingSet"
    enum="ContentType" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    Count of how often a specific content setting is set for an embedded URL by
    an extension. Only counts settings when the secondary pattern is different
    to the primary pattern. Exactly one of this or
    ContentSettings.ExtensionNonEmbeddedSettingSet will be emitted per call to
    contentSettings.set(), if the arguments to the call are valid.
  </summary>
</histogram>

<histogram name="ContentSettings.ExtensionNonEmbeddedSettingSet"
    enum="ContentType" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    Count of how often a specific content setting is set when only a single
    pattern is specified. Exactly one of this or
    ContentSettings.ExtensionEmbeddedSettingSet will be emitted per call to
    contentSettings.set(), if the arguments to the call are valid.
  </summary>
</histogram>

<histogram name="ContentSettings.GetContentSetting.Network.Duration"
    units="microseconds" expires_after="2025-02-23">
  <owner>trishalfonso@google.com</owner>
  <owner>wanderview@chromium.org</owner>
  <summary>
    Measures how long a call to network::CookieSettings::GetContentSetting
    takes. Logged each time a call is made. Starting M135 sub-sampled with
    probability 0.001. Note that histogram samples for clients without
    high-resolution clocks are dropped.
  </summary>
</histogram>

<histogram name="ContentSettings.GetCookieSettingInternal.Duration"
    units="microseconds" expires_after="2025-07-13">
  <owner>dullweber@chromium.org</owner>
  <owner>wanderview@chromium.org</owner>
  <summary>
    Measures how long a call to CookieSettingBase::GetCookieSettingInternal
    takes. Logged each time a call is made. Starting M135 sub-sampled with
    probability 0.1. Note that histogram samples for clients without
    high-resolution clocks are dropped.
  </summary>
</histogram>

<histogram name="ContentSettings.NumberOfExceptions" units="units"
    expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The number of user defined hostname patterns for content settings at browser
    start. Warning: this histogram was expired from 2022-08-28 to 2022-09-21;
    data may be missing.
  </summary>
</histogram>

<histogram name="ContentSettings.PermissionRequested" enum="PermissionType"
    expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    Number of times a given permission was requested by a website and the user
    has the permission set to prompt (i.e. not blocked or allowed).

    Note this is probably not the metric you want - it does not correspond to
    the total number of times websites request a permission. Also, because
    specific permissions have code that can automatically block or grant
    permissions based on things like incognito, installed extensions etc., this
    does also not correspond to the number of times users are prompted to allow
    permissions.

    For a better metric to track how often users are prompted, either use
    ContentSettings.PermissionsActions*, or Permissions.Prompt.*.

    See https://crbug.com/638076 for more details.

    Warning: this histogram was expired from 2022-06-19 to 2022-09-21; data may
    be missing.
  </summary>
</histogram>

<histogram name="ContentSettings.Popups" enum="ContentSettingPopupAction"
    expires_after="2024-06-30">
  <owner>charleszhao@chromium.org</owner>
  <owner>lazzzis@google.com</owner>
  <owner>src/components/blocked_content/OWNERS</owner>
  <summary>
    Tracks whether the popup content blocked puzzle piece was shown in the
    Omnibox, and how the user interacted with it.
  </summary>
</histogram>

<histogram name="ContentSettings.Popups.BlockerActions"
    enum="PopupBlockerAction" expires_after="2023-03-26">
  <owner>csharrison@chromium.org</owner>
  <owner>lazzzis@google.com</owner>
  <owner>src/components/blocked_content/OWNERS</owner>
  <summary>
    Counts of various events related to the popup blocker. Including blocked
    popups and overridden (clicked through) popups. This is similar to the
    ContentSettings.Popups but is at the per-popup layer rather than at the UI
    layer.
  </summary>
</histogram>

<histogram name="ContentSettings.Popups.StrongBlockerActions"
    enum="StrongPopupBlockerAction" expires_after="2027-02-21">
  <owner>csharrison@chromium.org</owner>
  <summary>
    Counts of various events related to the strong popup blocker (aka abusive
    experience enforcement), that is triggered via safe browsing.
  </summary>
</histogram>

<histogram name="ContentSettings.RegularProfile.DefaultAutoVerifySetting"
    enum="ContentSetting" expires_after="2027-01-24">
  <owner>ryankalla@google.com</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default Auto-verify setting at profile open. This histogram is only
    recorded for regular profiles.
  </summary>
</histogram>

<histogram name="ContentSettings.RegularProfile.DefaultBackgroundSyncSetting"
    enum="ContentSetting" expires_after="2026-01-18">
  <owner>tungnh@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default permission setting for Background Sync at profile open. This
    histogram is only recorded for regular profiles.
  </summary>
</histogram>

<histogram
    name="ContentSettings.RegularProfile.DefaultJavascriptOptimizationBlockedByOs"
    enum="Boolean" expires_after="2027-02-07">
  <owner>jacastro@chromium.org</owner>
  <owner>src/chrome/browser/site_protection/OWNERS</owner>
  <summary>
    Whether an operating system permission disables the javascript-optimizer.
    Recorded at profile open.

    This histogram is only recorded for regular profiles.
  </summary>
</histogram>

<histogram
    name="ContentSettings.RegularProfile.DefaultJavaScriptOptimizationSetting"
    enum="ContentSetting" expires_after="2027-02-07">
  <owner>jacastro@chromium.org</owner>
  <owner>src/chrome/browser/site_protection/OWNERS</owner>
  <summary>
    The default JavaScript optimization setting at profile open. Records the
    setting explicitly set by the user and ignores whether the permission is
    disabled by an operating system permission or enterprise policy.

    This histogram is only recorded for regular profiles.
  </summary>
</histogram>

<histogram name="ContentSettings.RegularProfile.DefaultSensorsSetting"
    enum="ContentSetting" expires_after="2027-02-19">
  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default sensors setting at profile open.

    This histogram is only recorded for regular profiles.
  </summary>
</histogram>

<histogram name="ContentSettings.RegularProfile.DefaultStorageAccessSetting"
    enum="ContentSetting" expires_after="2025-09-14">
  <owner>dullweber@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default storage access setting at profile open.

    This histogram is only recorded for regular profiles.
  </summary>
</histogram>

<histogram
    name="ContentSettings.RegularProfile.Exceptions.{ContentSettingsType}"
    units="units" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>lshang@chromium.org</owner>
  <owner>dullweber@chromium.org</owner>
  <owner>engedy@chromium.org</owner>
  <summary>
    The number of user defined content setting exceptions at browser start.
    Suffixed with the name of content setting types.

    Histogram content setting type: {ContentSettingsType}

    This histogram is only recorded for regular profiles as of M109.
  </summary>
  <token key="ContentSettingsType">
    <variant name="app-banner" summary="App banner exceptions"/>
    <variant name="auto-dark-web-content"
        summary="Auto-dark web contents exceptions"/>
    <variant name="auto-picture-in-picture"
        summary="Automatic picture-in-picture exceptions"/>
    <variant name="auto-select-certificate"
        summary="Auto-select cert exceptions"/>
    <variant name="automatic-downloads"
        summary="Automatic downloads exceptions"/>
    <variant name="autoplay" summary="Autoplay exception"/>
    <variant name="background-sync" summary="Background sync exceptions"/>
    <variant name="bluetooth-chooser-data" summary="Bluetooth chooser data"/>
    <variant name="bluetooth-guard" summary="Bluetooth guard exceptions"/>
    <variant name="client-hints" summary="Client hints"/>
    <variant name="cookies" summary="Cookies exceptions"/>
    <variant name="display-capture" summary="Display Capture Exceptions"/>
    <variant name="durable-storage" summary="Durable Storage Exceptions"/>
    <variant name="fullscreen" summary="Fullscreen exceptions"/>
    <variant name="geolocation" summary="Geolocation exceptions"/>
    <variant name="hid-chooser-data" summary="HID chooser data"/>
    <variant name="images" summary="Images exceptions"/>
    <variant name="important-site-info" summary="Important site info"/>
    <variant name="installed-web-app-metadata"
        summary="Installed web app metadata"/>
    <variant name="javascript" summary="JavaScript exceptions"/>
    <variant name="javascript-jit" summary="JavaScript JIT"/>
    <variant name="javascript-optimizer" summary="JavaScript Optimizer"/>
    <variant name="keygen" summary="Keygen exceptions"/>
    <variant name="local-network"
        summary="Local network access(local-only) exceptions"/>
    <variant name="local-network-access"
        summary="Local network access exceptions"/>
    <variant name="loopback-network"
        summary="Local network access(loopback-only) exceptions"/>
    <variant name="media-engagement" summary="Media engagement exceptions"/>
    <variant name="media-stream-camera" summary="Camera exceptions"/>
    <variant name="media-stream-mic" summary="Microphone exceptions"/>
    <variant name="midi-sysex" summary="Midi exceptions"/>
    <variant name="mixed-script" summary="Mixed script exceptions"/>
    <variant name="mouselock" summary="Mouse lock exceptions"/>
    <variant name="notifications" summary="Notification exceptions"/>
    <variant name="password-protection" summary="Password protection"/>
    <variant name="permission-autoblocking-data"
        summary="Permission autoblocking data"/>
    <variant name="permission-autorevocation-data"
        summary="Permission autorevocation data"/>
    <variant name="plugins" summary="Plugins exceptions"/>
    <variant name="popups" summary="Popups exceptions"/>
    <variant name="ppapi-broker" summary="Ppapi broker exceptions"/>
    <variant name="protected-media-identifier"
        summary="Protected media exceptions"/>
    <variant name="protocol-handler" summary="Protocol handler exceptions"/>
    <variant name="push-messaging" summary="Push messaging exceptions"/>
    <variant name="request-desktop-site"
        summary="Request desktop site exceptions"/>
    <variant name="safe-browsing-url-check-data"
        summary="Safe browsing url check data"/>
    <variant name="sensors" summary="Sensors exceptions"/>
    <variant name="serial-chooser-data" summary="Serial chooser data"/>
    <variant name="site-engagement" summary="Site engagement exceptions"/>
    <variant name="sound" summary="Sound exceptions"/>
    <variant name="ssl-cert-decisions" summary="SSL cert decisions exceptions"/>
    <variant name="storage-access" summary="Storage Access exceptions"/>
    <variant name="subresource-filter" summary="Subresource filter exceptions"/>
    <variant name="subresource-filter-data" summary="Subresource filter data"/>
    <variant name="tracking-protection"
        summary="Tracking Protection exceptions"/>
    <variant name="usb-chooser-data" summary="USB chooser data exceptions"/>
    <variant name="web-app-installation"
        summary="Web app installation exceptions"/>
    <variant name="webid-active-session" summary="FedCM Active Session"/>
    <variant name="webid-request" summary="FedCM Request"/>
    <variant name="webid-share" summary="FedCM Share"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.RegularProfile.Exceptions.{ContentSettingsType}.{ContentSetting}"
    units="units" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>lshang@chromium.org</owner>
  <owner>dullweber@chromium.org</owner>
  <owner>engedy@chromium.org</owner>
  <summary>
    The number of user defined content setting exceptions at browser start.
    Suffixed with the name of content setting types and the content setting.

    Histogram content setting type: {ContentSettingsType} Histogram content
    setting: {ContentSetting}

    This histogram is only recorded for regular profiles as of M109.
  </summary>
  <token key="ContentSettingsType">
    <variant name="cookies" summary="Cookies exceptions"/>
    <variant name="javascript-jit" summary="JavaScript JIT"/>
    <variant name="javascript-optimizer" summary="JavaScript Optimizer"/>
    <variant name="popups" summary="Popups exceptions"/>
    <variant name="storage-access" summary="Storage Access exceptions"/>
    <variant name="subresource-filter" summary="Subresource filter exceptions"/>
    <variant name="tracking-protection"
        summary="Tracking Protection exceptions"/>
  </token>
  <token key="ContentSetting">
    <variant name="Allow" summary="Allow"/>
    <variant name="AllowThirdParty"
        summary="All third parties allowed on a domain"/>
    <variant name="Ask" summary="Ask"/>
    <variant name="Block" summary="Block"/>
    <variant name="DomainWildcardAllowThirdParty"
        summary="Third-party cookies allowed for a site group using a domain
                 wildcard"/>
    <variant name="MaxRequester"
        summary="Maximum number of exceptions per requester"/>
    <variant name="MaxTopLevel"
        summary="Maximum number of exceptions per top-level"/>
    <variant name="SessionOnly" summary="Session only"/>
    <variant name="TemporaryAllowThirdParty"
        summary="Third-party cookies temporarily allowed on a domain"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultAutoDarkWebContentSetting"
    enum="ContentSetting" expires_after="2023-02-19">
  <owner>wenyufu@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default auto dark web content setting at profile open. Recorded for
    Android only.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultAutoplaySetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default autoplay setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram name="ContentSettings.{RegularProfileFiltered}DefaultCookiesSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important privacy metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default cookies setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.

    This histogram was allowed to expire between 2023-02-26 and 2024-01-23.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultIdleDetectionSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default permission setting for idle detection at profile open.

    This histogram is only recorded {RegularProfileFiltered}.

    This histogram was allowed to expire between 2022-10-23 and 2023-08-03.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram name="ContentSettings.{RegularProfileFiltered}DefaultImagesSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default image setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.

    This histogram was allowed to expire between 2022-10-23 and 2023-08-03.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultJavaScriptSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default JavaScript setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultLocationSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default location setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultMediaStreamCameraSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default camera setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultMediaStreamMicSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default microphone setting at profile open. Warning: this histogram was
    expired from 2022-06-19 to 2022-09-21; data may be missing.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultMIDISysExSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default MIDI permission setting on sysex (system exclusive) messages at
    profile open. The default microphone setting at profile open. Warning: this
    histogram was expired from 2022-08-21 to 2022-09-21; data may be missing.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultNotificationsSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default notification setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram name="ContentSettings.{RegularProfileFiltered}DefaultPopupsSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default popups setting at profile open. Warning: this histogram was
    expired from 2022-08-21 to 2022-09-21; data may be missing.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultRequestDesktopSiteSetting"
    enum="ContentSetting" expires_after="2027-02-07">
  <owner>shuyng@google.com</owner>
  <owner>twellington@chromium.org</owner>
  <summary>
    The request desktop site content setting at profile open. Recorded for
    Android and iOS only.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram name="ContentSettings.{RegularProfileFiltered}DefaultSoundSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default sound setting at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultSubresourceFilterSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default subresource filter setting at profile open. Warning: this
    histogram was expired from 2022-06-19 to 2022-09-21; data may be missing.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultUsbGuardSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default permission setting for WebUSB at profile open.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram
    name="ContentSettings.{RegularProfileFiltered}DefaultWebBluetoothGuardSetting"
    enum="ContentSetting" expires_after="never">
<!-- expires-never: tracked as an important permission metric. -->

  <owner>engedy@chromium.org</owner>
  <owner>src/components/permissions/PERMISSIONS_OWNERS</owner>
  <summary>
    The default permission setting for Web Bluetooth at profile open. Warning:
    this histogram was expired from 2022-08-21 to 2022-09-21; data may be
    missing.

    This histogram is only recorded {RegularProfileFiltered}.
  </summary>
  <token key="RegularProfileFiltered">
    <variant name="RegularProfile."
        summary="from version M-109. It is recorded only for regular profiles"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.ActivityLoggingEnabled" enum="Boolean"
    expires_after="2024-10-13">
  <owner>dewittj@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Whether the feed was fetched with activity logging enabled. This is logged
    on every feed fetch.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.AllFeeds.Activity.ByProvider"
    enum="FeedActivityBucket" expires_after="2026-01-18">
  <owner>guiperez@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Tracks user activity buckets for the filter. Reported every time a metric is
    reported through the MetricsProvider to allow filtering. The histogram used
    for analysis is ContentSuggestions.Feed.AllFeeds.Activity, whilst this one
    will only be used for the filter. Any changes to
    ContentSuggestions.Feed.AllFeeds.Activity will also change how this metric
    is reported.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.BrokenNTPHierarchy"
    enum="NTPBrokenViewHierarchyRelationship" expires_after="M120">
  <owner>adamta@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    When the NTP view hierarchy is fixed upon NTP creation, this hisotgram logs
    which part was broken. Temporary log used to gather info for
    crbug.com/1262536.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentAgeOnLoad.BlockingRefresh"
    units="ms" expires_after="2024-01-14">
  <owner>carlosk@chromium.org</owner>
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The time since locally stored content was fetched from the server.
    Reported when the feed surface is shown, and content is refreshed from the
    network. This typically only happens when content is stale, so this is a
    measurement of how stale content is before it's replaced by a blocking
    refresh. Feed v2 only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentAgeOnLoad.NotRefreshed"
    units="ms" expires_after="2024-01-14">
  <owner>carlosk@chromium.org</owner>
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The time since locally stored content was fetched from the server.
    Reported when the feed surface is shown, and the local persisted feed
    content is loaded instead of a direct network refresh. This provides a
    measure of how stale feed content is when the feed loads without a blocking
    network request. Feed v2 only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentDuplication2.Position{Index}"
    enum="Boolean" expires_after="2026-04-05">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports whether the feed content at the specific position is
    duplicate to previous contents. The feed contents that are not viewed before
    are not counted towards the duplication even if they show up again. It is
    reported when the feed content is received from the server.
  </summary>
  <token key="Index">
    <variant name="1" summary="1"/>
    <variant name="2" summary="2"/>
    <variant name="3" summary="3"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentDuplication2.{Range}" units="%"
    expires_after="2024-09-01">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports the percentage of the duplicate contents received for a
    range of cards. The feed contents that are not viewed before are not counted
    towards the duplication even if they show up again. It is reported when the
    feed contents are received from the server.
  </summary>
  <token key="Range">
    <variant name="All" summary="All cards"/>
    <variant name="First10" summary="First 10 cards"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentLifetime.InvalidAge" units="ms"
    expires_after="2026-05-21">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The invalid age lifetime of content fetched from the server.
    Reported when new content is served to the feed from the server. This
    provides a measure of how stale feed content is from the client side.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentLifetime.InvalidAgeIsPresent"
    enum="Boolean" expires_after="2026-05-21">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: If the content lifetime of a feed response has a non zero invalid
    age when fetched from the server. Reported when new content is served to the
    feed from the server. This provides a measure of how stale feed content is
    from the client side.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentLifetime.StaleAge" units="ms"
    expires_after="2026-05-21">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The stale age lifetime of content fetched from the server. Reported
    when new content is served to the feed from the server. This provides a
    measure of how stale feed content is from the client side.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ContentLifetime.StaleAgeIsPresent"
    enum="Boolean" expires_after="2026-05-21">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: If the content lifetime of a feed response has a non zero stale age
    when fetched from the server. Reported when new content is served to the
    feed from the server. This provides a measure of how stale feed content is
    from the client side.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.DisplayStatusOnOpen"
    enum="ContentSuggestionsDisplayStatus" expires_after="2027-02-14">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The display status of the content suggestions when users open NTPs.
    Whether content suggestions are disabled by policy (e.g. enterprise or
    supervised users), enabled but collapsed, or enabled and expanded when a new
    NTP is created.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.DocumentViewSendCount1000"
    units="documents" expires_after="2023-10-15">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Number of docids sent when loading the Feed from the network. Reported when
    the Feed is loaded from the network, when docview sending is allowed. This
    histogram has a maximum count of 1000.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.DroppedDocumentViewCount"
    units="documents" expires_after="2023-10-15">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    If too many document IDs are stored within a short time period, they are
    dropped rather than recorded in
    ContentSuggestions.Feed.DocumentViewSendCount. This histogram is recorded
    when document IDs must be dropped in this way, and reports the number of IDs
    dropped.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.FeedSignInUI" enum="FeedSignInUI"
    expires_after="2024-02-11">
  <owner>tinazwang@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Recorded when a signed out user triggered a sign-in related UI from feed
    personalization control. iOS only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.FeedSyncPromo" enum="FeedSyncPromo"
    expires_after="2023-10-10">
  <owner>tinazwang@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Recorded when a user interacts with a Sync Promo inside the Feed, e.g.:
    accepting the bottom sync promo, or closing the top Sync promos. iOS only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ImageFetchStatus"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2024-01-14">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Status of image fetches for the feed. Recorded for each image
    fetch. Fetches happen when loading the feed or scrolling the feed. Fetched
    images are cached, so subsequent loads may not fetch again. Feed v2 only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.LoadStepLatency{FeedLoadLatencyStep}"
    units="ms" expires_after="2024-07-21">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Latencies for individual steps taken to load the feed. This is reported at
    most once per Chrome execution, and only reported for a Feed load operation
    that ends with the Feed showing up on the UI. All steps added together tally
    to the total time taken.

    Feed v2 only. {FeedLoadLatencyStep}
  </summary>
  <token key="FeedLoadLatencyStep">
    <variant name=".ActionUpload"
        summary="Time taken read stored actions and upload them if necessary."/>
    <variant name=".LoadFromStore"
        summary="Time taken to load the feed content from local storage."/>
    <variant name=".QueryRequest"
        summary="Time taken to request fresh feed content from the network."/>
    <variant name=".StreamView"
        summary="Time taken to receive feedback that a Feed item was shown.
                 Time begins after feed data is loaded from the network or
                 local storage"/>
    <variant name=".TaskStart"
        summary="Time taken to begin executing the load stream task."/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.LoadStreamStatus.LoadMore"
    enum="FeedLoadStreamStatus" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Status of loading additional Feed content onto the bottom of the stream.
    Feed v2 only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ManualRefreshInterval" units="ms"
    expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The interval between current pull-to-refresh time and last time when the
    feed is refreshed (background refresh or pull-to-refresh), up to 1 day. This
    is reported when the pull-to-refresh occurs.
  </summary>
</histogram>

<histogram
    name="ContentSuggestions.Feed.Network.CompressedResponseSizeKB{NetworkRequestType}"
    units="KB" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The wire size (potentially compressed) of a {NetworkRequestType}
    network response received by the Feed's networking host. Recorded when a
    successful response is received.
  </summary>
  <token key="NetworkRequestType" variants="FeedNetworkRequestType">
    <variant name="" summary="Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.Duration{NetworkEvent}"
    units="ms" expires_after="2026-03-01">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>The amount of time a {NetworkEvent} network event took.</summary>
  <token key="NetworkEvent" variants="FeedNetworkRequestType">
    <variant name="" summary="Feed component"/>
    <variant name=".ActionUploadFailure" summary="ActionUploadFailure"/>
    <variant name=".ActionUploadSuccess" summary="ActionUploadSuccess"/>
    <variant name=".ArticlesFetchFailure" summary="ArticlesFetchFailure"/>
    <variant name=".ArticlesFetchSuccess" summary="ArticlesFetchSuccess"/>
    <variant name=".MoreArticlesFetchFailure"
        summary="MoreArticlesFetchFailure"/>
    <variant name=".MoreArticlesFetchSuccess"
        summary="MoreArticlesFetchSuccess"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.FeedQueryRequestSize"
    units="bytes" expires_after="2023-10-15">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: the approximate size in bytes of the FeedQuery GET request.
    Recorded when a FeedQuery is sent.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.RequestSizeKB.Compressed"
    units="KB" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: the size in kb of gzip-compressed requests sent by the Feed's
    networking host. Recorded when a request is sent.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.RequestStatusCode"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The integer status code of network requests made by the feed
    library's networking host. This code includes both protocol(1xx-5xx) and
    non-protocol(-xxx) errors. Recorded when a request completes.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.ResponseSizeKB" units="KB"
    expires_after="2027-01-10">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: the uncompressed size in KB of responses received by the Feed's
    networking host. Recorded when a successful response is received.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.ResponseStatus{Type}"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The HTTP response status for a network request made by the Feed component.
  </summary>
  <token key="Type" variants="FeedNetworkRequestType"/>
</histogram>

<histogram name="ContentSuggestions.Feed.Network.TokenFetchStatus"
    enum="GoogleServiceAuthError" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: failure reason when attempting to fetch an OAuth token for the
    feed. Recorded when a token fetch completes.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.NoticeCardFulfilled" enum="Boolean"
    expires_after="2023-03-01">
  <owner>vincb@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports whether the notice card for feed action reporting has been
    fulfilled. Recorded when reading the response content of the feed query that
    is successful (includes both load stream and load more queries).
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.NoticeCardFulfilled2" enum="Boolean"
    expires_after="2025-02-10">
  <owner>vincb@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports whether the notice card for feed action reporting has been
    fulfilled. Recorded when reading the response content of the load stream
    query that is successful.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.RefreshTrigger"
    enum="FeedRefreshTrigger" expires_after="2026-08-23">
  <owner>adamta@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Tracks triggers that ask the Discover engine to refresh the feed. However, a
    network call may or may not occur based on configuration thresholds.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ResourceFetchStatus"
    enum="CombinedHttpResponseAndNetErrorCode" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Status of resource fetches for the feed. Recorded for each resource
    fetch. Fetches happen when the specific resource is needed to enhance the
    feed content while the feed is being displayed.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.SendFeedback"
    enum="FeedSendFeedbackType" expires_after="2024-01-23">
  <owner>carlosk@chromium.org</owner>
  <owner>petewil@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>Number of each type of feedback sent about the feed.</summary>
</histogram>

<histogram name="ContentSuggestions.Feed.TimeSpentInFeed" units="ms"
    expires_after="never">
<!-- expires-never: key feature metric.  We will need the Engagement
       type as long as we have a feed, and it will be removed with the
       feed code if the feed is ever removed. -->

  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    How long a user used the Feed in one day (local time midnight to midnight).
    Reported at most once per day. Usage reported is typically from the previous
    day, but could be from several days ago if the user is not active. Time is
    calculated starting with the first Feed interaction, until the Feed surface
    is closed, or the user is idle (no scrolling or other actions) for 30
    seconds.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UniformityFlag" enum="Boolean"
    expires_after="2025-10-26">
  <owner>ginnyhuang@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Records the value of Discover uniformity flag each time on app start up,
    when the Feed is initialized. iOS only.
  </summary>
</histogram>

<histogram
    name="ContentSuggestions.Feed.UnsignedUserPersonalization.CountValuesDuringStoreInitialization"
    units="count" expires_after="2023-03-01">
  <owner>tbansal@chromium.org</owner>
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Records count of entries in the pref store after the store is initialized
    (which happens during the feed service intiialization). The metric is
    recorded after the store is cleaned up and conpacted (as part of store
    initialization).
  </summary>
</histogram>

<histogram
    name="ContentSuggestions.Feed.UnsignedUserPersonalization.LinkClicked"
    units="count" expires_after="2023-03-01">
  <owner>tbansal@chromium.org</owner>
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Recorded everytime when the user clicks a feed link article and an entry is
    recorded to the user actions collector. The entry may not be recorded in
    certain cases (not a complete list): the URL of the clicked link was not
    valid, the MIDs was missing etc.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UploadActionsBatchStatus"
    enum="FeedUploadActionsBatchStatus" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Result of attempting to upload a batch of one or more actions.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UploadActionsStatus"
    enum="FeedUploadActionsStatus" expires_after="2027-01-03">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Result of an UploadActionsTask run in which zero or more batches of user
    actions are uploaded. See ContentSuggestions.Feed.UploadActionsBatchStatus
    for the status of a particular batch upload.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UploadVisibilityLog" enum="Boolean"
    expires_after="2023-07-23">
  <owner>freedjm@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports whether the visibility log was uploaded successfully.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UploadVisibilityLog.{LogType}"
    enum="Boolean" expires_after="2024-09-29">
  <owner>freedjm@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports whether the {LogType} log was uploaded successfully.
  </summary>
  <token key="LogType">
    <variant name="Click" summary="click"/>
    <variant name="View" summary="view"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.UserActions" enum="FeedUserActionType"
    expires_after="2027-02-14">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Counts of Feed user actions. e.g. (Open a Card, Hide the Feed, etc.).
    Recorded when the user takes an explicit action related to the Feed.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UserActions.Commands"
    enum="FeedUserCommandType" expires_after="2025-01-05">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Recorded whenever an Elements commands has taken place which wasn't handled
    explicitly by ContentSuggestions.Feed.UserActions. e.g. A new command to
    added server side to &quot;Report Content&quot;.(iOS only).
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UserJourney.GetMore.FailureDuration"
    units="ms" expires_after="2023-09-24">
  <owner>harringtond@chromium.org</owner>
  <owner>carlosk@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Time between the UI requesting additional stream content and failure by
    either a 15 second timeout or a surface closure.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UserJourney.GetMore.SuccessDuration"
    units="ms" expires_after="2024-02-04">
  <owner>harringtond@chromium.org</owner>
  <owner>carlosk@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Time between the UI requesting additional stream content and the content
    being provided within 15 seconds. Providing content entails showing either a
    cached or newly fetched Feed card.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.UserJourney.{Surface}.Failure"
    enum="Boolean" expires_after="2024-01-23">
  <owner>harringtond@chromium.org</owner>
  <owner>carlosk@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Reported when a user taps on a {Surface} card and the page is not loaded
    successfully within 20 seconds.
  </summary>
  <token key="Surface">
    <variant name="OpenCard" summary="For-You Feed"/>
    <variant name="OpenCard.WebFeed" summary="Web Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.UserJourney.{Surface}.SuccessDuration"
    units="ms" expires_after="2024-01-23">
  <owner>harringtond@chromium.org</owner>
  <owner>carlosk@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The time between a user tapping on a {Surface} card and the page finishes
    loading successfully. Only reported when loading takes less than 20 seconds.
  </summary>
  <token key="Surface">
    <variant name="OpenCard" summary="For-You Feed"/>
    <variant name="OpenCard.WebFeed" summary="Web Feed"/>
  </token>
</histogram>

<histogram
    name="ContentSuggestions.Feed.UserJourney.{Surface}.{Status}Duration"
    units="ms" expires_after="2026-04-26">
  <owner>harringtond@chromium.org</owner>
  <owner>carlosk@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The time between a {Surface} opening and either providing user content, or
    failing to provide content. Providing content entails showing either a
    cached or newly fetched Feed card within 15 seconds. Success is reported
    upon view of the card. Failure is reported when either the surface is closed
    or a timeout of 15 seconds expires.
  </summary>
  <token key="Surface">
    <variant name="OpenFeed" summary="For-You Feed"/>
    <variant name="OpenFeed.WebFeed" summary="Web Feed"/>
  </token>
  <token key="Status">
    <variant name="Failure" summary="Failure"/>
    <variant name="Success" summary="Success"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.UserSettingsOnStart"
    enum="FeedUserSettingsOnStart" expires_after="2024-09-01">
  <owner>carlosk@chromium.org</owner>
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The state of some account settings that affect Feed users. Reported once at
    startup (to a single bucket), for all users. Note that this histogram uses
    data cached from the last time the Feed was fetched. Android only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ViewedCardCountAtManualRefresh"
    units="count" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Tracks the number of cards viewed at the time of pull-to-refresh. This is
    reported when the pull-to-refresh occurs. This is computed as the number of
    cards that are viewed (2/3rds of card is in the viewport) since last time
    when the feed is refreshed (background refresh or pull-to-refresh).
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.ViewedCardPercentageAtManualRefresh"
    units="%" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Tracks the percentage of cards viewed at the time of pull-to-refresh. This
    is reported when the pull-to-refresh occurs. This is computed as the
    percentage of cards that are viewed (2/3rds of card is in the viewport)
    since last time when the feed is refreshed (background refresh or
    pull-to-refresh).
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.VisibilityLoggingEnabled"
    enum="Boolean" expires_after="2023-07-23">
  <owner>freedjm@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports whether visibility logging is enabled when logging is
    attempted.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.VisitDuration" units="ms"
    expires_after="2024-06-30">
  <owner>harringtond@chromium.org</owner>
  <owner>freedjm@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Time spent reading the page linked by an opened suggestion card.
    This is a lower-bound time. Does not include time after Chrome is closed and
    re-opened. Does not include time after the visited tab no longer has focus,
    or after the tab is navigated. For the 'open in new tab' action, time starts
    when the user switches to the new tab. If the user returns by tapping the
    suggestion again, it will be recorded as another entry in this histogram.

    Feed v2 only.
  </summary>
</histogram>

<histogram name="ContentSuggestions.Feed.{PlayType}Video.InitializationError"
    enum="FeedVideoInitializationError" expires_after="2023-07-23">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: records errors occurred during the video player initialization. The
    embedded video player needs to be initialized before it can be used to play
    a video in {PlayType} mode. In autoplay muted mode, the initialization may
    kick off even before the video view is scrolled to become visible. In normal
    unmuted mode, this happens when the user taps the video to launch the video
    in fullscreen playing mode.
  </summary>
  <token key="PlayType">
    <variant name="AutoplayMuted"/>
    <variant name="NormalUnmuted"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.{PlayType}Video.PlayError"
    enum="FeedVideoPlayError" expires_after="2023-01-20">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: records errors occurred during the video playing, in {PlayType}
    mode. Upon the successful initialization of the embedded player, the video
    starts to play and any error occurs since then is reported here.
  </summary>
  <token key="PlayType">
    <variant name="AutoplayMuted"/>
    <variant name="NormalUnmuted"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.Feed.{PlayType}Video.PlayEvent"
    enum="FeedVideoPlayEvent" expires_after="2023-01-20">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: records events triggered during the video playing, in {PlayType}
    mode.
  </summary>
  <token key="PlayType">
    <variant name="AutoplayMuted"/>
    <variant name="NormalUnmuted"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.Activity"
    enum="FeedActivityBucket" expires_after="2025-09-28">
  <owner>guiperez@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Tracks user activity buckets with {FeedType}. Each bucket composed of the
    user's activity level. Logs the for the first time 1 day after the metric is
    active (only on first time use), then logs an activity bucket after at least
    24hrs from the last log have elapsed. When the &quot;Engaged&quot; metric is
    triggered we log one more day of activity during the past 28 days.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="the For-You feed"/>
    <variant name="Feed.AllFeeds" summary="All Feeds combined"/>
    <variant name="Feed.WebFeed" summary="the Following/Web Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.EngagementType"
    enum="FeedEngagementType" expires_after="never">
<!-- expires-never: key feature metric.  We will need the Engagement
       type as long as we have a feed, and it will be removed with the
       feed code if the feed is ever removed. -->

  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <improvement direction="HIGHER_IS_BETTER"/>
  <summary>
    Tracks user behavior with {FeedType}. Each bucket is one of two types of
    metric. Per-visit metrics sample once per &quot;visit&quot;, which is a
    cluster of user activities separated by less than 5 minutes of inactivity.
    Per-visit metrics record a sample at the moment that the visit's criteria
    are first met. Per-interaction metrics are not clustered and report samples
    immediately. In the UI, Bucket Proportion and Total Count are not meaningful
    as these metrics are not independent. All buckets of this metric can be
    moved by changes in the Discover service as well as by client changes.
    go/discover-oncall describes how to get in touch with Discover oncall
    engineers.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="the For-You Feed"/>
    <variant name="Feed.AllFeeds" summary="all Feeds combined"/>
    <variant name="Feed.SupervisedFeed" summary="the supervised Feed"/>
    <variant name="Feed.WebFeed" summary="the Web Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.InfoCard.{Action}"
    enum="FeedInfoCardType" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>adamta@google.com</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Reports when {Action} has occurred for an info card. The type of the info
    card was reported. Available in iOS as of M126.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
    <variant name="Feed.SupervisedFeed" summary="the supervised Feed"/>
    <variant name="Feed.WebFeed" summary="Web Feed"/>
  </token>
  <token key="Action">
    <variant name="Clicked" summary="clicked"/>
    <variant name="Dismissed" summary="dismissed explicitly"/>
    <variant name="Reset" summary="state reset"/>
    <variant name="Started" summary="started to track view"/>
    <variant name="Viewed" summary="viewed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.LoadedCardCount" units="index"
    expires_after="2024-09-29">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports the total number of cards when the {FeedType} data is
    successfully loaded to be presented to the user. Reported after an initial
    load. Not reported after a NextPage request. When loading data from local
    storage, previously fetched NextPage cards are counted though.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
    <variant name="Feed.SupervisedFeed" summary="the supervised Feed"/>
    <variant name="Feed.WebFeed" summary="Web Feed"/>
  </token>
</histogram>

<histogram
    name="ContentSuggestions.{FeedType}.LoadMoreTrigger.OffsetFromEndOfStream"
    units="cards" expires_after="2024-01-31">
  <owner>dewittj@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The number of cards not yet scrolled into visibility at the moment the Feed
    decides to load more content.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
    <variant name="Feed.SupervisedFeed" summary="Supervised Feed"/>
    <variant name="Feed.WebFeed" summary="Web Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.LoadMoreTrigger.TotalCards"
    units="cards" expires_after="2024-09-01">
  <owner>dewittj@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    The total number of cards in the feed stream at the moment the Feed decides
    to load more content.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
    <variant name="Feed.SupervisedFeed" summary="Supervised Feed"/>
    <variant name="Feed.WebFeed" summary="Web Feed"/>
  </token>
</histogram>

<histogram
    name="ContentSuggestions.{FeedType}.LoadStreamStatus.BackgroundRefresh"
    enum="FeedLoadStreamStatus" expires_after="2027-02-07">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Status of loading new {FeedType} data in the background. Reported
    any time Chrome attempts to fetch fresh Feed content in the background. This
    is either due to a background fetch schedule, or when fetching the Web-Feed
    while the For-You feed is active.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.LoadStreamStatus.Initial"
    enum="FeedLoadStreamStatus" expires_after="2027-01-31">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Status of loading the initial {FeedType} stream, which happens when
    the {FeedType} surface is shown. Feed v2 only.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

<histogram
    name="ContentSuggestions.{FeedType}.LoadStreamStatus.InitialFromStore"
    enum="FeedLoadStreamStatus" expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: The status of loading the Feed from the local store. Reported when
    loading the Feed for display. Recorded at the same time as
    ContentSuggestions.{FeedType}.LoadStreamStatus.Initial to differentiate
    between store errors and network fetch results.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.LoadStreamStatus.ManualRefresh"
    enum="FeedLoadStreamStatus" expires_after="2026-02-01">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: status of pulling-to-refresh the {FeedType} stream per the user
    request. Reported when the refresh completes.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.ReachedEndOfFeed" units="index"
    expires_after="2024-05-26">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports the number of cards in the {FeedType}. Reported when the
    last card of the {FeedType} is shown. Note that this is reported even if the
    Feed is attempting to load additional content (LoadMore), as long as the
    last card is 2/3rds shown before additional content loads. In this case,
    this histogram can be reported multiple times without leaving the Feed
    surface.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.SharedStateSizeKB" units="KB"
    expires_after="2024-05-26">
  <owner>harringtond@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports the total size in KB of the shared state for the
    {FeedType}. Reported once when loading {FeedType} content for display, and
    once each time additional pages of content are added.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

<histogram name="ContentSuggestions.{FeedType}.StreamContentSizeKB" units="KB"
    expires_after="2025-11-30">
  <owner>jianli@chromium.org</owner>
  <owner>feed@chromium.org</owner>
  <summary>
    Android: Reports the total size in KB of all of the {FeedType} content (not
    including shared state, or dynamically fetched media). Reported once when
    loading {FeedType} content for display, and once each time additional pages
    of content are added.
  </summary>
  <token key="FeedType">
    <variant name="Feed" summary="For-You Feed"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
