summaryrefslogtreecommitdiffstats
path: root/webkit/database
diff options
context:
space:
mode:
authormichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 22:12:56 +0000
committermichaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-02 22:12:56 +0000
commit4cccc224e222ceeb765ce93d5bb40223b210c472 (patch)
tree34c0d1c03d688288801e372282e560631148a692 /webkit/database
parentc692dd33c9a2686d7121045de78e7a0bdfabfe86 (diff)
downloadchromium_src-4cccc224e222ceeb765ce93d5bb40223b210c472.zip
chromium_src-4cccc224e222ceeb765ce93d5bb40223b210c472.tar.gz
chromium_src-4cccc224e222ceeb765ce93d5bb40223b210c472.tar.bz2
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
Diffstat (limited to 'webkit/database')
-rw-r--r--webkit/database/database_tracker.cc16
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());