chromium/tools/metrics/histograms/metadata/compose/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="ComposeContextMenuCtrEvent">
  <int value="0" label="Menu item displayed"/>
  <int value="1" label="Menu item clicked"/>
</enum>

<enum name="ComposeEntryPoint">
  <int value="0" label="Context Menu"/>
  <int value="1" label="Proactive Nudge"/>
  <int value="2" label="Selection Nudge"/>
  <int value="3" label="Resume Nudge">
    Shown on field focus when a sessions exists
  </int>
  <int value="4" label="Resume Notification">
    Shown when the dialog closes but the session is still open
  </int>
</enum>

<enum name="ComposeFreOrMsbbSessionCloseReasonType">
  <int value="0" label="Abandoned">
    The FRE/MSBB wasn't acknowledged/accepted and was abandoned, often by web
    contents destruction.
  </int>
  <int value="1" label="Dialog close button">
    The FRE/MSBB wasn't acknowledged/accepted and the user clicked on the close
    button of the dialog.
  </int>
  <int value="2" label="Acked/Accepted but abandoned">
    FRE acknowledged or MSBB accepted, but the session was abandoned, often by
    web contents destruction, with no response inserted.
  </int>
  <int value="3" label="Acked/Accepted and inserted response">
    FRE acknowledged or MSBB accepted, followed by a model response being
    inserted.
  </int>
  <int value="4" label="New session on same field">
    A new session was created for the same text field before the previous one
    was inserted. The FRE/MSBB wasn't acknowledged/accepted.
  </int>
  <int value="5" label="Session expired">
    The existing session was destroyed for exceeding the maximum allowed session
    lifetime, and was replaced by a new session. The FRE/MSBB wasn't
    acknowledged/accepted.
  </int>
</enum>

<enum name="ComposeInnerTextNodeOffset">
  <int value="0" label="Inner Text Node Offset not found"/>
  <int value="1" label="Inner Text Node Offset found"/>
</enum>

<enum name="ComposeProactiveNudgeCtrEvent">
  <int value="0" label="Nudge shown"/>
  <int value="1" label="Dialog opened from nudge"/>
  <int value="2" label="Globally disabled from nudge"/>
  <int value="3" label="Site disabled from nudge"/>
  <int value="4" label="Open Settings from nudge"/>
</enum>

<enum name="ComposeRequestFeedback">
  <int value="0" label="No feedback given"/>
  <int value="1" label="Postivie feedback given"/>
  <int value="2" label="Negative feedback given"/>
  <int value="3" label="Request error"/>
</enum>

<enum name="ComposeRequestReason">
  <int value="0" label="Create button"/>
  <int value="1" label="Retry button"/>
  <int value="2" label="Update button"/>
  <int value="3" label="Shorten modifier"/>
  <int value="4" label="Elaborate modifier"/>
  <int value="5" label="Casual modifier"/>
  <int value="6" label="Formal modifier"/>
</enum>

<enum name="ComposeRequestStatus">
  <int value="0" label="Success"/>
  <int value="1" label="Unspecified client error"/>
  <int value="2" label="DEPRECATED: Request was unable to be processed"/>
  <int value="3" label="DEPRECATED: Server may have not responded"/>
  <int value="4"
      label="DEPRECATED: Server is likely overloaded, cannot handle a
             response right now"/>
  <int value="5" label="The feature is disabled"/>
  <int value="6" label="User permission is denied"/>
  <int value="7" label="Unspecified server error"/>
  <int value="8" label="Invalid request sent"/>
  <int value="9" label="Request was throttled"/>
  <int value="10" label="Retryable server error">
    Retryable error occurred in the server
  </int>
  <int value="11" label="Non-retryable server error">
    Non-retryable error occured in the server
  </int>
  <int value="12" label="Unsupported language used"/>
  <int value="13" label="Request was filtered"/>
  <int value="14" label="Compose service was disabled"/>
  <int value="15" label="Request was cancelled"/>
  <int value="16" label="No server response">
    No response received from the server
  </int>
  <int value="17" label="The user is offline"/>
  <int value="18" label="The request timed out"/>
</enum>

<enum name="ComposeSelectAllStatus">
  <int value="0" label="Selection unchanged">
    Did not select all text for the user
  </int>
  <int value="1" label="Selected all">Selected all text for the user</int>
</enum>

<enum name="ComposeSessionCloseReasonType">
  <int value="0" label="Inserted model response"/>
  <int value="1" label="Dialog close button"/>
  <int value="2" label="Abandoned">
    Session was abandoned, often by web contents destruction, with no response
    inserted.
  </int>
  <int value="3" label="New session on same field">
    A new session was created for the same text field before the previous one
    could be inserted.
  </int>
  <int value="4" label="Closed while waiting response">
    Session was closed while waiting for a model response.
  </int>
  <int value="5" label="Session expired">
    The existing session was destroyed for exceeding the maximum allowed session
    lifetime, and was replaced by a new session.
  </int>
</enum>

<enum name="ComposeSessionEvalLocation">
  <int value="0" label="None"/>
  <int value="1" label="Server only"/>
  <int value="2" label="On-device only"/>
  <int value="3" label="Mixed - server and on-device"/>
</enum>

