<!--
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 Sharing 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="TextFragmentSource">
<!-- Should be synced with TextFragmentLinkOpenSource in enums.xml. -->

  <variant name=".SearchEngine" summary="the default search engine."/>
  <variant name=".SendTabToSelf"
      summary="Send Tab To Self cross-device sharing"/>
  <variant name=".Unknown" summary="unknown but not the default search engine"/>
</variants>

<histogram name="SharedHighlights.AndroidShareSheet.SharedState"
    enum="LinkGenerationSharedStatus" expires_after="2026-01-04">
  <owner>sebsg@chromium.org</owner>
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records the status of the link generation when a user shares content using
    the feature on Android.
  </summary>
</histogram>

<histogram name="SharedHighlights.AsyncTask.Iterations" units="iterations"
    expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Indicates number of iterations it took for AsyncFindBuffer to finish the
    search. AsyncFindBuffer is used only for validating generated text fragment
    selectors for Shared Highlighting.
  </summary>
</histogram>

<histogram name="SharedHighlights.AsyncTask.SearchDuration" units="ms"
    expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Time it took in milliseconds for AsyncFindBuffer to finish the search.
    AsyncFindBuffer is used only for validating generated text fragment
    selectors for Shared Highlighting.
  </summary>
</histogram>

<histogram name="SharedHighlights.Desktop.CopiedLinkType"
    enum="LinkGenerationCopiedLinkType" expires_after="2024-05-19">
  <owner>sebsg@chromium.org</owner>
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records the type of shared highlighting link the user copied on desktop.
  </summary>
</histogram>

<histogram name="SharedHighlights.LinkGenerated.Error"
    enum="LinkGenerationError" expires_after="2027-01-03">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records errors that caused text fragment selector generation to fail.
    Recorded for all the failed link generation runs. This histogram is a
    superset of |SharedHighlights.LinkGenerated.Error.Requested|.
  </summary>
</histogram>

<histogram name="SharedHighlights.LinkGenerated.Error.Requested"
    enum="LinkGenerationError" expires_after="2026-12-27">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records errors that caused text fragment selector generation to fail.
    Recorded only for failure cases that were requested by users.
  </summary>
</histogram>

<histogram name="SharedHighlights.LinkGenerated.Error.TimeToGenerate"
    units="ms" expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Time it took in millisecons for a failed text fragment selector generation
    attempt.
  </summary>
</histogram>

<histogram name="SharedHighlights.LinkGenerated.StateAtRequest"
    enum="LinkGenerationState" expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records the state of the link generation when link to text request is
    received from the browser process.
  </summary>
</histogram>

<histogram name="SharedHighlights.LinkGenerated.TimeToGenerate" units="ms"
    expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    How long it took in milliseconds to successfully generate text fragment
    selector.
  </summary>
</histogram>

<histogram name="SharedHighlights.LinkGenerated{Requested}"
    enum="BooleanSuccess" expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Indicates whether text fragment selector generation was successful for
    {Requested}.
  </summary>
  <token key="Requested">
    <variant name="" summary="all generation cases"/>
    <variant name=".Requested"
        summary="all cases when generated selector is requested."/>
    <variant name=".RequestedAfterReady"
        summary="cases when selector is requested after its ready."/>
    <variant name=".RequestedBeforeReady"
        summary="cases when selector is requested before its ready."/>
  </token>
</histogram>

<histogram name="SharedHighlights.LinkToTextDiagnoseStatus"
    enum="LinkToTextDiagnoseStatus" expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records the status of link to text flow on Android for diagnostic purposes.
    Intended to be temporary for debug purposes.
  </summary>
</histogram>

<histogram name="SharedHighlights.ObtainReshareLink.Status"
    enum="LinkToTextReshareStatus" expires_after="2024-03-01">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Records if obtaining reshare link was successful. Otherwise, it records the
    failure reason.
  </summary>
</histogram>

<histogram name="Sharing.Android.Origin" enum="ShareOrigin"
    expires_after="2027-02-07">
  <owner>jinsukkim@chromium.org</owner>
  <owner>clank-app-team@google.com</owner>
  <summary>
    Records the origin of the sharing action in the Intent object. Recorded when
    the Intent is processed in browser app for viewing. Android only.
  </summary>
