Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(170)

Unified Diff: sql/diagnostic_error_delegate.h

Issue 10837244: Replace HistoryQuickProvider protobuf-based caching with an SQLite-based database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Tweak suppression. Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sql/diagnostic_error_delegate.h
===================================================================
--- sql/diagnostic_error_delegate.h (revision 151481)
+++ sql/diagnostic_error_delegate.h (working copy)
@@ -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 @@
// 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);
}
};

Powered by Google App Engine
This is Rietveld 408576698