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

Unified Diff: sql/meta_table.cc

Issue 14976003: Histogram versions and extended error codes for SQLite databases. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: excess include. Created 7 years, 7 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/meta_table.cc
diff --git a/sql/meta_table.cc b/sql/meta_table.cc
index 45f4ee09dbee49bf7677181420c79659fd9e9eb2..ded9608ca0eaff1341274171302609da52c461e3 100644
--- a/sql/meta_table.cc
+++ b/sql/meta_table.cc
@@ -52,6 +52,13 @@ bool MetaTable::Init(Connection* db, int version, int compatible_version) {
// there, we should create an index.
SetVersionNumber(version);
SetCompatibleVersionNumber(compatible_version);
+ } else {
+ // At this point, the highest version is Web, at 50, then
+ // History at 25, then a tie for 6. 100 leaves some room for
+ // growth.
+ // TODO(shess): Another option would be to use |version| as the cap.
+ static size_t kSqliteVersionMax = 100;
jar (doing other things) 2013/05/07 23:46:41 This fits wonderfully into a UMA_HISTOGRAM_SPARSE_
+ db_->AddLinearHistogram(".Version", GetVersionNumber(), kSqliteVersionMax);
}
return transaction.Commit();
}

Powered by Google App Engine
This is Rietveld 408576698