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

Unified Diff: sql/sqlite_features_unittest.cc

Issue 11111021: Remove ref counting on sql::ErrorDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/sqlite_features_unittest.cc
diff --git a/sql/sqlite_features_unittest.cc b/sql/sqlite_features_unittest.cc
index d3ad7b01e1e9b00bb6e702c33518dad8d10f86ed..cc5e7aaa78dbad4a440159f1fce2d45d0eee6e50 100644
--- a/sql/sqlite_features_unittest.cc
+++ b/sql/sqlite_features_unittest.cc
@@ -20,6 +20,8 @@ class StatementErrorHandler : public sql::ErrorDelegate {
public:
StatementErrorHandler() : error_(SQLITE_OK) {}
+ virtual ~StatementErrorHandler() {}
+
virtual int OnError(int error, sql::Connection* connection,
sql::Statement* stmt) OVERRIDE {
error_ = error;
@@ -37,12 +39,11 @@ class StatementErrorHandler : public sql::ErrorDelegate {
const char* sql_statement() const { return sql_text_.c_str(); }
- protected:
- virtual ~StatementErrorHandler() {}
-
private:
int error_;
std::string sql_text_;
+
+ DISALLOW_COPY_AND_ASSIGN(StatementErrorHandler);
};
class SQLiteFeaturesTest : public testing::Test {
@@ -73,7 +74,7 @@ class SQLiteFeaturesTest : public testing::Test {
private:
ScopedTempDir temp_dir_;
sql::Connection db_;
- scoped_refptr<StatementErrorHandler> error_handler_;
+ StatementErrorHandler* error_handler_;
};
// Do not include fts1 support, it is not useful, and nobody is
« no previous file with comments | « sql/connection.h ('k') | sql/statement_unittest.cc » ('j') | sql/statement_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698