summaryrefslogtreecommitdiffstats
path: root/webkit/quota
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/quota
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/quota')
-rw-r--r--webkit/quota/quota_database.cc12
1 files changed, 1 insertions, 11 deletions
diff --git a/webkit/quota/quota_database.cc b/webkit/quota/quota_database.cc
index c604c56..aaf6245 100644
--- a/webkit/quota/quota_database.cc
+++ b/webkit/quota/quota_database.cc
@@ -12,7 +12,6 @@
#include "base/time.h"
#include "googleurl/src/gurl.h"
#include "sql/connection.h"
-#include "sql/diagnostic_error_delegate.h"
#include "sql/meta_table.h"
#include "sql/statement.h"
#include "sql/transaction.h"
@@ -30,15 +29,6 @@ const char kHostQuotaTable[] = "HostQuotaTable";
const char kOriginInfoTable[] = "OriginInfoTable";
const char kIsOriginTableBootstrapped[] = "IsOriginTableBootstrapped";
-class HistogramUniquifier {
- public:
- static const char* name() { return "Sqlite.Quota.Error"; }
-};
-
-sql::ErrorDelegate* GetErrorHandlerForQuotaDb() {
- return new sql::DiagnosticErrorDelegate<HistogramUniquifier>();
-}
-
bool VerifyValidQuotaConfig(const char* key) {
return (key != NULL &&
(!strcmp(key, QuotaDatabase::kDesiredAvailableSpaceKey) ||
@@ -457,7 +447,7 @@ bool QuotaDatabase::LazyOpen(bool create_if_needed) {
db_.reset(new sql::Connection);
meta_table_.reset(new sql::MetaTable);
- db_->set_error_delegate(GetErrorHandlerForQuotaDb());
+ db_->set_error_histogram_name("Sqlite.Quota.Error");
bool opened = false;
if (in_memory_only) {