chromium/tools/metrics/histograms/metadata/tab/enums.xml

<!--
Copyright 2023 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
[email protected].
-->

<histogram-configuration>

<!-- Enum types -->

<enums>

<enum name="BooleanFocusedTab">
  <int value="0" label="Not Focused"/>
  <int value="1" label="Focused"/>
</enum>

<enum name="BooleanHasTitle">
  <int value="0" label="Empty title"/>
  <int value="1" label="Non-empty title"/>
</enum>

<enum name="BooleanOverlap">
  <int value="0" label="No overlap"/>
  <int value="1" label="Overlapped"/>
</enum>

<enum name="BooleanProtectedTab">
  <int value="0" label="Not Protected"/>
  <int value="1" label="Protected"/>
</enum>

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

<enum name="DeviceType">
  <int value="0" label="Unknown"/>
  <int value="1" label="Local"/>
  <int value="2" label="Windows"/>
  <int value="3" label="Mac"/>
  <int value="4" label="Linux"/>
  <int value="5" label="Chrome OS"/>
  <int value="6" label="Android Phone"/>
  <int value="7" label="Android Tablet"/>
  <int value="8" label="IOS Phone"/>
  <int value="9" label="IOS Tablet"/>
</enum>

<!-- LINT.ThenChange(//components/saved_tab_groups/tab_group_sync_metrics_logger.h:DeviceType) -->

<enum name="ExternalLauncherOption">
  <int value="0" label="Cancel"/>
  <int value="1" label="Open"/>
</enum>

<enum name="FileStorageRequestType">
  <int value="0" label="Save Request"/>
  <int value="1" label="Restore Request"/>
  <int value="2" label="Delete Request"/>
</enum>

<enum name="FoundBuyableProductAnnotation">
  <summary>
    Whether a buyable product annotation was found in the response from an
    endpoint which provides page metadata in ShoppingPersistedTabData.
  </summary>
  <int value="0" label="NotFound"/>
  <int value="1" label="Found"/>
</enum>

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

<enum name="GroupCloseReason">
  <int value="0" label="Unknown"/>
  <int value="1" label="Closed by user"/>
  <int value="2" label="Deleted by user"/>
  <int value="3" label="Deleted from sync"/>
  <int value="4" label="Cleaned up on startup"/>
  <int value="5" label="Cleaned up on last instance closure"/>
</enum>

<!-- LINT.ThenChange(//components/saved_tab_groups/types.h:ClosingSource) -->

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

<enum name="GroupOpenReason">
  <int value="0" label="Unknown"/>
  <int value="1" label="Opened from revisit UI"/>
  <int value="2" label="Auto-opened from sync"/>
  <int value="3" label="Opened from Tab or Session Restore"/>
</enum>

<!-- LINT.ThenChange(//components/saved_tab_groups/types.h:OpeningSource) -->

<enum name="HistoricalSaverCloseType">
  <int value="0" label="Tab"/>
  <int value="1" label="Group"/>
  <int value="2" label="Bulk"/>
</enum>

<enum name="IOSAllOpenTabsAge">
  <int value="0" label="Less than 1 day"/>
  <int value="1" label="1-3 days"/>
  <int value="2" label="3-7 days"/>
  <int value="3" label="7-14 days"/>
  <int value="4" label="14-30 days"/>
  <int value="5" label="More than 30 days"/>
</enum>

<enum name="NewTabType">
  <int value="0" label="New tab button"/>
  <int value="1" label="Regular menu option"/>
  <int value="2" label="Tab strip menu option"/>
  <int value="3" label="New tab button in toolbar for touch"/>
  <int value="4" label="New tab button in the WebUI tab strip"/>
</enum>

<enum name="PullDownGestureAction">
  <summary>The type of action performed on the overscroll UI.</summary>
  <int value="0" label="NewTab">The user selected the new tab action.</int>
  <int value="1" label="Refresh">The user selected the refresh action.</int>
  <int value="2" label="CloseTab">The user selected the close tab action.</int>
  <int value="3" label="Canceled">
    The user canceled the action by scrolling back up.
  </int>
</enum>

<enum name="RestoreTabStateException">
  <int value="0" label="File not found"/>
  <int value="1" label="Closed by interrupt exception"/>
  <int value="2" label="IO exception"/>
</enum>

<enum name="SadTabEvent">
  <int value="0" label="Displayed"/>
  <int value="1" label="Button clicked"/>
  <int value="2" label="Learn more clicked"/>
</enum>

<!-- LINT.IfChange(SavedTabGroupSyncBridge.MigrationResult) -->

<enum name="SavedTabGroupSyncBridge.MigrationResult">
  <int value="0" label="Store creation failed"/>
  <int value="1" label="Store load started"/>
  <int value="2" label="Store load failed"/>
  <int value="3" label="Store load completed"/>
  <int value="4" label="Specifics to data migration started"/>
  <int value="5"
      label="Specifics to data migration parse failed at least once"/>
  <int value="6" label="Specifics to data migration write failed"/>
  <int value="7" label="Specifics to data migration success"/>
  <int value="8" label="Specifics to data migration already complete"/>
  <int value="9" label="Shared pref migration started"/>
  <int value="10" label="Shared pref migration parse failed at least once"/>
  <int value="11" label="Shared pref migration at least one entry migrated"/>
  <int value="12" label="Shared pref migration write failed"/>
  <int value="13" label="Shared pref migration success"/>
  <int value="14" label="Read all metadata failed"/>
  <int value="15" label="Read all metadata success"/>
</enum>

<!-- LINT.ThenChange(//components/saved_tab_groups/stats.h:MigrationResult) -->

<enum name="TabActivationTypes">
  <int value="0" label="Activate a tab"/>
  <int value="1" label="Activate the context menu of a tab"/>
</enum>

<enum name="TabBackgroundLoadStatus">
  <int value="0" label="Loaded on creation and shown"/>
  <int value="1" label="Loaded on creation and lost"/>
  <int value="2" label="Not loaded on creation"/>
</enum>

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

<enum name="TabGroupEvent">
  <int value="0" label="Tab group created"/>
  <int value="1" label="Tab group removed"/>
  <int value="2" label="Tab group opened"/>
  <int value="3" label="Tab group closed"/>
  <int value="4" label="Tab group visuals changed"/>
  <int value="5" label="Tab group tabs reordered"/>
  <int value="6" label="Tab added"/>
  <int value="7" label="Tab removed"/>
  <int value="8" label="Tab navigated"/>
  <int value="9" label="Tab selected"/>
</enum>

<!-- LINT.ThenChange(//components/saved_tab_groups/types.h:TabGroupEvent) -->

<enum name="TabManagerTabRankerResult">
  <int value="0" label="Success">Tab score was calculated successfully.</int>
  <int value="1" label="Preprocessor initialization failed">
    The ExamplePreprocessorConfig could not be loaded or parsed.
  </int>
  <int value="2" label="Preprocessor other error">
    The ExamplePreprocessor returned an error other than, or in addition to, the
    kNoFeatureIndexFound error.
  </int>
</enum>

<enum name="TabOrganizationTriggerOutcome">
  <int value="0" label="Accepted">User clicked through the nudge UI.</int>
  <int value="1" label="Dismissed">User explicitly dismissed the nudge UI.</int>
  <int value="2" label="Timed out">
    The timeout elapsed without user interaction.
  </int>
</enum>

<enum name="TabOrganizationUserChoice">
  <int value="0" label="No Choice">
    The session was destroyed before the organization had a choice.
  </int>
  <int value="1" label="Accepted">User accepted the organization.</int>
  <int value="2" label="Rejected">User rejected the organization.</int>
</enum>

<enum name="TabRestoreMethod">
  <int value="0" label="TabState"/>
  <int value="1" label="CriticalPersistedTabData"/>
  <int value="2" label="Create new Tab"/>
  <int value="3" label="Failed to restore"/>
  <int value="4" label="Skipped (NTP)"/>
  <int value="5" label="Skipped (Empty URL)"/>
</enum>

<enum name="TabScreenshotAction">
  <int value="0" label="User took no actions">
    User made a screenshot, but did not take any actions with it before
    navigating away or closing the tab.
  </int>
  <int value="1" label="Opened sharing">
    User took a screenshot then tried to share.
  </int>
  <int value="2" label="Download IPH provided">
    User was provided in product help for Downloads after taking a screenshot.
  </int>
</enum>

<enum name="TabSearchCloseActions">
  <int value="0" label="User did not close via Tab Search UI">
    The UI was dismissed via interactions outside what is offered by the Tab
    Search UI.
  </int>
  <int value="1" label="User switched to an open tab">
    The Tab Search UI was dismissed as a result of the user opting to switch to
    a currently open tab.
  </int>
</enum>

<enum name="TabSearchOpenActions">
  <int value="0" label="User opened the Tab Search UI via a mouse click"/>
  <int value="1" label="User opened the Tab Search UI via keyboard navigation"/>
  <int value="2" label="User opened the Tab Search UI via keyboard shortcut"/>
  <int value="3" label="User opened the Tab Search UI via touch gesture"/>
</enum>

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

<enum name="TabSearchPosition">
  <int value="0" label="Leading"/>
  <int value="1" label="Trailing"/>
</enum>

<!-- LINT.ThenChange(//chrome/browser/ui/views/frame/tab_strip_region_view.h:TabSearchPositionEnum) -->

<enum name="TabSearchRecentlyClosedItemOpenAction">
  <int value="0"
      label="Opened a recently closed item from an unfiltered item list"/>
  <int value="1"
      label="Opened a recently closed item from a filtered item list"/>
</enum>

<enum name="TabSearchRecentlyClosedToggleActions">
  <int value="0" label="Expand the recently closed items section"/>
  <int value="1" label="Collapse the recently closed items section"/>
</enum>

<enum name="TabSearchTabSwitchAction">
  <int value="0" label="Switch to tab from unfiltered tab list"/>
  <int value="1" label="Switch to tab from filtered search tab list"/>
</enum>

<enum name="TabStateFlatBufferDeserializeResult">
  <int value="0" label="Success"/>
  <int value="1" label="Failure Unknown Reason"/>
  <int value="2" label="Failure IndexOutOfBoundsException"/>
  <int value="3" label="Failure IllegalArgumentException"/>
</enum>

<enum name="TabStateRestoreMethod">
  <int value="0" label="FlatBuffer Schema"/>
  <int value="1" label="Legacy hand written Schema"/>
  <int value="2" label="Failed to restore TabState"/>
</enum>

<enum name="TabStatus">
  <int value="0" label="Memory resident"/>
  <int value="1" label="Evicted and reloaded"/>
  <int value="2" label="Reloaded due to cold start"/>
  <int value="3" label="Partially evicted"/>
  <int value="4" label="Reloaded due to backgrounding"/>
  <int value="5" label="Reloaded due to incognito"/>
  <int value="6" label="Reloaded due to cold start (fg tab on start)"/>
  <int value="7" label="Reloaded due to cold start (bg tab on switch)"/>
  <int value="8" label="Lazy load for 'Open in new tab'"/>
  <int value="9" label="Stopped due to page loading when backgrounding"/>
  <int value="10" label="Evicted due to page loading when backgrounding"/>
  <int value="11" label="Evicted due to OS terminating the renderer."/>
</enum>

</enums>

</histogram-configuration>