<!--
Copyright 2024 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>

<enum name="OneTimeTokenValidationResult">
  <int value="0" label="Success"/>
  <int value="1" label="Not Gmail One Time Password"/>
  <int value="2" label="Empty Encrypted Message Reference"/>
</enum>

<enum name="PageSummarySheetEvents">
  <int value="0" label="OPEN_SUMMARY_SHEET">
    Open summary sheet: user clicked the 'create summary' option on the share
    sheet. This starts the summary sharing flow.
  </int>
  <int value="1" label="CLOSE_SHEET_WHILE_INITIALIZING">
    Dismiss/Close summary sheet while initializing: user dismissed or closed the
    summary sheet before text started to load. This finishes the summary sharing
    flow.
  </int>
  <int value="2" label="CLOSE_SHEET_WHILE_LOADING">
    Dismiss/Close summary sheet while loading: user dismissed or closed the
    summary sheet while text was loading. This finishes the summary sharing
    flow.
  </int>
  <int value="3" label="CLOSE_SHEET_ON_ERROR">
    Dismiss/Close summary sheet on error: user dismissed or closed the summary
    sheet after loading failed. This finishes the summary sharing flow.
  </int>
  <int value="4" label="CLOSE_SHEET_AFTER_SUCCESS">
    Dismiss/Close summary sheet on success: user dismissed or closed the summary
    sheet after loading succeeded. This finishes the summary sharing flow.
  </int>
  <int value="5" label="ADD_SUMMARY">
    Add summary: user clicked the 'add summary' button on the summary sheet,
    share sheet will be re-opened with the summary attached. This finishes the
    summary sharing flow.
  </int>
  <int value="6" label="REMOVE_SUMMARY">
    Remove summary: user clicked the 'remove summary' option on the share sheet.
    This is only available after the user opened the summary sheet and then
    clicked 'add summary' on it. This will re-open the share sheet without the
    summary.
  </int>
  <int value="7" label="CLICK_POSITIVE_FEEDBACK">
    Provide positive feedback: user clicked the 'thumbs up' button on the
    summary sheet.
  </int>
  <int value="8" label="CLICK_NEGATIVE_FEEDBACK">
    Provide negative feedback: user clicked the 'thumbs down' button on the
    summary sheet. This will open another sheet with negative feedback types.
  </int>
  <int value="9" label="NEGATIVE_FEEDBACK_TYPE_SELECTED">
    Negative feedback type selected: user clicked 'submit' on the negative
    feedback sheet. This will open the system feedback UI and finish the summary
    sharing flow.
  </int>
  <int value="10" label="NEGATIVE_FEEDBACK_SHEET_DISMISSED">
    Negative feedback sheet dismissed: user clicked 'cancel' or dismissed the
    negative feedback sheet. This will re-open the summary sheet.
  </int>
  <int value="11" label="CLICK_LEARN_MORE">
    Learn more clicked: user clicked 'learn more' link, which opens a help
    center article.
  </int>
</enum>

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

<enum name="SendTabToSelfAutoOpenOutcome">
  <int value="0" label="Unopened immediately (no window or in background)"/>
  <int value="1" label="First tab opened in foreground (Desktop)"/>
  <int value="2" label="Tabs opened immediately in background"/>
  <int value="3" label="Tabs opened upon browser activation"/>
  <int value="4" label="Tab opened via notification click"/>
  <int value="5" label="(Deprecated) Opened in native app immediately"/>
  <int value="6"
      label="(Deprecated) Opened in native app upon browser activation"/>
  <int value="7" label="(Deprecated) Unopened upon browser activation"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/metrics_util.h:AutoOpenOutcome) -->

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

<enum name="SendTabToSelfFormFactorCombination">
  <int value="0" label="Desktop to Desktop"/>
  <int value="1" label="Desktop to Phone"/>
  <int value="2" label="Desktop to Tablet"/>
  <int value="3" label="Desktop to Unknown/Other"/>
  <int value="4" label="Phone to Desktop"/>
  <int value="5" label="Phone to Phone"/>
  <int value="6" label="Phone to Tablet"/>
  <int value="7" label="Phone to Unknown/Other"/>
  <int value="8" label="Tablet to Desktop"/>
  <int value="9" label="Tablet to Phone"/>
  <int value="10" label="Tablet to Tablet"/>
  <int value="11" label="Tablet to Unknown/Other"/>
  <int value="12" label="Unknown/Other to Desktop"/>
  <int value="13" label="Unknown/Other to Phone"/>
  <int value="14" label="Unknown/Other to Tablet"/>
  <int value="15" label="Unknown/Other to Unknown/Other"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/metrics_util.h:SendTabToSelfFormFactorCombination) -->

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

