Remove last vestiges of IDBBackingStore* from IDBTransactionBackend.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Nov 2013 23:22:13 +0000 (23:22 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Nov 2013 23:22:13 +0000 (23:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124436

Reviewed by Tim Horton.

Source/WebCore:

* Modules/indexeddb/IDBFactoryBackendInterface.h: Removed createCursorBackend.
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed createCursorBackend.
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed createCursorBackend.

* Modules/indexeddb/IDBCursorBackend.h:

* Modules/indexeddb/IDBTransactionBackend.cpp:
* Modules/indexeddb/IDBTransactionBackend.h:

* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::openCursor):

Source/WebKit2:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp: Removed createCursorBackend.
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@159362 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBCursorBackend.h
Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp
Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h

index bc2db09..f1c10a1 100644 (file)
@@ -1,5 +1,24 @@
 2013-11-15  Brady Eidson  <beidson@apple.com>
 
+        Remove last vestiges of IDBBackingStore* from IDBTransactionBackend.
+        https://bugs.webkit.org/show_bug.cgi?id=124436
+
+        Reviewed by Tim Horton.
+
+        * Modules/indexeddb/IDBFactoryBackendInterface.h: Removed createCursorBackend.
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed createCursorBackend.
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed createCursorBackend.
+
+        * Modules/indexeddb/IDBCursorBackend.h:
+
+        * Modules/indexeddb/IDBTransactionBackend.cpp:
+        * Modules/indexeddb/IDBTransactionBackend.h:
+
+        * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
+        (WebCore::IDBServerConnectionLevelDB::openCursor):
+
+2013-11-15  Brady Eidson  <beidson@apple.com>
+
         Make IDBIndexWriter a LevelDB specific concept
         https://bugs.webkit.org/show_bug.cgi?id=124434
 
index 2b8cdf5..5fe7245 100644 (file)
@@ -29,6 +29,7 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
+#include "IDBBackingStoreCursorInterface.h"
 #include "IDBDatabaseBackend.h"
 #include "IDBTransactionBackend.h"
 #include "SharedBuffer.h"
index 214312e..0614051 100644 (file)
@@ -67,8 +67,6 @@ public:
     virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) = 0;
 
     virtual PassRefPtr<IDBTransactionBackend> maybeCreateTransactionBackend(IDBDatabaseBackend*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode) = 0;
-
-    virtual PassRefPtr<IDBCursorBackend> createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t objectStoreId) = 0;
 };
 
 } // namespace WebCore
index 7c31286..29a5bc4 100644 (file)
@@ -352,11 +352,6 @@ void IDBTransactionBackend::scheduleClearObjectStoreOperation(int64_t objectStor
     scheduleTask(ClearObjectStoreOperation::create(this, objectStoreId, callbacks));
 }
 
-PassRefPtr<IDBCursorBackend> IDBTransactionBackend::createCursorBackend(IDBBackingStoreCursorInterface& cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, int64_t objectStoreId)
-{
-    return m_database->factoryBackend().createCursorBackend(*this, cursor, cursorType, taskType, objectStoreId);
-}
-
 };
 
 #endif // ENABLE(INDEXED_DATABASE)
index 0e07f20..7244965 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(INDEXED_DATABASE)
 
-#include "IDBBackingStoreCursorInterface.h"
 #include "IDBDatabaseBackend.h"
 #include "IDBDatabaseError.h"
 #include "IDBOperation.h"
@@ -79,8 +78,6 @@ public:
     void scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>);
     void scheduleClearObjectStoreOperation(int64_t objectStoreId, PassRefPtr<IDBCallbacks>);
 
-    PassRefPtr<IDBCursorBackend> createCursorBackend(IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t objectStoreId);
-
     int64_t id() const { return m_id; }
 
 private:
index ec2af6c..ff8a280 100644 (file)
@@ -200,12 +200,6 @@ PassRefPtr<IDBTransactionBackend> IDBFactoryBackendLevelDB::maybeCreateTransacti
     return IDBTransactionBackend::create(static_cast<IDBDatabaseBackend*>(backend), transactionId, databaseCallbacks, objectStoreIds, mode);
 }
 
