<!--
Copyright 2025 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_extraction 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>

<histogram name="ContextualTasks.ActiveTab.UserAction.LinkClicked"
    enum="Boolean" expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a user clicks on a link embedded in the active tab shown
    alongside the contextual tasks panel. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.ActiveTasksCount" units="count"
    expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the number of active tasks (tasks that are open in a full tab or in
    the side panel). This is recorded every time a task is created on the local
    device.
  </summary>
</histogram>

<histogram name="ContextualTasks.AiPage.NavigationInterceptionSource"
    enum="ContextualTasksEntrypointSource" expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a navigation to an AI page is intercepted in the
    contextual tasks framework. Records the source of the initial entrypoint.
  </summary>
</histogram>

<histogram
    name="ContextualTasks.AiResponse.UserAction.LinkClicked.{ContextualTasksUiSurface}"
    enum="Boolean" expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a user clicks on a link embedded in the AI response on
    the contextual tasks page. Split out by the contextual tasks form factor
    (panel or tab) that the link was clicked on.Always recorded as true.
  </summary>
  <token key="ContextualTasksUiSurface">
    <variant name="Panel"
        summary="The link was clicked when the contextual tasks panel was
                 open."/>
    <variant name="Tab"
        summary="The link was clicked when the contextual tasks UI was
                 displayed in full tab."/>
  </token>
</histogram>

<histogram
    name="ContextualTasks.BackButton.UserAction.NavigatedFromSidePanelToFullTab"
    enum="Boolean" expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a user navigates from side panel to full tab using the
    back button in the browser. Always recorded as true.
  </summary>
</histogram>

<histogram
    name="ContextualTasks.Composebox.UserAction.AddedActiveTabAfterDeletingAutoSuggestion"
    enum="Boolean" expires_after="2027-02-07">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a user explicitly adds the active tab after previously
    deleting the auto-suggestion. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.Composebox.UserAction.LensButtonClicked"
    enum="Boolean" expires_after="2027-06-18">
  <owner>nguyenbryan@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when the user clicks the Lens button inside the contextual tasks
    composebox. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.CandidateTabHasEmbeddings"
    enum="Boolean" expires_after="2027-02-07">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded for each candidate tab when retrieving tab signals during
    Contextual Tasks context calculation. Records whether the candidate tab has
    embeddings.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.ContextCalculationLatency" units="ms"
    expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is made in the contextual tasks framework and
    context was calculated successfully. Records the duration it took to
    calculate context for the query.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.ContextDeterminationStatus"
    enum="ContextualTasksContextDeterminationStatus" expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is entered by the user (before being sent) in
    the contextual tasks framework. Records the status of context determination
    (success or failure reason).
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.DurationSinceLastActive"
    units="seconds" expires_after="2027-01-24">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks.
    Records seconds (upto 3600) since each of the tab was active.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.EmbeddingSimilarityScore"
    units="count" expires_after="2027-01-24">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks.
    Records 100*best_similarity_score between query embeddings and passage
    embeddings for the page.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.ExplicitTabsCount" units="count"
    expires_after="2027-01-24">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework and context was calculated successfully. Records the number of
    tabs that were explicitly chosen to be uploaded by the user. Note that tabs
    with the same URL are only counted once.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.MatchingWordsCount" units="count"
    expires_after="2027-01-24">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework and context was calculated successfully. Records the number of
    words that were in common between the query and the tab title.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.QueryEmbeddingLatency" units="ms"
    expires_after="2026-12-27">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is made in the contextual tasks framework.
    Records the duration it took to calculate the query embedding.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.RelevantTabsCount" units="count"
    expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework and context was calculated successfully. Records the number of
    tabs that were determined to be relevant to the query.
  </summary>
</histogram>

<histogram
    name="ContextualTasks.Context.SiteExclusions.ActiveTab.ExclusionsChecked"
    units="count" expires_after="2026-09-17">
  <owner>orinj@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a query is made and the active tab eligibility
    determined. Records the number of site exclusions checked to determine
    eligibility of active tab.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.SiteExclusions.ActiveTab.Filtered"
    enum="Boolean" expires_after="2026-09-17">
  <owner>orinj@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a query is made and the active tab eligibility
    determined. Records whether the active tab was filtered by site exclusions.
  </summary>