</histogram>

<histogram name="Sharing.AndroidPageSummary.SheetEvents"
    enum="PageSummarySheetEvents" expires_after="2024-06-30">
  <owner>salg@google.com</owner>
  <owner>ssid@google.com</owner>
  <summary>
    Records ocurrences of various UI events related to the page summary sharing
    sheet (open sheet, dismiss sheet, send feedback, etc.). Recorded based on
    user actions (See enum definitions for more details).
  </summary>
</histogram>

<histogram name="Sharing.AnyShareStarted" enum="ShareSourceAndroid"
    expires_after="never">
  <owner>dimich@chromium.org</owner>
  <owner>sophey@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <improvement direction="HIGHER_IS_BETTER"/>
  <summary>
    The UI surface that started any share attempt. Android only.

    This is a vital metric for the sharing team; please do not remove it or
    change its behavior without consulting the metric owners.
  </summary>
</histogram>

<histogram name="Sharing.AnyShareStartedDesktop" enum="ShareSourceDesktop"
    expires_after="never">
  <owner>dimich@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <improvement direction="HIGHER_IS_BETTER"/>
  <summary>
    The UI surface that started any share attempt. Desktop only.

    This is a vital metric for the sharing team; please do not remove it or
    change its behavior without consulting the metric owners.
  </summary>
</histogram>

<histogram name="Sharing.ClickToCallDialerPresent" enum="BooleanPresent"
    expires_after="2023-06-25">
  <owner>mvanouwerkerk@chromium.org</owner>
  <owner>knollr@chromium.org</owner>
  <summary>
    Logged when we try to fire a dial intent in click to call. Distinguishes
    between if the user has an app that can handle dial intent or not. Android
    only.
  </summary>
</histogram>

<histogram name="Sharing.DefaultSharesheetAndroid.Opened" enum="ShareOrigin"
    expires_after="2027-01-17">
  <owner>wenyufu@chromium.org</owner>
  <owner>sophey@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the origin of the share that opened the default sharesheet. Recorded
    when the sharesheeet is opened.
  </summary>
</histogram>

<histogram name="Sharing.LongScreenshots.MemoryLimitOnCapture" units="%"
    expires_after="2027-02-07">
  <owner>jhimawan@google.com</owner>
  <owner>src/components/paint_preview/OWNERS</owner>
  <summary>
    Records the memory limit percentage when a long screenshot capture is
    initiated. Recorded for both the system (scroll capture) and share sheet
    (compositor) paths. Android only.
  </summary>
</histogram>

<histogram name="Sharing.MessageReceivedType" enum="SharingMessageType"
    expires_after="2027-02-07">
  <owner>mvanouwerkerk@chromium.org</owner>
  <owner>peter@chromium.org</owner>
  <summary>
    The type of SharingMessage (aka the PayloadCase). This is logged when a
    message is received through FCM by the handler in the Sharing service. All
    platforms.
  </summary>
</histogram>

<histogram
    name="Sharing.OneTimeTokenSharingHandler.NotificationValidationResult"
    enum="OneTimeTokenValidationResult" expires_after="2027-02-16">
  <owner>bkassenov@google.com</owner>
  <owner>src/chrome/browser/sharing/OWNERS</owner>
  <summary>
    Records the result of validating an incoming OneTimeTokenSharing message.
    Recorded when a message is received by OneTimeTokenSharingHandler.
  </summary>
</histogram>

<histogram name="Sharing.PreparePreviewFaviconDuration" units="ms"
    expires_after="2025-06-08">
  <owner>wenyufu@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    The time to download the favicon as the image preview or processing the
    provided preview image as URI, for sharing an link using Android share
    sheet. Recorded when sharing a link with Android share sheet only.
  </summary>
</histogram>

<histogram name="Sharing.Screenshot.Action" enum="SharingScreenshotAction"
    expires_after="2023-11-19">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Logged when actions are taken in the sharing screenshot image editing
    feature.
  </summary>
