diff options
author | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-02 22:12:56 +0000 |
---|---|---|
committer | michaeln@chromium.org <michaeln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-02 22:12:56 +0000 |
commit | 4cccc224e222ceeb765ce93d5bb40223b210c472 (patch) | |
tree | 34c0d1c03d688288801e372282e560631148a692 /webkit/appcache/appcache_database.cc | |
parent | c692dd33c9a2686d7121045de78e7a0bdfabfe86 (diff) | |
download | chromium_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/appcache/appcache_database.cc')
-rw-r--r-- | webkit/appcache/appcache_database.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/webkit/appcache/appcache_database.cc b/webkit/appcache/appcache_database.cc index a93b744..42af3dbc 100644 --- a/webkit/appcache/appcache_database.cc +++ b/webkit/appcache/appcache_database.cc @@ -1,10 +1,11 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "webkit/appcache/appcache_database.h" #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" @@ -133,6 +134,15 @@ const struct { const int kTableCount = ARRAYSIZE_UNSAFE(kTables); const int kIndexCount = ARRAYSIZE_UNSAFE(kIndexes); +class HistogramUniquifier { + public: + static const char* name() { return "Sqlite.AppCache.Error"; } +}; + +sql::ErrorDelegate* GetErrorHandlerForAppCacheDb() { + return new sql::DiagnosticErrorDelegate<HistogramUniquifier>(); +} + } // anon namespace @@ -983,6 +993,8 @@ bool AppCacheDatabase::LazyOpen(bool create_if_needed) { meta_table_.reset(new sql::MetaTable); quota_table_.reset(new webkit_database::QuotaTable(db_.get())); + db_->set_error_delegate(GetErrorHandlerForAppCacheDb()); + bool opened = false; if (use_in_memory_db) { opened = db_->OpenInMemory(); |