-PassRefPtr<IDBCursorBackend> IDBFactoryBackendLevelDB::createCursorBackend(IDBTransactionBackend& transactionBackend, IDBBackingStoreCursorInterface& backingStoreCursor, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, int64_t objectStoreId)
-{
-    return IDBCursorBackend::create(&backingStoreCursor, cursorType, taskType, &transactionBackend, objectStoreId);
-}
-
-
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE) && USE(LEVELDB)
index 13200b7..6a14ce4 100644 (file)
@@ -65,8 +65,6 @@ public:
 
     virtual PassRefPtr<IDBTransactionBackend> maybeCreateTransactionBackend(IDBDatabaseBackend*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode) OVERRIDE FINAL;
 
-    virtual PassRefPtr<IDBCursorBackend> createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t objectStoreId);
-
 protected:
     virtual PassRefPtr<IDBBackingStoreLevelDB> openBackingStore(const SecurityOrigin&, const String& dataDir);
 
index 338e7b5..431567c 100644 (file)
@@ -32,6 +32,7 @@
 #include "IDBBackingStoreLevelDB.h"
 #include "IDBBackingStoreTransactionLevelDB.h"
 #include "IDBCursorBackend.h"
+#include "IDBFactoryBackendLevelDB.h"
 #include "IDBIndexWriterLevelDB.h"
 #include <wtf/MainThread.h>
 
@@ -453,7 +454,8 @@ void IDBServerConnectionLevelDB::openCursor(IDBTransactionBackend& transaction,
 
     IDBDatabaseBackend::TaskType taskType(static_cast<IDBDatabaseBackend::TaskType>(operation.taskType()));
 
-    RefPtr<IDBCursorBackend> cursor = transaction.createCursorBackend(*backingStoreCursor, operation.cursorType(), taskType, operation.objectStoreID());
+    RefPtr<IDBCursorBackend> cursor = IDBCursorBackend::create(backingStoreCursor, operation.cursorType(), taskType, &transaction, operation.objectStoreID());
+
     operation.callbacks()->onSuccess(cursor, cursor->key(), cursor->primaryKey(), cursor->value());
 
     EMPTY_ASYNC_COMPLETION_CALLBACK(completionCallback);
index fe0d521..1a63cc7 100644 (file)
@@ -1,3 +1,13 @@
+2013-11-15  Brady Eidson  <beidson@apple.com>
+
+        Remove last vestiges of IDBBackingStore* from IDBTransactionBackend.
+        https://bugs.webkit.org/show_bug.cgi?id=124436
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp: Removed createCursorBackend.
+        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
+
 2013-11-15  Dan Bernstein  <mitz@apple.com>
 
         Give the policy client the originating frame of a navigation action
index a0c109b..2982659 100644 (file)
@@ -106,12 +106,6 @@ PassRefPtr<IDBTransactionBackend> WebIDBFactoryBackend::maybeCreateTransactionBa
     return 0;
 }
 
-PassRefPtr<IDBCursorBackend> WebIDBFactoryBackend::createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t)
-{
-    notImplemented();
-    return 0;
-}
-
 } // namespace WebKit
 
 #endif // ENABLE(DATABASE_PROCESS)
index ae991c8..d0cb780 100644 (file)
@@ -47,8 +47,6 @@ public:
 
     virtual PassRefPtr<WebCore::IDBTransactionBackend> maybeCreateTransactionBackend(WebCore::IDBDatabaseBackend*, int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const Vector<int64_t>&, WebCore::IndexedDB::TransactionMode) OVERRIDE;
 
-    virtual PassRefPtr<WebCore::IDBCursorBackend> createCursorBackend(WebCore::IDBTransactionBackend&, WebCore::IDBBackingStoreCursorInterface&, WebCore::IndexedDB::CursorType, WebCore::IDBDatabaseBackend::TaskType, int64_t objectStoreId) OVERRIDE;
-
 private:
     explicit WebIDBFactoryBackend(const String& databaseDirectoryIdentifier);
 };