</histogram>

<histogram name="Sharing.ScrollCapture.BitmapGeneratorStatus"
    enum="SharingScrollCaptureBitmapGenerationStatus"
    expires_after="2027-02-07">
  <owner>ckitagawa@chromium.org</owner>
  <owner>src/components/paint_preview/OWNERS</owner>
  <summary>
    Records the status of the Bitmap Generator when capturing scroll capture
    long screenshot. Recorded after the page capture request is sent to the
    paint_preview capture service and compositor, when the service is no longer
    busy. This metric is only emitted on Android S+.
  </summary>
</histogram>

<histogram name="Sharing.ScrollCapture.MemoryPressureOnSearch"
    enum="MemoryPressureLevel" expires_after="2027-02-07">
  <owner>jhimawan@google.com</owner>
  <owner>src/components/paint_preview/OWNERS</owner>
  <summary>
    Records the memory pressure level when a scroll capture search is initiated.
    Recorded when the system requests scroll capture support. Android only.
  </summary>
</histogram>

<histogram name="Sharing.ScrollCapture.SuccessfulCaptureDuration" units="ms"
    expires_after="2027-04-01">
  <owner>ckitagawa@chromium.org</owner>
  <owner>src/components/paint_preview/OWNERS</owner>
  <summary>
    Records the total time spent capturing a long screenshot of a page using
    scroll capture. It is recorded when a scroll capture request successfully
    finishes. This metric is only emitted on Android S+.
  </summary>
</histogram>

<histogram
    name="Sharing.SendMessageResult{DevicePlatformOrChannel}{PulseIntervalOrSharingMessage}"
    enum="SharingSendMessageResult" expires_after="2026-04-26">
  <owner>peter@chromium.org</owner>
  <owner>knollr@chromium.org</owner>
  <summary>
    Result of sending a SharingMessage by the Sharing service. Logged after the
    send message callback is run. Not logged for sending ack messages.
    {DevicePlatformOrChannel} {PulseIntervalOrSharingMessage}
  </summary>
  <token key="DevicePlatformOrChannel">
    <variant name="" summary="All platforms"/>
    <variant name=".Android" summary="Android OS"/>
    <variant name=".ChromeOS" summary="Chrome OS"/>
    <variant name=".FcmSenderId" summary="FCM Sender ID channel"/>
    <variant name=".iOS" summary="iOS"/>
    <variant name=".Linux" summary="Linux OS"/>
    <variant name=".Mac" summary="Mac OS"/>
    <variant name=".Server" summary="Server platform or server channel"/>
    <variant name=".Unknown" summary="Device type or channel unknown"/>
    <variant name=".Windows" summary="Windows OS"/>
  </token>
  <token key="PulseIntervalOrSharingMessage">
    <variant name=""/>
    <variant name=".ACK_MESSAGE" summary="Ack Message"/>
    <variant name=".CLICK_TO_CALL_MESSAGE" summary="Click To Call Message"/>
    <variant name=".DISCOVERY_REQUEST" summary="Discovery Request Message"/>
    <variant name=".OPTIMIZATION_GUIDE_PUSH_NOTIFICATION"
        summary="Optimization Guide Push Notification Message"/>
    <variant name=".PEER_CONNECTION_ICE_CANDIDATES_MESSAGE"
        summary="Peer Connection Ice Candidates Message"/>
    <variant name=".PEER_CONNECTION_OFFER_MESSAGE"
        summary="Peer Connection Offer Message"/>
    <variant name=".PING_MESSAGE" summary="Ping Message"/>
    <variant name=".PulseIntervalLong" summary="Long pulse interval"/>
    <variant name=".PulseIntervalMedium" summary="Medium pulse interval"/>
    <variant name=".PulseIntervalShort" summary="Short pulse interval"/>
    <variant name=".REMOTE_COPY_MESSAGE" summary="Remote Copy Message"/>
    <variant name=".SHARED_CLIPBOARD_MESSAGE"
        summary="Shared Clipboard Message"/>
    <variant name=".SMS_FETCH_REQUEST" summary="SMS Fetch Request"/>
    <variant name=".UNKNOWN_MESSAGE" summary="Unknown Message"/>
    <variant name=".WEB_RTC_SIGNALING_FRAME"
        summary="Web RTC Signalling Message"/>
  </token>
