From 4cccc224e222ceeb765ce93d5bb40223b210c472 Mon Sep 17 00:00:00 2001 From: "michaeln@chromium.org" Date: Fri, 2 Apr 2010 22:12:56 +0000 Subject: Include the appcache and database tracker databases into the sql diagnostics fold. TEST=manual BUG=none Review URL: http://codereview.chromium.org/1508016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43534 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/database/database_tracker.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'webkit/database') 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 #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(); +} + +} // 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()); -- cgit v1.1