Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: sql/error_delegate_util.h

Issue 15104003: Remove last client of sql::DiagnosticErrorDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Convert to error callback. Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sql/error_delegate_util.h
diff --git a/sql/error_delegate_util.h b/sql/error_delegate_util.h
index 6b90ccf8b4f16738f24992e002d2c755f55fda35..0c67c07ec7835b83303f9adc306cbe982dc2ed7a 100644
--- a/sql/error_delegate_util.h
+++ b/sql/error_delegate_util.h
@@ -5,8 +5,6 @@
#ifndef SQL_ERROR_DELEGATE_UTIL_H_
#define SQL_ERROR_DELEGATE_UTIL_H_
-#include "base/metrics/histogram.h"
-#include "sql/connection.h"
#include "sql/sql_export.h"
namespace sql {
@@ -15,27 +13,6 @@ namespace sql {
// |error|.
SQL_EXPORT bool IsErrorCatastrophic(int error);
-// Log error in console in debug mode and generate a UMA histogram in release
-// mode for |error| for |UniqueT::name()|.
-// This function is templated because histograms need to be singletons. That is
-// why they are always static at the function scope. The template parameter
-// makes the compiler create unique functions that don't share the same static
-// variable.
-template <class UniqueT>
-void LogAndRecordErrorInHistogram(int error,
- sql::Connection* connection) {
- LOG(ERROR) << "sqlite error " << error
- << ", errno " << connection->GetLastErrno()
- << ": " << connection->GetErrorMessage();
-
- // Trim off the extended error codes.
- error &= 0xff;
-
- // The histogram values from sqlite result codes currently go from 1 to 26
- // but 50 gives them room to grow.
- UMA_HISTOGRAM_ENUMERATION(UniqueT::name(), error, 50);
-}
-
} // namespace sql
#endif // SQL_ERROR_DELEGATE_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698