</histogram>

<histogram name="Sharing.SendMessageUsingSync" enum="Boolean"
    expires_after="2026-11-15">
  <owner>rushans@google.com</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records whether a SharingMessage is being sent over sync. Recorded for all
    messages before sending them. Recorded for all platforms.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.ActivatedEntryPoint"
    enum="SendTabToSelfShareActivatedEntryPoint" expires_after="2027-06-01">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the entry point from which a received Send Tab to Self tab was
    activated by the user or automatically activated by the system.

    If a tab is opened in the background but is closed or the browser is shut
    down before the user activates it, this is recorded as &quot;Tab or Browser
    Closed Without Activation&quot;.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.AutoOpenOutcome2"
    enum="SendTabToSelfAutoOpenOutcome" expires_after="2027-03-30">
  <owner>ankushkush@google.com</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Outcome of an attempt to automatically open a received Send Tab To Self
    entry in the foreground. Recorded whenever a new entry is received and
    evaluated for auto-opening.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.DeviceFormFactorCombination"
    enum="SendTabToSelfFormFactorCombination" expires_after="2027-06-15">
  <owner>treib@chromium.org</owner>
  <owner>ankushkush@chromium.org</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the form factor combination of the sending (local) device and the
    target (destination) device when a tab is sent. Recorded on the sending
    device at the moment the tab is sent.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.InvokedEntryPoint"
    enum="SendTabToSelfShareEntryPoint" expires_after="2027-06-01">
  <owner>treib@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the entry point (UI surface) from which Send Tab To Self was invoked
    by the user on the sending device. Logged when the share bubble/sheet/dialog
    is first shown to the user.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.IsLocalDeviceNameAvailableOnSend"
    enum="BooleanAvailable" expires_after="2027-07-01">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records whether the local device name is available when sending a Send Tab
    To Self entry. The device name can be unavailable during early startup
    before DeviceInfoTracker initialization. This metric helps determine whether
    receiver-side toast and snackbar UIs require a fallback display string. Note
    that this metric is recorded once per share attempt rather than once per
    user or device, so users who share frequently will contribute more samples.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.NotificationClicked.HasScrollPosition"
    enum="Boolean" expires_after="2027-03-04">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records whether an opened Send Tab To Self notification contained a valid
    scroll position (text fragment). Recorded when the user clicks the
    notification on the receiving device.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.NotificationStatus"
    enum="SendTabToSelfNotificationStatus" expires_after="2027-01-17">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Status of STTS notifications. Recorded whenever a target device is chosen, a
    received notification is shown, or an action is taken on the notification.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.PageContextSize" units="bytes"
    expires_after="2027-03-04">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the serialized size in bytes of the PageContext proto when a user
    sends a tab to themselves. Recorded when the entry is successfully added to
    the SendTabToSelf model on the sending device. This size represents the
    pre-truncation size, before it potentially gets dropped if it exceeds the
    limit.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.ReceivedTabFormFieldMatchOutcome"
    enum="SendTabToSelfFormFieldMatchOutcome" expires_after="2027-05-08">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the outcome of matching a received form field to a field on the page
    (Strict match, Signature match, Exact Type Set match, or No match). Recorded
    on the receiving device when the filler instance is destroyed (either upon
    timeout or navigation/destruction), which avoids timing skew between matches
    and non-matches. Note: if the browser is closed before the filler is
    destroyed, some samples might be lost. Fields that match in signature or
    type but have a different origin are ignored for security reasons and
    recorded as kNoMatch.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.Scroll.Volume{RestorationState}"
    units="pixels" expires_after="2027-03-05">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the total vertical scroll volume (sum of absolute deltas) by the
    user after a Send Tab To Self tab is opened. The volume is recorded when the
    tab is closed or navigated away. {RestorationState} Recorded for Desktop and
    Android. The programmatic scrolling itself (from scroll restoration) is not
    included in the count.
  </summary>
  <token key="RestorationState">
    <variant name=".WithoutRestoration"
        summary="Recorded when scroll restoration was NOT attempted."/>
    <variant name=".WithRestoration"
        summary="Recorded when scroll restoration was attempted."/>
  </token>
