summaryrefslogtreecommitdiffstats
path: root/webkit/database/database_tracker.cc
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-03 23:59:14 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-03 23:59:14 +0000
commitc088e3a35dcb52d62255f97307960b8ad3aaffa7 (patch)
tree4b8638a366467cbaa4915575ed47fd72b5d8a2a6 /webkit/database/database_tracker.cc
parent8d469a234bbc0e1b59fb4d5315be697069f780c1 (diff)
downloadchromium_src-c088e3a35dcb52d62255f97307960b8ad3aaffa7.zip
chromium_src-c088e3a35dcb52d62255f97307960b8ad3aaffa7.tar.gz
chromium_src-c088e3a35dcb52d62255f97307960b8ad3aaffa7.tar.bz2
Bake targeted error histogram support directly into sql::Connection.
Previously there was a convoluted template system to unique histogram names for purposes of tracking database errors separately. This was needed due to the static cache used by the histogram macros. Instead, just log the histogram manually without using a static cache. Additionally, pull the histogram functionality right up into the connection, rather than requiring formalized delegation to get it. BUG=none Review URL: https://chromiumcodereview.appspot.com/11474030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175055 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/database/database_tracker.cc')
-rw-r--r--webkit/database/database_tracker.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index 2daeef1..824c8a2 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -16,7 +16,6 @@
#include "base/utf_string_conversions.h"
#include "net/base/net_errors.h"
#include "sql/connection.h"
-#include "sql/diagnostic_error_delegate.h"
#include "sql/meta_table.h"
#include "sql/transaction.h"
#include "third_party/sqlite/sqlite3.h"
@@ -26,19 +25,6 @@
#include "webkit/quota/quota_manager.h"
#include "webkit/quota/special_storage_policy.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[] =
@@ -491,7 +477,7 @@ bool DatabaseTracker::LazyInit() {
return false;
}
- db_->set_error_delegate(GetErrorHandlerForTrackerDb());
+ db_->set_error_histogram_name("Sqlite.DatabaseTracker.Error");
databases_table_.reset(new DatabasesTable(db_.get()));
meta_table_.reset(new sql::MetaTable());