</histogram>

<histogram
    name="ContextualTasks.Context.SiteExclusions.AllTabs.CheckingDuration"
    units="ms" expires_after="2026-09-17">
  <owner>orinj@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when eligibility is determined for all tabs. Records the number of
    milliseconds spent on site exclusion checking/filtering for all tabs.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.SiteExclusions.AllTabs.TabsChecked"
    units="count" expires_after="2026-09-17">
  <owner>orinj@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when eligibility is determined for all tabs. Records the number of
    tabs checked for site exclusions.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.SiteExclusions.AllTabs.TabsFiltered"
    units="count" expires_after="2026-09-17">
  <owner>orinj@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when eligibility is determined for all tabs. Records the number of
    tabs filtered out by site exclusions.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.TabExcessCount" units="count"
    expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework and context was calculated successfully. Records the number of
    tabs with unique URLs that were predicted by the model but were not in the
    explicitly chosen set.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.TabOverlapCount" units="count"
    expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework and context was calculated successfully. Records the number of
    tabs with unique URLsthat were in both the explicitly chosen set and the set
    that was predicted by the model.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.TabOverlapPercentage" units="%"
    expires_after="2027-01-17">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework and context was calculated successfully. Records the percentage of
    tabs with unique URLs that were in both the explicitly chosen set and the
    set that was predicted by the model. This is calculated by dividing the
    number of tabs that were in both sets by the number of tabs in the
    explicitly chosen set.
  </summary>
</histogram>

<histogram name="ContextualTasks.Context.TabScore" units="count"
    expires_after="2027-01-24">
  <owner>sophiechang@chromium.org</owner>
  <owner>abhayprakash@google.com</owner>
  <summary>
    Recorded every time a query is successfully made in the contextual tasks
    framework when using multi-signal scoring. Records the final computed score
    for each tab, multiplied by 100.
  </summary>
</histogram>

<histogram name="ContextualTasks.EphemeralToolbarButton.Shown" enum="Boolean"
    expires_after="2027-01-03">
  <owner>dianaou@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time the ephemeral (unpinned) contextual tasks toolbar button
    becomes visible in the browser toolbar. This occurs when an eligible
    contextual task is active or suggested and the toolbar button transitions
    from hidden to shown. Always recorded as true.
  </summary>
</histogram>

<histogram
    name="ContextualTasks.HistoryNavigation.UserAction.NavigatedInFullTab"
    enum="Boolean" expires_after="2026-12-22">
  <owner>hujasonx@google.com</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Logged when the back or forward button is clicked while the user is viewing
    the Contextual Tasks full tab, causing a task switch. Always recorded as
    true.
  </summary>
</histogram>

<histogram name="ContextualTasks.InnerFrameContents.HttpResponseCode"
    enum="HttpResponseCode" expires_after="2027-01-17">
  <owner>juanmojica@google.com</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time the contextual tasks framework navigates the top level
    of the inner frame contents. Records the HTTP status code of the response
    when the navigation finishes.
  </summary>
</histogram>

<histogram
    name="ContextualTasks.InnerFrameContents.HttpResponseCode.ExcludeZeroStateLoads"
    enum="HttpResponseCode" expires_after="2027-01-17">
  <owner>juanmojica@google.com</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time the contextual tasks framework navigates the top level
    of the inner frame contents, excluding zero state loads. Records the HTTP
    status code of the response when the navigation finishes.
  </summary>
</histogram>

