<!--
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
chromium-metrics-reviews@google.com.
-->

<histogram-configuration>

<!-- Enum types -->

<enums>

<enum name="AboutThisSiteInteraction">
  <int value="0" label="kNotShown"/>
  <int value="1" label="kShownWithDescription"/>
  <int value="2" label="kShownWithoutDescription"/>
  <int value="3" label="kClickedWithDescription"/>
  <int value="4" label="kClickedWithoutDescription"/>
  <int value="5" label="kOpenedDirectlyFromSidePanel"/>
  <int value="6" label="kNotShownNonGoogleDSE"/>
  <int value="7" label="kNotShownLocalHost"/>
  <int value="8" label="kNotShownOptimizationGuideNotAllowed"/>
  <int value="9" label="kShownWithoutMsbb (deprecated)"/>
  <int value="10" label="kSameTabNavigation"/>
</enum>

<enum name="AboutThisSiteStatus">
  <summary>Tracks status of AboutThisSite queries.</summary>
  <int value="0" label="kValid">A valid response.</int>
  <int value="1" label="kNoResult">No result received.</int>
  <int value="2" label="kMissingSiteInfo">SiteInfo is missing.</int>
  <int value="3" label="kEmptySiteInfo">SiteInfo is empty.</int>
  <int value="4" label="kIncompleteDescription (deprecated)">
    kIncompleteDescription - deprecated.
  </int>
  <int value="5" label="kIncompleteSource">Source is incomplete.</int>
  <int value="6" label="kInvalidSource">Source URL is invalid.</int>
  <int value="7" label="kIncompleteTimeStamp">Timestamp is incomplete.</int>
  <int value="8" label="kInvalidTimeStamp">Timestamp is invalid.</int>
  <int value="9" label="kUnknown">
    User has not opted in to Optimization guide.
  </int>
  <int value="10" label="kMissingDescription">Description is missing.</int>
  <int value="11" label="kMissingDescriptionDescription">
    Description field in description is missing.
  </int>
  <int value="12" label="kMissingDescriptionName">Name is missing.</int>
  <int value="13" label="kMissingDescriptionLang">Lang is missing.</int>
  <int value="14" label="kMissingDescriptionSource">Source is missing.</int>
  <int value="15" label="kMissingBannerInfo">Banner info is missing.</int>
  <int value="16" label="kInvalidMoreAbout">MoreAbout URL is invalid.</int>
  <int value="17" label="kMissingMoreAbout">MoreAbout URL is missing.</int>
</enum>

<enum name="EncryptionPrefixVersion">
  <int value="0" label="No prefix found"/>
  <int value="1" label="Version v10"/>
  <int value="2" label="Version v11"/>
</enum>

<enum name="GwpAsanCrashAnalysisResult">
  <int value="0" label="The crash is not caused by GWP-ASan"/>
  <int value="1" label="The crash is caused by GWP-ASan"/>
  <int value="2" label="The ProcessMemory from the snapshot was null"/>
  <int value="3"
      label="Failed to read the crashing process' memory of the global
             allocator"/>
  <int value="4"
      label="The crashing process' global allocator members failed sanity
             checks"/>
  <int value="5" label="Failed to read crash stack traces"/>
  <int value="6" label="The ExceptionSnapshot CPU context was null"/>
  <int value="7"
      label="The crashing process' bitness does not match the crash handler"/>
  <int value="8" label="The allocator computed an invalid slot index"/>
  <int value="9" label="Failed to read the process' SlotMetadata"/>
  <int value="10"
      label="The allocator stored an invalid metadata index for a given slot"/>
  <int value="11" label="The computed metadata index was outdated"/>
  <int value="12"
      label="Failed to read the crashing process' slot to metadata mapping"/>
  <int value="13" label="The crash is caused by the Lightweight UAF Detector"/>
  <int value="14"
      label="Failed to read the crashing process' memory of the Lightweight
             UAF Detector metadata store"/>
  <int value="15"
      label="The computed lightweight metadata index was invalid or outdated"/>
  <int value="16"
      label="The crashing process' architecture does not match the crash
             handler"/>
  <int value="17" label="Found conflicting lightweight metadata IDs"/>
</enum>

