<!--
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(OpenDatabaseFailedReason) -->

<enum name="OpenDatabaseFailedReason">
  <summary>
    The reason the call to Database::Open(...) failed. The reason can be linked
    to find which sqlite calls failed and can be linked with returned sqlite
    error code.
  </summary>
  <int value="0" label="kAlreadyOpened"/>
  <int value="1" label="kIncorrectPath"/>
  <int value="2" label="kSqliteOpenFailed"/>
  <int value="3" label="kLockingModeFailed"/>
  <int value="4" label="kMetadataLoadingFailed"/>
  <int value="5" label="kPageSizeFailed"/>
  <int value="6" label="kPragmaSynchronousFailed"/>
  <int value="7" label="kPragmaJournalFailed"/>
</enum>

<!-- LINT.ThenChange(//sql/database.cc) -->

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

<enum name="RazeDatabaseFailedReason">
  <summary>The reason the call to Database::Raze(...) failed.</summary>
  <int value="0" label="kPoisoned"/>
  <int value="1" label="kPendingTransaction"/>
  <int value="2" label="kCantOpenInMemory"/>
  <int value="3" label="kAutoVacuumFailed"/>
  <int value="4" label="kSchemaFailed"/>
  <int value="5" label="kLocked"/>
  <int value="6" label="kTruncateFailed"/>
  <int value="7" label="kBackupFailed"/>
  <int value="8" label="kPageSizeFailed"/>
  <int value="9" label="kUnknownError"/>
  <int value="10" label="kCheckpointFailed"/>
</enum>

<!-- LINT.ThenChange(//sql/database.cc) -->

</enums>

</histogram-configuration>