<histogram name="ContextualTasks.OAuth.Latency.{OAuthTrigger}" units="ms"
    expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the total time taken to fetch the OAuth access token for Contextual
    Tasks, including any retries due to transient errors. Recorded when the
    fetch process finally completes (either success or persistent failure).
    Slices: {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.OAuth.Start.{OAuthTrigger}" enum="Boolean"
    expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records initiations of the OAuth access token fetch process for Contextual
    Tasks. Recorded when the fetch process begins, before any network requests
    are made, regardless if the token is cached. Slices: {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.OAuth.StartToCommitLatency" units="ms"
    expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the latency between the WebUI app constructor being called and the
    first top-level load commit event of the hosted webview. This represents the
    time from the WebUI being ready, and the top level AIM navigation actually
    happening. Recorded once per WebUI initialization when the webview commits
    its first top-level load.
  </summary>
</histogram>

<histogram name="ContextualTasks.OAuth.Success.{OAuthTrigger}" enum="Boolean"
    expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records whether the OAuth access token fetch for Contextual Tasks completed
    successfully. Recorded when the fetch process finally completes, meaning no
    more retries either due to a success or a persistent error. Slices:
    {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.OAuth.TriesCount.{OAuthTrigger}" units="count"
    expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the number of attempts (tries) required to complete the OAuth access
    token fetch for Contextual Tasks. This includes transient error retries. A
    value of 1 means it succeeded (or failed persistently) on the first try.
    Recorded when the fetch process finally completes. Slices: {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.OAuth.TriesCountBeforeFailure.{OAuthTrigger}"
    units="count" expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the number of attempts (tries) before the OAuth access token fetch
    for Contextual Tasks ultimately failed. This includes transient error
    retries. A value of 1 means it failed persistently on the first try.
    Recorded when the fetch process finally completes with a persistent failure.
    Slices: {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.OAuth.TriesCountBeforeSuccess.{OAuthTrigger}"
    units="count" expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the number of attempts (tries) required to successfully complete the
    OAuth access token fetch for Contextual Tasks. This includes transient error
    retries. A value of 1 means it succeeded on the first try. Recorded when the
    fetch process finally completes successfully. Slices: {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.OAuth.WasCached.{OAuthTrigger}" enum="Boolean"
    expires_after="2026-12-31">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records whether the successfully fetched OAuth access token was served from
    the local cache. This is determined by a heuristic where a response time of
    less than 50ms is classified as a cache hit. Recorded only upon successful
    token retrieval. Slices: {OAuthTrigger}
  </summary>
  <token key="OAuthTrigger">
    <variant name="AimNavigation"
        summary="OAuth token fetches triggered early by top-level AIM
                 navigation intercept"/>
    <variant name="All" summary="all OAuth token fetches"/>
  </token>
</histogram>

<histogram name="ContextualTasks.Session.Completed" enum="Boolean"
    expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a cobrowsing session has completed in the contextual
    tasks framework. This can happen if the side panel is explicitly closed by
    the user, the window housing the side panel is closed, or the Chrome session
    has ended. Note that a cobrowsing session is only considered to have started
    if a user enters a query via the side panel. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.Session.Duration.AioToCobr" units="ms"
    expires_after="2027-01-03">
  <owner>juanmojica@google.com</owner>
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when a cobrowsing session opened via AIO2Cobr (AI Overviews to
    CoBrowse) flows is closed or ended. Measures the time elapsed from when the
    cobrowse panel was opened until it was closed.
  </summary>
</histogram>

<histogram name="ContextualTasks.SidePanel.UserAction.Close.AiModeLinkClick"
    enum="Boolean" expires_after="2027-06-18">
  <owner>nguyenbryan@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when the user clicks the side panel close button, for sessions that
    were entered due to a link click from AI mode. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.SidePanel.UserAction.Close.AioToCobr"
    enum="Boolean" expires_after="2027-06-18">
  <owner>juanmojica@google.com</owner>
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when the user clicks the side panel close button, for sessions that
    were entered via AIO2Cobr (AI Overviews to CoBrowse) flows. Always recorded
    as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.SidePanel.UserAction.Close.LensOverlay"
    enum="Boolean" expires_after="2027-06-18">
  <owner>nguyenbryan@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when the user clicks the side panel close button, for sessions that
    were entered via the Lens Overlay. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.SidePanel.UserAction.Close.Other"
    enum="Boolean" expires_after="2027-06-18">
  <owner>nguyenbryan@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when the user clicks the side panel close button, for sessions
    where the entry point was not recorded as another histogram. Always recorded
    as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.Tab.ClosedWithSidePanelOpenState"
    enum="ContextualTasksTabCloseState" expires_after="2027-06-18">
  <owner>nguyenbryan@google.com</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when a user closes a content tab that had an associated contextual
    task and had the side panel open (either currently active, or logically open
    before the tab was backgrounded). The value indicates whether the closed tab
    was the active tab or a background tab.
  </summary>
</histogram>

<histogram name="ContextualTasks.TabAffiliationCount" units="count"
    expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>nyquist@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a tab is affiliated with a task. Records the number of
    tabs that are affiliated with the task that has the new affilation.
  </summary>
</histogram>

<histogram name="ContextualTasks.TabChange.UserAction{ActionType}"
    enum="Boolean" expires_after="2027-02-07">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time a tab change occurs and affects the contextual tasks
    panel state. {ActionType} Always recorded as true.
  </summary>
  <token key="ActionType">
    <variant name=".ChangedThreads"
        summary="The user changed tabs which resulted in the side panel
                 changing threads."/>
    <variant name=".CloseSidePanel"
        summary="The user changed tabs which resulted in the side panel
                 closing."/>
    <variant name=".OpenSidePanel"
        summary="The user changed tabs which resulted in the side panel
                 opening."/>
    <variant name=".StayedOnThread"
        summary="The user changed tabs which resulted in staying on the
                 existing thread."/>
  </token>
</histogram>

<histogram
    name="ContextualTasks.ToolbarCloseTabButton.UserAction.CloseTabAndExpandSidePanel"
    enum="Boolean" expires_after="2027-06-18">
  <owner>yuhengh@chromium.org</owner>
  <owner>nguyenbryan@google.com</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded when the user interacts with the contextual tasks toolbar close tab
    button. Always recorded as true.
  </summary>
</histogram>

<histogram name="ContextualTasks.VoiceSearch.StateV2" enum="VoiceSearchState"
    expires_after="2027-01-10">
  <owner>jamesleung@google.com</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Tracks user interactions with the voice search feature on the Contextual
    Tasks composebox.
  </summary>
</histogram>

<histogram name="ContextualTasks.WebUI.OAuthError"
    units="GoogleServiceAuthError" expires_after="2027-01-24">
  <owner>mercerd@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Records the OAuth error when a token is requested for use in the embedded
    page of the WebUI. &quot;None&quot; indicates that the request was
    successful.
  </summary>
</histogram>

<histogram name="ContextualTasks.WebUI.UserAction{ActionType}" enum="Boolean"
    expires_after="2027-01-03">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time the user interacted with the contextual tasks web UI
    directly. {ActionType} Always recorded as true.
  </summary>
  <token key="ActionType">
    <variant name=".CloseSidePanel" summary="The user closed the side panel."/>
    <variant name=".OpenFeedback" summary="The user opened the feedback page."/>
    <variant name=".OpenHelp" summary="The user opened the help page."/>
    <variant name=".OpenInNewTab"
        summary="The user opened the task in a new tab."/>
    <variant name=".OpenMyActivity"
        summary="The user opened the My Activity page."/>
    <variant name=".OpenNewThread" summary="The user opened a new thread."/>
    <variant name=".OpenOverflowMenu"
        summary="The user opened the overflow menu."/>
    <variant name=".OpenSourcesMenu"
        summary="The user opened the sources menu."/>
    <variant name=".OpenThreadHistory"
        summary="The user opened the thread history."/>
    <variant name=".PinSidePanel" summary="The user pinned the side panel."/>
    <variant name=".TabFromSourcesMenuClicked"
        summary="The user clicked on a tab from the sources menu."/>
    <variant name=".UnpinSidePanel"
        summary="The user unpinned the side panel."/>
  </token>
</histogram>

<histogram name="ContextualTasks.{EntrypointType}.UserAction{ActionType}"
    enum="Boolean" expires_after="2027-02-07">
  <owner>sophiechang@chromium.org</owner>
  <owner>chrome-contextual-tasks-eng@google.com</owner>
  <summary>
    Recorded every time the user clicks on {EntrypointType} in the Chrome
    toolbar to toggle the Contextual Tasks side panel state. {ActionType} Always
    recorded as true.
  </summary>
  <token key="ActionType">
    <variant name=".CloseSidePanel"
        summary="Recorded when clicking the button closes the side panel."/>
    <variant name=".OpenSidePanel"
        summary="Recorded when clicking the button opens the side panel."/>
  </token>
  <token key="EntrypointType">
    <variant name="EphemeralToolbarButton"
        summary="the ephemeral (unpinned) contextual tasks toolbar button"/>
    <variant name="PermanentToolbarButton"
        summary="the permanently pinned contextual tasks toolbar button"/>
    <variant name="ToolbarButton"
        summary="any contextual tasks toolbar button"/>
  </token>
</histogram>

</histograms>

</histogram-configuration>