<enum name="HttpsFirstModeBlockingResult">
  <int value="0" label="Unknown value"/>
  <int value="1" label="An insecure HTTP request was intercepted."/>
  <int value="2"
      label="An insecure HTTP request was permitted because a user had
             previously proceeded through a warning on this origin."/>
  <int value="3"
      label="An insecure HTTP request caused a warning to show, and the user
             proceeded through the warning."/>
  <int value="4"
      label="An insecure HTTP request caused a warning to show, and the user
             cancelled the navigation."/>
  <int value="5"
      label="An insecure HTTP request was permitted because no variant of
             Ask-Before-HTTP prevented the navigation."/>
</enum>

<!-- LINT.IfChange -->

<enum name="HttpsFirstModeFallbackReason">
  <int value="0" label="kNone">No fallback</int>
  <int value="1" label="kTimerFired">Fast-fallback timer fired</int>
  <int value="2" label="kCertError">Misconfigured HTTPS certificate</int>
  <int value="3" label="kRedirectLoop">Redirect loop (downgrade)</int>
  <int value="4" label="kNetError">Other network error</int>
</enum>

<!-- LINT.ThenChange(/components/security_interstitials/core/https_only_mode_metrics.h) -->

<enum name="HttpsFirstModeImplicitStateChange">
  <int value="0" label="Balanced Mode implicitly enabled by ESB"/>
  <int value="1" label="Balanced Mode implicitly disabled by ESB"/>
</enum>

<enum name="HttpsFirstModeInterstitialReason">
  <int value="0" label="kUnknown">Unknown reason</int>
  <int value="1" label="kPref">
    The interstitial was shown because the user enabled the UI pref.
  </int>
  <int value="2" label="kAdvancedProtection">
    The interstitial was shown because the user is enrolled in Advanced
    Protection, which enables HTTPS-First Mode.
  </int>
  <int value="3" label="kSiteEngagementHeuristic">
    The interstitial was shown because of the Site Engagement heuristic.
  </int>
  <int value="4" label="kTypicallySecureUserHeuristic">
    The interstitial was shown because of the Typically Secure User heuristic.
  </int>
  <int value="5" label="kIncognito">
    The interstitial was shown because the user was in Incognito mode and
    HTTPS-First Mode in Incognito was enabled.
  </int>
  <int value="6" label="kBalanced">
    The interstitial was shown because the user was in balanced mode.
  </int>
  <int value="7" label="kEsbPairing">
    The interstitial was shown because HFM was enabled via ESB pairing.
  </int>
</enum>

<enum name="HttpsFirstModeNavigationEvent">
  <int value="0" label="kUpgradeAttempted">Upgrade attempted</int>
  <int value="1" label="kUpgradeSucceeded">Upgrade succeeded</int>
  <int value="2" label="kUpgradeFailed">Upgrade failed (for any reason)</int>
  <int value="3" label="kUpgradeCertError">
    Upgrade failed due to cert error
  </int>
  <int value="4" label="kUpgradeNetError">Upgrade failed due to net error</int>
  <int value="5" label="kUpgradeTimedOut">Upgrade failed due to timing out</int>
  <int value="6" label="kPrerenderCancelled">
    Prerender navigation cancelled
  </int>
  <int value="7" label="kUpgradeNotAttempted">
    Upgrade not attempted because not enabled
  </int>
  <int value="8" label="kUpgradeRedirectLoop">
    Upgrade failed due to a redirect loop
  </int>
  <int value="9" label="kTypedSchemelessUpgradeAttempted">
    Typed schemeless upgrade attempted
  </int>
  <int value="10" label="kTypedSchemelessUpgradeSucceeded">
    Typed schemeless upgrade succeeded
  </int>
  <int value="11" label="kTypedSchemelessUpgradeTimedOut">
    Typed schemeless upgrade timed out (no-fallback)
  </int>
</enum>

<!-- LINT.IfChange -->

<enum name="HttpsFirstModeSetting">
  <int value="0" label="Disabled"/>
  <int value="1" label="(Deprecated) Enabled in Incognito"/>
  <int value="2" label="Fully enabled"/>
  <int value="3" label="Balanced mode enabled"/>
</enum>

<!-- LINT.ThenChange(/chrome/browser/ssl/https_first_mode_settings_tracker.h) -->

<enum name="HttpsFirstModeStartupState">
  <int value="0" label="Disabled"/>
  <int value="1" label="Enabled (Full)"/>
  <int value="2" label="Enabled (Balanced) - Explicitly by user"/>
  <int value="3" label="Enabled (Balanced) - Typically Secure heuristic"/>
  <int value="4" label="Enabled (Balanced) - Paired with ESB"/>
  <int value="5" label="Enabled (Balanced) - Auto-enable feature"/>
