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

Unified Diff: Source/modules/webdatabase/SQLTransaction.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/SQLTransaction.h
diff --git a/Source/modules/webdatabase/SQLTransaction.h b/Source/modules/webdatabase/SQLTransaction.h
index 4b597b6b64815953f13358ce34365c4d051fbb15..79f37b9fdeb837d267ecbfb1c5d6e901fbcdc76d 100644
--- a/Source/modules/webdatabase/SQLTransaction.h
+++ b/Source/modules/webdatabase/SQLTransaction.h
@@ -30,7 +30,6 @@
#define SQLTransaction_h
#include "bindings/core/v8/ScriptWrappable.h"
-#include "modules/webdatabase/AbstractSQLTransaction.h"
#include "modules/webdatabase/SQLCallbackWrapper.h"
#include "modules/webdatabase/SQLStatement.h"
#include "modules/webdatabase/SQLTransactionStateMachine.h"
@@ -40,24 +39,28 @@
namespace blink {
-class AbstractSQLTransactionBackend;
class Database;
class ExceptionState;
class SQLErrorData;
class SQLStatementCallback;
class SQLStatementErrorCallback;
+class SQLTransactionBackend;
class SQLTransactionCallback;
class SQLTransactionErrorCallback;
class SQLValue;
class VoidCallback;
-class SQLTransaction FINAL : public AbstractSQLTransaction, public SQLTransactionStateMachine<SQLTransaction>, public ScriptWrappable {
+class SQLTransaction FINAL
+ : public ThreadSafeRefCountedWillBeGarbageCollectedFinalized<SQLTransaction>
+ , public SQLTransactionStateMachine<SQLTransaction>
+ , public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
static PassRefPtrWillBeRawPtr<SQLTransaction> create(Database*, PassOwnPtrWillBeRawPtr<SQLTransactionCallback>,
PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>,
bool readOnly);
- virtual void trace(Visitor*) OVERRIDE;
+ ~SQLTransaction();
+ void trace(Visitor*);
void performPendingCallback();
@@ -68,6 +71,13 @@ public:
PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback> releaseErrorCallback();
+ // APIs called from the backend published:
+ void requestTransitToState(SQLTransactionState);
+ bool hasCallback() const;
+ bool hasSuccessCallback() const;
+ bool hasErrorCallback() const;
+ void setBackend(SQLTransactionBackend*);
+
private:
SQLTransaction(Database*, PassOwnPtrWillBeRawPtr<SQLTransactionCallback>,
PassOwnPtrWillBeRawPtr<VoidCallback> successCallback, PassOwnPtrWillBeRawPtr<SQLTransactionErrorCallback>,
@@ -75,13 +85,6 @@ private:
void clearCallbackWrappers();
- // APIs called from the backend published via AbstractSQLTransaction:
- virtual void requestTransitToState(SQLTransactionState) OVERRIDE;
- virtual bool hasCallback() const OVERRIDE;
- virtual bool hasSuccessCallback() const OVERRIDE;
- virtual bool hasErrorCallback() const OVERRIDE;
- virtual void setBackend(AbstractSQLTransactionBackend*) OVERRIDE;
-
// State Machine functions:
virtual StateFunction stateFunctionFor(SQLTransactionState) OVERRIDE;
bool computeNextStateAndCleanupIfNeeded();
@@ -99,7 +102,7 @@ private:
SQLTransactionState nextStateForTransactionError();
RefPtrWillBeMember<Database> m_database;
- RefPtrWillBeMember<AbstractSQLTransactionBackend> m_backend;
+ RefPtrWillBeMember<SQLTransactionBackend> m_backend;
SQLCallbackWrapper<SQLTransactionCallback> m_callbackWrapper;
SQLCallbackWrapper<VoidCallback> m_successCallbackWrapper;
SQLCallbackWrapper<SQLTransactionErrorCallback> m_errorCallbackWrapper;

Powered by Google App Engine
This is Rietveld 408576698