<!--
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 describes the enumerations referenced by entries in histograms.xml for
this directory. Some enums may instead be listed in the central enums.xml file
at src/tools/metrics/histograms/enums.xml when multiple files use them.

For best practices on writing enumerations descriptions, see
https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#Enum-Histograms

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>

<!-- Enum types -->

<enums>

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

<enum name="ContextualCueingDecision">
  <int value="0" label="Unknown"/>
  <int value="1" label="No Longer Active Tab After Category Classification">
    Tab was not active when the category classification for the page was
    completed.
  </int>
  <int value="2" label="Failed Category Classification">
    Tab was active but the page was not classified as a category we support.
  </int>
  <int value="3" label="Model execution not available">
    Tab was active and the page was classified as a category we support, but the
    model execution was not available.
  </int>
  <int value="4" label="Model execution failed">
    Tab was active and the page was classified as a category we support, but the
    model execution failed.
  </int>
  <int value="5"
      label="Model execution succeeded but response was not parseable">
    Tab was active and the page was classified as a category we support, and the
    model execution succeeded but the response was not parseable.
  </int>
  <int value="6"
      label="Model execution succeeded and cue was successfully generated">
    Tab was active and the page was classified as a category we support, and the
    model execution succeeded and the cue was successfully generated.
  </int>
  <int value="7" label="Cue not shown: missing anchored message text">
    Model response was missing fields needed to show an anchored message.
  </int>
  <int value="8" label="Cue not shown: unknown target surface">
    Model response was for an unknown cue type.
  </int>
  <int value="9" label="Cue not shown: target surface not registered">
    Model response was for a known cue type, but the surface was not registered
    with ContextualCueingController.
  </int>
  <int value="10" label="Cue not shown: ineligible">
    Model response was for a registered cue type, but that feature reported
    IsEligible()=false.
  </int>
  <int value="11" label="Cue not shown: no active tab">
    Cue could not be shown because the browser window had no active tab.
  </int>
  <int value="12" label="Cue not shown: page actions not enabled">
    Cue could not be shown because the page actions framework was not enabled
    (feature flag PageActionsMigration).
  </int>
  <int value="13"
      label="Cue not shown: no longer active tab after model execution">
    Cue could not be shown because the tab for the cue was no longer active.
  </int>
  <int value="14" label="Cue not generated / shown: feature promo active">
    Cue could not be generated or shown because there was a feature promo
    active.
  </int>
  <int value="15" label="Cue not generated / shown: history sync off">
    Cue could not be generated or shown because history sync is off.
  </int>
  <int value="16" label="Cue not shown: not enough page loads since last cue">
    Cue could not be shown because not enough page loads have occurred since the
    last cue was shown.
  </int>
  <int value="17" label="Cue not shown: not enough time since last cue">
    Cue could not be shown because not enough time has passed since the last cue
    was shown.
  </int>
  <int value="18" label="Cue not shown: too many cues shown to the user">
    Cue could not be shown because too many cues were shown to the user
    recently.
  </int>
  <int value="19"
      label="Cue not shown: too many cues shown to the user for origin">
    Cue could not be shown because too many cues were shown to the user for this
    specific origin recently.
  </int>
  <int value="20" label="Cue not shown: ineligible URL">
    Cue could not be shown because the URL is ineligible.
  </int>
  <int value="21" label="Cue not shown: not enough time since last dismissal">
    Cue could not be shown because not enough time has passed since the last
    dismissal.
  </int>
  <int value="22" label="Cue not shown: side panel showing">
    Cue could not be shown because the side panel was showing.
  </int>
  <int value="23" label="Cue not shown: no eligible cue surfaces">
    Cue could not be shown because there were no eligible cue surfaces.
  </int>
  <int value="24" label="Cue not shown: infobar visible">
    Cue could not be shown because an infobar was visible.
  </int>
  <int value="25" label="Cue not shown: user opted out">
    Cue could not be shown because the user has opted out.
  </int>
  <int value="26" label="Cue not shown: disabled by enterprise policy">
    Cue could not be shown because it is disabled by enterprise policy.
  </int>
  <int value="27" label="Cue not shown: age restriction enforced">
    Cue could not be shown because the user is subject to age restrictions.
  </int>
  <int value="28" label="Cue not shown: no cues returned">
    Model response was successful but returned no cues.
  </int>
  <int value="29" label="Cue not shown: not enough time since last click">
    Cue could not be shown because not enough time has passed since the last
    click.
  </int>
  <int value="30" label="Cue not shown: anchored message already showing">
    Cue could not be shown because another anchored message is already showing.
  </int>
  <int value="31" label="Cue not shown: tab in split view">
    Cue could not be shown because the tab is being shown in split view.
  </int>
  <int value="32" label="Cue not shown: WebContents destroyed">
    Cue could not be shown because WebContents was destroyed during async
    eligibility check.
  </int>
  <int value="33"
      label="Cue not shown: tab navigated away or inactive after eligibility
             check">
    Cue could not be shown because the tab navigated away or became inactive
    during async eligibility check.
  </int>