</enum>

<enum name="IOSKeychainMigrationResult">
  <int value="0" label="Not needed"/>
  <int value="1" label="Success"/>
  <int value="2" label="Failure"/>
</enum>

<enum name="LandlockState">
  <int value="0" label="Enabled"/>
  <int value="1" label="Disabled"/>
  <int value="2" label="Not Supported"/>
  <int value="3" label="Unknown"/>
</enum>

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

<enum name="LocalNetworkAccessCheckResult">
  <int value="0" label="AllowedMissingClientSecurityState"/>
  <int value="1" label="AllowedNoLessPublic"/>
  <int value="2" label="AllowedByPolicyAllow"/>
  <int value="3" label="AllowedByPolicyWarn"/>
  <int value="4" label="BlockedByLoadOption"/>
  <int value="5" label="BlockedByPolicyBlock"/>
  <int value="6" label="(Deprecated) AllowedByTargetIpAddressSpace"/>
  <int value="7" label="(Deprecated) BlockedByTargetIpAddressSpace"/>
  <int value="8" label="(Deprecated) BlockedByPolicyPreflightWarn"/>
  <int value="9" label="(Deprecated) BlockedByPolicyPreflightBlock"/>
  <int value="10" label="(Deprecated) AllowedByPolicyPreflightWarn"/>
  <int value="11" label="BlockedByInconsistentIpAddressSpace"/>
  <int value="12" label="AllowedPotentiallyTrustworthySameOrigin"/>
  <int value="13" label="LNAPermissionRequired"/>
  <int value="14" label="LNAAllowedByPolicyWarn"/>
  <int value="15" label="BlockedByRequiredIpAddressSpaceMismatch"/>
</enum>

<!-- LINT.ThenChange(/services/network/public/cpp/local_network_access_check_result.h:LocalNetworkAccessCheckResult) -->

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

<enum name="MainFrameProcessReuseBlockReason">
  <int value="0" label="(Obsolete) Not blocked. Removed in 2026/04"/>
  <int value="1" label="Process reuse is disabled"/>
  <int value="2" label="DevTools was ever attached"/>
  <int value="3" label="Does not require dedicated process"/>
  <int value="4" label="Localhost or IP address based host"/>
  <int value="5" label="Scheme is not http(s)"/>
  <int value="6" label="Embedder disallowed process-per-site reuse for URL"/>
  <int value="7" label="Embedder disallowed any process-per-site reuse"/>
  <int value="8" label="Allowed by process-per-site threshold"/>
  <int value="9" label="Allowed by prerender process reuse"/>
  <int value="10" label="No main frame process reuse feature is enabled"/>
</enum>