</histogram>

<histogram name="Sharing.SendTabToSelf.ScrollPosition.GenerationOutcome"
    enum="SendTabToSelfScrollPositionGenerationOutcome"
    expires_after="2027-02-14">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the outcome of attempting to generate a text fragment for scroll
    position restoration when a user sends a tab to themselves. Recorded when
    the selector generation completes, times out, or fails.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.ScrollPosition.GenerationTime"
    units="ms" expires_after="2027-01-10">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time taken to generate the text fragment selector for scroll
    position restoration when a user sends a tab to themselves. Recorded when
    the selector generation completes, times out, or fails.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.ScrollPosition.SelectorLength"
    units="characters" expires_after="2027-03-04">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the length (in characters) of the generated text fragment selector
    for scroll position restoration when a user sends a tab to themselves.
    Recorded only for successful generations.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.SendResult" enum="SendTabToSelfResult"
    expires_after="2027-06-22">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the result of attempting to send a tab to another device. Recorded
    when the send attempt completes.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.SentEntryPoint"
    enum="SendTabToSelfShareEntryPoint" expires_after="2027-06-01">
  <owner>treib@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the entry point (UI surface) from which Send Tab To Self was invoked
    by the user on the sending device. Logged when the user selects a target
    device and the sending is triggered.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.TargetDeviceCount{ShareEntryPoint}"
    enum="SendTabToSelfDeviceCount" expires_after="2027-06-17">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    The number of target devices when the Send Tab to Self UI is invoked from
    {ShareEntryPoint}. Recorded when the UI is shown (or signed-out promo or no
    target devices promo is shown).
  </summary>
  <token key="ShareEntryPoint">
    <variant name="" summary="any entry point"/>
    <variant name=".ContentMenu" summary="the context menu on a WebContents"/>
    <variant name=".Gesture" summary="a physical gesture"/>
    <variant name=".LinkMenu" summary="the context menu on a link"/>
    <variant name=".OmniboxMenu" summary="the context menu on the Omnibox"/>
    <variant name=".ShareMenu" summary="the Share menu in the 3-dot menu"/>
    <variant name=".ShareSheet" summary="the OS-level Share Sheet"/>
    <variant name=".ShareSheetDirectShare"
        summary="a DirectShare target on the OS-level Share Sheet"/>
    <variant name=".TabMenu"
        summary="the context menu on a tab (in the tab strip or tab switcher)"/>
    <variant name=".ToolbarIcon"
        summary="the icon in the toolbar next to the Omnibox"/>
  </token>
</histogram>

<histogram name="Sharing.SendTabToSelf.TimeOpenedToActivated" units="ms"
    expires_after="2027-06-01">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time from when a tab was opened on the target device to the
    first time it was activated on the target device. An entry is considered
    activated if the corresponding tab became visible to the user on the target
    device, either by the tab being opened in the foreground, or by the user
    manually switching to the tab. Recorded when the entry is activated.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.TimeSentToActivated" units="ms"
    expires_after="2027-06-01">
  <owner>ankushkush@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time from when a tab was shared on the sending device to the
    first time it was activated on the target device. An entry is considered
    activated if the corresponding tab became visible to the user on the target
    device, either by the tab being opened in the foreground, or by the user
    manually switching to the tab. This involves clocks on two different devices
    so the value may be skewed. Recorded when the entry is activated.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.TimeSentToOpened" units="ms"
    expires_after="2027-04-01">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time from when a tab was shared on the sending device to when
    the user opened it on the target device. This involves clocks on two
    different devices so the value may be skewed. Recorded when the entry is
    opened.
  </summary>
</histogram>

<histogram name="Sharing.SendTabToSelf.TimeSentToReceived" units="ms"
    expires_after="2027-04-01">
  <owner>mtatarski@google.com</owner>
  <owner>src/components/sync/OWNERS</owner>
  <summary>
    Records the time from when a tab was shared on the sending device to when it
    was first received by the target device's sync bridge. This involves clocks
    on two different devices so the value may be skewed. Recorded when the entry
    is received.
  </summary>