</enum>

<!-- LINT.ThenChange(//components/contextual_cueing/contextual_cueing_enums.h:ContextualCueingDecision) -->

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

<enum name="ContextualCueingInteraction">
  <int value="0" label="Clicked">The user clicked on the cue.</int>
  <int value="1" label="Dismissed">
    The user clicked into the menu and dismissed the cue.
  </int>
  <int value="2" label="EditPrompt">
    The user clicked into the menu and clicked the edit prompt option.
  </int>
  <int value="3" label="SuggestionsSettings">
    The user clicked into the menu and clicked the suggestions settings option.
  </int>
</enum>

<!-- LINT.ThenChange(//components/contextual_cueing/contextual_cueing_enums.h:ContextualCueingInteraction) -->

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

<enum name="ContextualCueingNudgeDecision">
  <int value="0" label="Unknown"/>
  <int value="1" label="Success">
    Success in determining a nudge for the page. It is not guaranteed that the
    nudge was shown to the user.
  </int>
  <int value="2" label="Server data unavailable">
    The server did not have data for this page.
  </int>
  <int value="3" label="Server data malformed">
    The server had data for the page but it was malformed.
  </int>
  <int value="4" label="Client conditions unmet">
    The server had data for the page but the client conditions to show the nudge
    were unmet.
  </int>
  <int value="5" label="Not enough page loads since last nudge">
    The page was eligible for the nudge, but not enough page loads have been
    navigated to since the last nudge shown to the user.
  </int>
  <int value="6" label="Not enough time has elapsed since last nudge dismissal">
    The page was eligible for the nudge, but not enough time has elapsed since
    the last nudge shown to the user after an explicit dismissal.
  </int>
  <int value="7" label="Too many nudges shown to the user">
    The page was eligible for the nudge, but too many nudges have been shown to
    the user recently.
  </int>
  <int value="8" label="Too many nudges shown to the user, for the domain">
    The page was eligible for the nudge, but too many nudges have been shown to
    the user recently for the domain.
  </int>
  <int value="9" label="The Nudge was not shown as IPH was alraedy being Shown">
    The page was eligible for the nudge, but the user was currently being
    presented the IPH.
  </int>
  <int value="10"
      label="The nudge was not shown as the user already has the feature
             window open">
    The page was eligible for the nudge, but the user already has the feature
    window open.
  </int>
  <int value="11"
      label="User closes the tab/window as a nudge decision is being computed">
    User closes the tab/window as a nudge decision is being computed.
  </int>
  <int value="12"
      label="Not enough time has elapsed since last time nudge was shown">
    The page was eligible for the nudge, but not enough time has elapsed since
    the last nudge shown to the user.
  </int>
  <int value="13"
      label="The nudge was not shown as the user has another window level call
             to action UI shown in this window.">
    The page was eligible for the nudge, but the user already has a window modal
    UI showing.
  </int>
  <int value="14"
      label="The nudge was not shown as the user already has the feature side
             panel open in the tab">
    The page was eligible for the nudge, but the user already has the feature
    side panel open in the tab.
  </int>
  <int value="15"
      label="The nudge was not shown as the browser actor was active on the
             tab">
    The page was eligible for the nudge, but the browser actor is currently
    active on the tab.
  </int>
  <int value="16"
      label="The nudge was not shown as the contextual tasks side panel was
             open for the tab">
    The page was eligible for the nudge, but the contextual tasks side panel was
    open for the tab.
  </int>
  <int value="17"
      label="The nudge was not shown as the contextual cueing v2 is enabled">
    The page was eligible for the nudge, but the contextual cueing v2 is
    enabled.
  </int>
</enum>

<!-- LINT.ThenChange(//chrome/browser/glic/suggestions/contextual_cueing_enums.h:NudgeDecision) -->

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

<enum name="ContextualCueingNudgeInteraction">
  <int value="0" label="Unknown"/>
  <int value="1" label="Shown">
    The server sent data and we successfully showed the nudge.
  </int>
  <int value="2" label="Not Shown due to wrong webcontents">
    The server sent data, but for a different web contents so we did not nudge.
  </int>
  <int value="3" label="Clicked">The user clicked on a shown nudge.</int>
  <int value="4" label="Dismissed">
    The user dismissed the nudge with the close button.
  </int>
  <int value="5" label="Closed via new tab">
    The nudge was dismissed by the tab changing.
  </int>
  <int value="6" label="Closed via new navigation">
    The nudge was dismissed by the navigation changing.
  </int>
  <int value="7" label="Not Shown due to existing call to action in window">
    The server sent data, but another window level call to action UI was already
    shown.&quot;&gt;
  </int>
  <int value="8" label="Closed due to contextual tasks side panel opening">
    The nudge was dismissed by the contextual tasks side panel opening.
  </int>
  <int value="9" label="Closed due to omnibox context menu interaction">
    The nudge was dismissed by an interaction with the context menu in the
    omnibox.
  </int>
</enum>

<!-- LINT.ThenChange(//chrome/browser/glic/suggestions/contextual_cueing_enums.h:NudgeInteraction) -->

<enum name="ContextualCueingZeroStateSuggestionsPageContextIneligibilityType">
  <int value="0" label="None"/>
  <int value="1" label="Optimization Metadata">
    The optimization metadata returned for the page (or all pages, if a pinned
    tabs request) deemed the request ineligible.
  </int>
  <int value="2" label="Page context">
    The page context fetched for the page (or all pages, if a pinned tabs
    request) was invalid.
  </int>
</enum>

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

<enum name="CueFormFactor">
  <int value="0" label="Icon">The page action icon form factor.</int>
  <int value="1" label="Chip">The page action chip form factor.</int>
  <int value="2" label="AnchoredMessage">
    The page action anchored message form factor.
  </int>
</enum>

<!-- LINT.ThenChange(//components/contextual_cueing/contextual_cueing_enums.h:CueFormFactor) -->

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

<enum name="CueTargetType">
  <int value="0" label="Glic"/>
  <int value="1" label="Test Source"/>
  <int value="2" label="Indigo"/>
</enum>

<!-- LINT.ThenChange(//chrome/browser/contextual_cueing/cue_target.h:CueTargetType) -->

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

<enum name="GlicAutoOpenResult">
  <int value="0" label="Success"/>
  <int value="1" label="Prevented From Split View"/>
  <int value="2" label="Prevented From Vertical Tabs"/>
  <int value="3" label="Prevented From Existing Side Panel Open"/>
  <int value="4" label="Failed with unknown reason"/>
  <int value="5" label="Prevented From Window Too Narrow"/>
  <int value="6" label="Prevented From Button Not Visible"/>
  <int value="7" label="Prevented From PDF Page Count Below Threshold"/>
  <int value="8" label="Prevented From Cooldown"/>
</enum>

<!-- LINT.ThenChange(//chrome/browser/glic/suggestions/contextual_cueing_enums.h:GlicAutoOpenResult) -->

</enums>

</histogram-configuration>