<!-- LINT.ThenChange(//content/browser/renderer_host/render_frame_host_manager.cc:MainFrameProcessReuseBlockReason) -->

<!-- LINT.IfChange -->

<enum name="MerchantTrustInteraction">
  <int value="0" label="kPageInfoRowShown">
    Page info with merchant trust row was shown.
  </int>
  <int value="1" label="kBubbleOpenedFromPageInfo">
    The merchant trust bubble was opened from the page info row.
  </int>
  <int value="2" label="kSidePanelOpened">
    The merchant trust side panel was opened.
  </int>
  <int value="3" label="kBubbleClosed">
    The merchant trust bubble was closed.
  </int>
  <int value="4" label="kSidePanelClosed">
    The merchant trust side panel was closed.
  </int>
  <int value="5" label="kBubbleOpenedFromLocationBarChip">
    (Deprecated) The merchant trust bubble was opened from the location bar
    chip.
  </int>
  <int value="6" label="kSidePanelOpenedOnSameTabNavigation">
    The merchant trust side panel remained open from a same tab navigation.
  </int>
  <int value="7" label="kSidePanelClosedOnSameTabNavigation">
    The merchant trust bubble was closed on a same tab navigation.
  </int>
</enum>

<!-- LINT.ThenChange(//components/page_info/core/merchant_trust_service.h:MerchantTrustInteraction) -->

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

<enum name="MerchantTrustStatus">
  <int value="0" label="kValid">A valid response.</int>
  <int value="1" label="kNoResult">No result received.</int>
  <int value="2" label="kMissingRatingCount">Rating count is missing.</int>
  <int value="3" label="kMissingRatingValue">Rating value is missing.</int>
  <int value="4" label="DEPRECATED kMissingReviewsSummary">
    Reviews summary is missing.
  </int>
  <int value="5" label="kMissingReviewsPageUrl">
    Reviews page URL is missing.
  </int>
  <int value="6" label="kInvalidReviewsPageUrl">
    Reviews page URL is invalid.
  </int>
  <int value="7" label="kValidWithMissingReviewsSummary">
    A valid response with missing reviews summary.
  </int>
</enum>

<!-- LINT.ThenChange(//components/page_info/core/merchant_trust_validation.h:MerchantTrustStatus) -->

<enum name="NavigationRequestSecurityLevel">
  <int value="0" label="Unknown; request was ignored"/>
  <int value="1" label="HTTPS request"/>
  <int value="2" label="HTTP request"/>
  <int value="3" label="HTTP request internally upgraded by HSTS"/>
  <int value="4" label="Localhost request"/>
  <int value="5"
      label="HTTP request internally upgraded by HFM/HTTP Upgrading"/>
  <int value="6" label="Non-HTTP/HTTPS request"/>
  <int value="7"
      label="HTTP allowed by content/enterprise setting (NOT by failing
             auto-upgrade or clicking through warning)."/>
  <int value="8" label="HTTP request to non-unique host."/>
  <int value="9"
      label="HTTP request to a fully typed URL with explicit HTTP scheme."/>
  <int value="10" label="HTTP request to a captive portal login page"/>
  <int value="11" label="Request was for a single-label hostname"/>
  <int value="12" label="Request was for a URL with non-default ports"/>
  <int value="13"
      label="The hostname was in the HTTPS-enforcement list because of the
             HFM+SE heuristic. Recorded regardless of whether there was a
             fallback navigation or an interstitial. Not recorded if the
             hostname is allowlisted."/>
  <int value="14"
      label="HTTP request upgraded to HTTPS, and is a typed schemeless
             navigation (eligible for no-fallback on timeout)"/>
</enum>

<enum name="OSCryptAppBoundKeyRetrievalStatus">
  <int value="0" label="Success"/>
  <int value="1" label="Key Not Found"/>
  <int value="2" label="Key Decode Failure"/>
  <int value="3" label="Invalid Key Header"/>
  <int value="4" label="Key Too Short"/>
</enum>

<enum name="OSCryptDPAPIKeyStatus">
  <int value="0" label="Success"/>
  <int value="1" label="Key Not Found"/>
  <int value="2" label="Key Decode Failure"/>
  <int value="3" label="Key Too Short"/>
  <int value="4" label="Invalid Key Header"/>
  <int value="5" label="DPAPI Decryption Failure"/>
  <int value="6" label="Invalid Key Length"/>
</enum>

<enum name="PageEndReason">
  <int value="0" label="END_NONE">
    Page lifetime has not yet ended (page is still active)
  </int>
  <int value="1" label="END_RELOAD">Page was reloaded</int>
  <int value="2" label="END_FORWARD_BACK">
    Page was navigated away from, via a back or forward navigation
  </int>
  <int value="3" label="END_CLIENT_REDIRECT">
    Page was redirected via Javascript or the meta refresh tag
  </int>
  <int value="4" label="END_NEW_NAVIGATION">
    Page load was replaced by a new navigation
  </int>
  <int value="5" label="END_STOP">Page load was stopped</int>
  <int value="6" label="END_CLOSE">
    Page load ended due to closing the tab or browser
  </int>
  <int value="7" label="END_PROVISIONAL_LOAD_FAILED">
    Provisional load for this page load failed before comitting
  </int>
  <int value="8" label="END_RENDER_PROCESS_GONE">
    Render process hosting the page terminated unexpectedly
  </int>
  <int value="9" label="END_OTHER">
    Unknown reason; page load may have finished without comitting
  </int>
  <int value="10" label="END_HIDDEN">
    Page became hidden, but is still active.
  </int>
  <int value="11" label="END_APP_BACKGROUND">
    The metrics were flushed because the app entered the background.
  </int>
</enum>

<enum name="PopupBypassType">
  <int value="0"
      label="The process has previously run an injected extension content
             script"/>
  <int value="1" label="The process is an authorized extension process"/>
  <int value="2"
      label="The process is a privileged web page (e.g., a hosted app) in an
             outermost main frame"/>
</enum>

<enum name="ReusePendingOrCommittedSiteEnum">
  <int value="0" label="Had to create a new RenderProcessHost"/>
  <int value="1" label="Could reuse an existing RenderProcessHost"/>
</enum>

<enum name="SafetyTipInteraction">
  <int value="0" label="User dismissed the Safety Tip"/>
  <int value="1" label="User left the site with the Safety Tip"/>
  <int value="2" label="No action on the Safety Tip"/>
  <int value="3" label="User dismissed the Safety Tip with the esc key"/>
  <int value="4" label="User dismissed the Safety Tip with the close button"/>
  <int value="5" label="User dismissed the Safety Tip with the ignore button"/>
  <int value="6" label="User opened help center"/>
  <int value="7" label="No Safety Tip was shown"/>
  <int value="8" label="User closed the tab"/>
  <int value="9" label="User switched to a different tab"/>
  <int value="10" label="User navigated away"/>
</enum>

<enum name="SafetyTipStatus">
  <int value="0" label="Safety Tip status unknown/not applicable"/>
  <int value="1" label="No Safety Tip"/>
  <int value="2" label="Safety Tip for bad reputation (deprecated)"/>
  <int value="3" label="Safety Tip for lookalike URL"/>
  <int value="4"
      label="Safety Tip for a URL with a suspicious keyword (deprecated)"/>
  <int value="5"
      label="Safety Tip for bad reputation, but the user has explicitly
             dismissed the Safety Tip on a previous navigation (deprecated)"/>
  <int value="6"
      label="Safety Tip for a lookalike URL, but the user has explicitly
             dismissed the Safety Tip on a previous navigation"/>
  <int value="7"
      label="The lookalike URL for the Safety Tip has a Digital Asset Link
             match (deprecated)"/>
</enum>

<enum name="SCTAuditingReportCompletionStatus">
  <int value="0" label="kSuccessFirstTry">Succeeded on first try</int>
  <int value="1" label="kSuccessAfterRetries">Succeeded after retrying</int>
  <int value="2" label="kRetriesExhausted">Failed after exhausting retries</int>
</enum>

<enum name="SCTLookupQueryResult">
  <int value="0" label="HTTP error"/>
  <int value="1" label="Invalid JSON"/>
  <int value="2" label="Status not OK"/>
  <int value="3" label="Certificate expired"/>
  <int value="4" label="Log not found"/>
  <int value="5" label="Log not yet ingested"/>
  <int value="6" label="SCT suffix found"/>
  <int value="7" label="SCT suffix not found"/>
</enum>

<enum name="SecretPortalKeyProviderInitStatus">
  <int value="0" label="Success"/>
  <int value="1" label="NoService"/>
  <int value="2" label="PipeFailed"/>
  <int value="3" label="InvalidResponseFormat"/>
  <int value="4" label="ResponsePathMismatch"/>
  <int value="5" label="PipeReadFailed"/>
  <int value="6" label="EmptySecret"/>
  <int value="7" label="NoResponse"/>
  <int value="8" label="SignalReadFailed"/>
  <int value="9" label="UserCancelledUnlock"/>
  <int value="10" label="(Obsolete) DestructedBeforeComplete"/>
  <int value="11" label="SignalConnectFailed"/>
  <int value="12" label="SignalParseFailed"/>
</enum>

<enum name="SecurityLevel">
  <int value="0" label="None"/>
  <int value="1" label="HTTP with warning (deprecated)"/>
  <int value="2" label="Secure with EV certificate (deprecated)"/>
  <int value="3" label="Secure"/>
  <int value="4" label="Secure with policy-installed certificate (deprecated)"/>
  <int value="5" label="Dangerous"/>
  <int value="6" label="Warning"/>
</enum>

<enum name="SiteEngagementHeuristicState">
  <int value="0"
      label="HTTPS-First Mode got enabled on this site because its HTTPS
             score is high and HTTP score is low."/>
  <int value="1"
      label="HTTPS-First Mode got disabled on this site because its HTTPS
             score is low or HTTP score is high."/>
</enum>

<enum name="SiteIsolationIsDedicatedProcess">
  <int value="0" label="Process is not dedicated to a single site"/>
  <int value="1" label="Process is dedicated to a single site"/>
</enum>

</enums>

</histogram-configuration>