</histogram>

<histogram name="Sharing.ShareSheetLongScreenshots.BitmapGeneratorStatus"
    enum="SharingShareSheetLongScreenshotsBitmapGenerationStatus"
    expires_after="2027-02-07">
  <owner>jhimawan@google.com</owner>
  <owner>src/components/paint_preview/OWNERS</owner>
  <summary>
    Records the status of the Bitmap Generator when capturing long screenshot
    from the share sheet (3-dot menu path). Recorded when the capture completes
    or fails due to insufficient memory or other errors. Android only.
  </summary>
</histogram>

<histogram name="Sharing.SharingHubAndroid.CustomAction"
    enum="ShareCustomAction" expires_after="2027-01-17">
  <owner>wenyufu@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the custom action when the user clicked one on the share sheet.
    Recorded for both Chrome's sharing hub and Android's share sheet on U+.
  </summary>
</histogram>

<histogram name="Sharing.SharingHubAndroid.Opened" enum="ShareOrigin"
    expires_after="2027-01-17">
  <owner>wenyufu@chromium.org</owner>
  <owner>sophey@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the origin of the share that opened the sharing hub. Recorded when
    the sharing hub is opened.
  </summary>
</histogram>

<histogram name="Sharing.SharingHubAndroid.ThirdPartyAppUsage"
    enum="SharingHubBottomRowIndex" expires_after="2024-07-08">
  <owner>wenyufu@chromium.org</owner>
  <owner>sophey@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the index of the third party app selected from the bottom row of the
    sharing hub.
  </summary>
</histogram>

<histogram name="Sharing.SharingHubAndroid.TimeToCustomAction" units="ms"
    expires_after="2027-01-17">
  <owner>wenyufu@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the amount of time taken for the user to select a custom action
    after initiating a share. Can record multiple times if the custom action
    redirect the user back to the share sheet, but each time only record the
    duration between share sheet shown until user click an action. Recorded for
    both Chrome's sharing hub and Android's share sheet on U+.
  </summary>
</histogram>

<histogram name="Sharing.SharingHubAndroid.TimeToShowShareSheet" units="ms"
    expires_after="2025-02-23">
  <owner>wenyufu@chromium.org</owner>
  <owner>sophey@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records the amount of time taken for the custom share sheet to open after a
    share was initiated.
  </summary>
</histogram>

<histogram name="Sharing.SharingHubAndroid.{DetailedContentType}.{ShareStatus}"
    enum="LinkToggleState" expires_after="2024-07-08">
  <owner>wenyufu@chromium.org</owner>
  <owner>sophey@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    Records what the link toggle state is when a share of a
    {DetailedContentType} is {ShareStatus}.
  </summary>
  <token key="DetailedContentType">
    <variant name="Gif"/>
    <variant name="HighlightedText"/>
    <variant name="Image"/>
    <variant name="LightweightReaction"/>
    <variant name="NotSpecified"/>
    <variant name="Screenshot"/>
    <variant name="Webnotes"/>
  </token>
  <token key="ShareStatus">
    <variant name="Completed"/>
    <variant name="InProgress"/>
  </token>
</histogram>

<histogram name="Sharing.SmsFetcherAvailableDeviceCount" units="devices"
    expires_after="2027-03-06">
  <owner>yigu@chromium.org</owner>
  <owner>src/content/browser/sms/OWNERS</owner>
  <summary>
    The number of available devices when making a request on desktop which is
    triggered by calling the WebOTP API. This is logged once per API call.
    Desktop only.
  </summary>
</histogram>

<histogram name="Sharing.SmsFetcherScreenOnAndUnlocked" enum="Boolean"
    expires_after="2026-12-20">
  <owner>yigu@chromium.org</owner>
  <owner>src/content/browser/sms/OWNERS</owner>
  <summary>
    Records whether the phone is on and unlocked when we show the notification
    to users. False if either the phone is locked or the phone does not have a
    screen lock but the screen is off. This is logged once per notification.
  </summary>
