diff options
Diffstat (limited to 'sql/diagnostic_error_delegate.h')
-rw-r--r-- | sql/diagnostic_error_delegate.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/diagnostic_error_delegate.h b/sql/diagnostic_error_delegate.h index e0c42ba..022e6a5 100644 --- a/sql/diagnostic_error_delegate.h +++ b/sql/diagnostic_error_delegate.h @@ -12,6 +12,10 @@ namespace sql { +// The histogram values from sqlite result codes currently range from 1 to 26 +// but 50 gives them room to grow. +static const int kMaxSqliteError = 50; + // This class handles the exceptional sqlite errors that we might encounter // if for example the db is corrupted. Right now we just generate a UMA // histogram for release and an assert for debug builds. @@ -39,9 +43,7 @@ class DiagnosticErrorDelegate : public ErrorDelegate { // Trim off the extended error codes. error &= 0xff; - // The histogram values from sqlite result codes go currently from 1 to - // 26 currently but 50 gives them room to grow. - UMA_HISTOGRAM_ENUMERATION(UniqueT::name(), error, 50); + UMA_HISTOGRAM_ENUMERATION(UniqueT::name(), error, kMaxSqliteError); } }; |