<enum name="ComposeSessionEventTypes">
  <int value="0" label="Main Dialog Shown"/>
  <int value="1" label="FRE Shown"/>
  <int value="2" label="FRE Accepted"/>
  <int value="3" label="MSBB Shown"/>
  <int value="4" label="MSBB Settings Opened"/>
  <int value="5" label="MSBB Enabled In Session"/>
  <int value="6" label="Session started with selection"/>
  <int value="7" label="Create Clicked"/>
  <int value="8" label="Update Clicked"/>
  <int value="9" label="Retry Clicked"/>
  <int value="10" label="Undo Clicked"/>
  <int value="11" label="Shorten Clicked"/>
  <int value="12" label="Elaborate Clicked"/>
  <int value="13" label="Casual Clicked"/>
  <int value="14" label="Formal Clicked"/>
  <int value="15" label="Thumbs Down Clicked"/>
  <int value="16" label="Thumbs Up Clicked"/>
  <int value="17" label="Insert Clicked"/>
  <int value="18" label="Close Clicked"/>
  <int value="19" label="Edit Clicked"/>
  <int value="20" label="Cancel Edit Clicked"/>
  <int value="21" label="Used a modifier">Added in M124</int>
  <int value="22" label="Redo Clicked"/>
  <int value="23" label="Result Edited"/>
  <int value="24" label="Edited Result Inserted"/>
  <int value="25" label="Has successful request">Added in M127</int>
  <int value="26" label="Has failed request">Added in M127</int>
  <int value="27" label="Compose Dialog Opened">Added in M127</int>
</enum>

<enum name="ComposeShowStatus">
  <int value="0" label="Shown">Successful outcome</int>
  <int value="1" label="Unspecified">Blocked for an unspecified reason</int>
  <int value="2" label="Incompatible field type">
    Blocked for incompatible field type
  </int>
  <int value="3" label="DEPRECATED: Blocked for MSBB not enabled"/>
  <int value="4" label="User not signed in">Blocked for user not signed in</int>
  <int value="5" label="Unsupported page language">
    Blocked due to page language not supported
  </int>
  <int value="6" label="Field in cross-origin subframe">
    Blocked for form element appearing in cross-origin subframe
  </int>
  <int value="7" label="Disabled for URL">
    Page URL disabled for Compose by optimization guide
  </int>
  <int value="8" label="User not allowed">
    User not allowed by optimization guide
  </int>
  <int value="9" label="Feature disable override">
    Feature not eligible, remotely disabled
  </int>
  <int value="10" label="Unsupported URL scheme">
    Incorrect scheme, should be HTTP/HTTPS
  </int>
  <int value="11" label="Field in fenced frame">
    Blocked for element appearing inside a fenced frame
  </int>
  <int value="12" label="Compose feature disabled"/>
  <int value="13" label="Unsupported ChromeOS device">
    Blocked for unsupported ChromeOS device
  </int>
  <int value="14" label="Nudge: autocomplete=off">
    Proactive nudge blocked for autocomplete=off
  </int>
  <int value="15" label="Nudge: writingsuggestions=false">
    Proactive nudge blocked for writingsuggestions=false
  </int>
  <int value="16" label="Nudge: feature disabled"/>
  <int value="17" label="Nudge: fully disabled">
    Proactive nudge globally disabled by user
  </int>
  <int value="18" label="Nudge: disabled for site">
    Proactive nudge disabled for site by user
  </int>
  <int value="19" label="Nudge: disabled for URL">
    Proactive nudge disabled by optimization guide
  </int>
  <int value="20" label="Nudge: unspecified for URL">
    Proactive nudge disabled for unset optimization guide
  </int>
  <int value="21" label="DEPRECATED: Proactive nudge disabled randomly"/>
  <int value="22" label="Nudge: disabled by MSBB"/>
  <int value="23" label="Nudge: segmentation blocked">
    Proactive nudge blocked for invalid Segmentation Platform
  </int>
  <int value="24" label="Disabled for country">
    Compose not enabled at the user's country
  </int>
  <int value="25" label="Undetermined country">
    Compose disabled because the user's country coult not be determined
  </int>
</enum>

<enum name="OpenComposeDialogResult">
  <int value="0" label="Success (dialog opened)"/>
  <int value="1" label="No ChromeComposeClient instance"/>
  <int value="2" label="No RenderFrameHost instance"/>
  <int value="3" label="No ContentAutofillDriver instance"/>
  <int value="4" label="FormData not found"/>
  <int value="5" label="FormFieldData not found"/>
  <int value="6" label="No WebContents instance"/>
  <int value="7" label="Failed creating ComposeDialogView"/>
  <int value="8" label="FormData not found after select all"/>
</enum>

<enum name="ProactiveNudgeDerivedEngagement">
  <int value="0" label="None">The user didn't interact with the nudge</int>
  <int value="1" label="Disabled for site">
    The user disabled the nudge on this site using the three-dot menu
  </int>
  <int value="2" label="Fully disabled">
    The user disabled the nudge on all sites using the three-dot menu
  </int>
  <int value="3" label="Interacted but no HMW request">
    User clicked the nudge, but didn't press generate in Compose
  </int>
  <int value="4" label="Interacted but unused HMW response">
    User clicked the nudge, pressed generate at least once, but didn't accept a
    response
  </int>
  <int value="5" label="Interacted and inserted HMW response">
    User clicked, pressed generate at least once, and accepted a response
    (successful outcome)
  </int>
</enum>

</enums>

</histogram-configuration>