</histogram>

<histogram name="Sharing.WebRtc.IceConfigFetched" units="ice_servers"
    expires_after="2022-04-03">
  <owner>peter@chromium.org</owner>
  <owner>knollr@chromium.org</owner>
  <summary>
    Number of ice servers fetched by network traversal API call. Logged after
    receiving response of API call.
  </summary>
</histogram>

<histogram name="Sharing.{ShareSurface}.ShareContentType"
    enum="SharingContentTypeAndroid" expires_after="2027-01-17">
  <owner>wenyufu@chromium.org</owner>
  <owner>src/chrome/browser/share/OWNERS</owner>
  <summary>
    The content type being shared when using a share sheet. Recorded when share
    is sent to share sheet for {ShareSurface}. Android only.
  </summary>
  <token key="ShareSurface">
    <variant name="DefaultSharesheetAndroid" summary="System share sheet"/>
    <variant name="SharingHubAndroid" summary="Chrome's sharing hub"/>
  </token>
</histogram>

<histogram name="TextFragmentAnchor.LinkOpenSource"
    enum="TextFragmentLinkOpenSource" expires_after="2027-03-07">
  <owner>jeffreycohen@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Warning: This histogram was expired from 2024-09-29 to 2026-03-11; data may
    be missing or incomplete for this period.

    Recorded for every navigation to a link with a valid text fragment selector
    (e.g. #:=:text=SELECTOR). Indicates source type that navigation originated
    from. It only know about search engines that come from the pre-populated
    list installed with Chrome. If the user uses a search engine not on the
    list, it will be recorded as Unknown. This is even true if the user have a
    custom search engine. These custom search engines can be created by hand or
    auto-generated. In either case, it's not going to count as a search engine.
    Also, it only checks to see if the *referrer* is from a domain associated
    with search engine. If someone posts a link somewhere on a web site that
    happens to have a search engine known to Google and that links includes the
    fragment tokens, then if a user clicks that link, it'll look like it came
    from a search engine even thought they did not.
  </summary>
</histogram>

<histogram name="TextFragmentAnchor{TextFragmentSource}.AmbiguousMatch"
    enum="Boolean" expires_after="2027-03-07">
  <owner>bokan@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Warning: This histogram was expired from 2024-06-30 to 2026-03-11; data may
    be missing or incomplete for this period.

    Whether we found multiple matches for a selector. Recorded when
    TextFragmentAnchor finishes searching once the page is loaded.

    Recorded from text fragment links followed from {TextFragmentSource}.
  </summary>
  <token key="TextFragmentSource" variants="TextFragmentSource"/>
</histogram>

<histogram name="TextFragmentAnchor{TextFragmentSource}.MatchRate" units="%"
    expires_after="2027-03-07">
  <owner>bokan@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Warning: This histogram was expired from 2024-06-30 to 2026-03-11; data may
    be missing or incomplete for this period.

    The percentage of selectors for which a match was found in the document.
    Recorded when TextFragmentAnchor finishes searching once the page is loaded.

    Recorded from text fragment links followed from {TextFragmentSource}.
  </summary>
  <token key="TextFragmentSource" variants="TextFragmentSource"/>
</histogram>

<histogram name="TextFragmentAnchor{TextFragmentSource}.TimeToScrollIntoView"
    units="ms" expires_after="2027-03-07">
  <owner>bokan@chromium.org</owner>
  <owner>chrome-shared-highlighting@google.com</owner>
  <summary>
    Warning: This histogram was expired from 2024-06-30 to 2026-03-11; data may
    be missing or incomplete for this period.

    The time between creating the TextFragmentAnchor (i.e. when it is parsed)
    and scrolling the target into view. Only recorded if there is a match and we
    tried to scroll it into view (it may already have been in view). Recorded
    when TextFragmentAnchor finishes searching once the page is loaded.

    Recorded from text fragment links followed from {TextFragmentSource}.
  </summary>
  <token key="TextFragmentSource" variants="TextFragmentSource"/>
</histogram>

</histograms>

</histogram-configuration>
