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

Unified Diff: Source/modules/webdatabase/SQLTransactionBackend.h

Issue 561143002: Web SQL: Remove unnecessary abstraction. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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: Source/modules/webdatabase/SQLTransactionBackend.h
diff --git a/Source/modules/webdatabase/SQLTransactionBackend.h b/Source/modules/webdatabase/SQLTransactionBackend.h
index 972e57de3f2a9c541c5503246d0b9d9f76cdc78f..21488f88855c662ca3828e0e61cb96644580fc17 100644
--- a/Source/modules/webdatabase/SQLTransactionBackend.h
+++ b/Source/modules/webdatabase/SQLTransactionBackend.h
@@ -28,23 +28,21 @@
#ifndef SQLTransactionBackend_h
#define SQLTransactionBackend_h
-#include "modules/webdatabase/AbstractSQLStatement.h"
-#include "modules/webdatabase/AbstractSQLTransactionBackend.h"
#include "modules/webdatabase/DatabaseBasicTypes.h"
+#include "modules/webdatabase/SQLStatement.h"
#include "modules/webdatabase/SQLTransactionStateMachine.h"
#include "platform/heap/Handle.h"
#include "wtf/Deque.h"
#include "wtf/Forward.h"
#include "wtf/ThreadingPrimitives.h"
-#include "wtf/text/WTFString.h"
namespace blink {
-class AbstractSQLTransaction;
class DatabaseBackend;
class SQLErrorData;
class SQLiteTransaction;
class SQLStatementBackend;
+class SQLTransaction;
class SQLTransactionBackend;
class SQLValue;
@@ -58,13 +56,13 @@ public:
virtual void handleCommitFailedAfterPostflight(SQLTransactionBackend*) = 0;
};
-class SQLTransactionBackend FINAL : public AbstractSQLTransactionBackend, public SQLTransactionStateMachine<SQLTransactionBackend> {
+class SQLTransactionBackend FINAL : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<SQLTransactionBackend>, public SQLTransactionStateMachine<SQLTransactionBackend> {
public:
static PassRefPtrWillBeRawPtr<SQLTransactionBackend> create(DatabaseBackend*,
- PassRefPtrWillBeRawPtr<AbstractSQLTransaction>, PassRefPtrWillBeRawPtr<SQLTransactionWrapper>, bool readOnly);
+ PassRefPtrWillBeRawPtr<SQLTransaction>, PassRefPtrWillBeRawPtr<SQLTransactionWrapper>, bool readOnly);
virtual ~SQLTransactionBackend();
- virtual void trace(Visitor*) OVERRIDE;
+ void trace(Visitor*);
void lockAcquired();
void performNextStep();
@@ -73,18 +71,18 @@ public:
bool isReadOnly() { return m_readOnly; }
void notifyDatabaseThreadIsShuttingDown();
+ // APIs called from the frontend published:
+ void requestTransitToState(SQLTransactionState);
+ SQLErrorData* transactionError();
+ SQLStatement* currentStatement();
+ void setShouldRetryCurrentStatement(bool);
+ void executeSQL(PassOwnPtrWillBeRawPtr<SQLStatement>, const String& statement,
+ const Vector<SQLValue>& arguments, int permissions);
+
private:
- SQLTransactionBackend(DatabaseBackend*, PassRefPtrWillBeRawPtr<AbstractSQLTransaction>,
+ SQLTransactionBackend(DatabaseBackend*, PassRefPtrWillBeRawPtr<SQLTransaction>,
PassRefPtrWillBeRawPtr<SQLTransactionWrapper>, bool readOnly);
- // APIs called from the frontend published via AbstractSQLTransactionBackend:
- virtual void requestTransitToState(SQLTransactionState) OVERRIDE;
- virtual SQLErrorData* transactionError() OVERRIDE;
- virtual AbstractSQLStatement* currentStatement() OVERRIDE;
- virtual void setShouldRetryCurrentStatement(bool) OVERRIDE;
- virtual void executeSQL(PassOwnPtrWillBeRawPtr<AbstractSQLStatement>, const String& statement,
- const Vector<SQLValue>& arguments, int permissions) OVERRIDE;
-
void doCleanup();
void enqueueStatementBackend(PassRefPtrWillBeRawPtr<SQLStatementBackend>);
@@ -110,7 +108,7 @@ private:
void getNextStatement();
- RefPtrWillBeMember<AbstractSQLTransaction> m_frontend; // Has a reference cycle, and will break in doCleanup().
+ RefPtrWillBeMember<SQLTransaction> m_frontend; // Has a reference cycle, and will break in doCleanup().
RefPtrWillBeMember<SQLStatementBackend> m_currentStatementBackend;
RefPtrWillBeMember<DatabaseBackend> m_database;

Powered by Google App Engine
This is Rietveld 408576698