<enum name="SendTabToSelfFormFieldMatchOutcome">
  <int value="0" label="Strict Match (ID, Name, Type)"/>
  <int value="1" label="Signature Match"/>
  <int value="2" label="Exact Type Set Match"/>
  <int value="3" label="No Match (includes origin mismatches)"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/metrics_util.h:FormFieldMatchOutcome) -->

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

<enum name="SendTabToSelfResult">
  <int value="0" label="Success"/>
  <int value="1" label="Success (Throttled)"/>
  <int value="2" label="Failure: Not Tracking Metadata"/>
  <int value="3" label="Failure: Invalid URL"/>
  <int value="5" label="Failure: Commit Attempt Failed"/>
  <int value="6" label="Failure: Commit Attempt Error"/>
  <int value="7" label="Failure: Sync Disabled"/>
  <int value="8" label="Failure: Entry Removed"/>
  <int value="9" label="Failure: Commit Timeout"/>
  <int value="10" label="Failure: No Internet Connection"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/send_tab_to_self_model.h:SendTabToSelfResult) -->

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

<enum name="SendTabToSelfScrollPositionGenerationOutcome">
  <int value="0" label="Success"/>
  <int value="1" label="Browser timeout"/>
  <int value="2" label="Main frame changed"/>
  <int value="3" label="Main frame unavailable"/>
  <int value="4" label="Empty selector"/>
  <int value="5" label="Link generation error"/>
  <int value="6" label="Invalid selector"/>
  <int value="7" label="Renderer timeout"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/metrics_util.h:ScrollPositionGenerationOutcome) -->

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

<enum name="SendTabToSelfShareActivatedEntryPoint">
  <int value="0" label="Auto-opened"/>
  <int value="1" label="Desktop Toast"/>
  <int value="2" label="Desktop Toolbar Bubble"/>
  <int value="3" label="Mobile Notification"/>
  <int value="4" label="Tab Strip or Switcher"/>
  <int value="5" label="ChromeOS Birch"/>
  <int value="6" label="Tab or Browser Closed Without Activation"/>
  <int value="7" label="STTS Entry Expired Without Activation"/>
  <int value="8" label="Mobile Message Banner"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/metrics_util.h:SendTabToSelfShareActivatedEntryPoint) -->

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

<enum name="SendTabToSelfShareEntryPoint">
  <int value="0" label="Content Menu"/>
  <int value="1" label="Link Menu"/>
  <int value="2" label="Omnibox Icon"/>
  <int value="3" label="Omnibox Menu"/>
  <int value="4" label="Share Menu"/>
  <int value="5" label="Share Sheet"/>
  <int value="6" label="Tab Menu"/>
  <int value="7" label="Gesture"/>
  <int value="8" label="Share Sheet Direct Share"/>
</enum>

<!-- LINT.ThenChange(/components/send_tab_to_self/metrics_util.h:SendTabToSelfShareEntryPoint) -->

<enum name="ShareCustomAction">
  <int value="0" label="COPY"/>
  <int value="1" label="COPY_IMAGE"/>
  <int value="2" label="COPY_TEXT"/>
  <int value="3" label="COPY_URL"/>
  <int value="4" label="LONG_SCREENSHOT"/>
  <int value="5" label="PRINT"/>
  <int value="6" label="QR_CODE"/>
  <int value="7" label="SEND_TAB_TO_SELF"/>
  <int value="8" label="COPY_HIGHLIGHT_WITHOUT_LINK"/>
  <int value="9" label="COPY_IMAGE_WITH_LINK"/>
  <int value="10" label="PAGE_INFO"/>
  <int value="11" label="REMOVE_PAGE_INFO"/>
  <int value="12" label="SHARE_AS_TAB_GROUP"/>
</enum>

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

<enum name="SharingShareSheetLongScreenshotsBitmapGenerationStatus">
  <int value="0" label="Capture Completed"/>
  <int value="1" label="Insufficient Memory"/>
  <int value="2" label="General Generation Error"/>
</enum>

<!-- LINT.ThenChange(/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsUtils.java:BitmapGeneratorStatus) -->

</enums>

</histogram-configuration>
