diff options
Diffstat (limited to 'webkit/database')
-rw-r--r-- | webkit/database/database_tracker.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc index e64f118..c184c8b 100644 --- a/webkit/database/database_tracker.cc +++ b/webkit/database/database_tracker.cc @@ -7,6 +7,7 @@ #include <vector> #include "app/sql/connection.h" +#include "app/sql/diagnostic_error_delegate.h" #include "app/sql/meta_table.h" #include "app/sql/statement.h" #include "app/sql/transaction.h" @@ -18,6 +19,19 @@ #include "webkit/database/databases_table.h" #include "webkit/database/quota_table.h" +namespace { + +class HistogramUniquifier { + public: + static const char* name() { return "Sqlite.DatabaseTracker.Error"; } +}; + +sql::ErrorDelegate* GetErrorHandlerForTrackerDb() { + return new sql::DiagnosticErrorDelegate<HistogramUniquifier>(); +} + +} // anon namespace + namespace webkit_database { const FilePath::CharType kDatabaseDirectoryName[] = @@ -304,6 +318,8 @@ bool DatabaseTracker::LazyInit() { return false; } + db_->set_error_delegate(GetErrorHandlerForTrackerDb()); + databases_table_.reset(new DatabasesTable(db_.get())); quota_table_.reset(new QuotaTable(db_.get())); meta_table_.reset(new sql::MetaTable()); |