Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Nov 2013 06:27:23 +0000 (06:27 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 9 Nov 2013 06:27:23 +0000 (06:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=124088

Source/WebCore:

Reviewed by Tim Horton.

Source/WebKit2:

Reviewed by Tim Horton.

This abstraction is no longer meaningful in its current form in WebCore.
The current groundwork for the WK2 DatabaseProcess relied on this abstraction,
but that will be reworked in a future patch.

* DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::maybeCreateTransactionBackend):
(WebKit::WebIDBFactoryBackend::createCursorBackend):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:

* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
(WebKit::WebProcessIDBDatabaseBackend::put):
(WebKit::WebProcessIDBDatabaseBackend::openCursor):
* WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:

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

42 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/indexeddb/IDBBackingStoreInterface.h
Source/WebCore/Modules/indexeddb/IDBCallbacks.h
Source/WebCore/Modules/indexeddb/IDBCursor.cpp
Source/WebCore/Modules/indexeddb/IDBCursorBackend.cpp
Source/WebCore/Modules/indexeddb/IDBCursorBackend.h
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBDatabase.h
Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp [moved from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp with 79% similarity]
Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h [moved from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h with 51% similarity]
Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h [deleted file]
Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h
Source/WebCore/Modules/indexeddb/IDBIndex.cpp
Source/WebCore/Modules/indexeddb/IDBIndex.h
Source/WebCore/Modules/indexeddb/IDBIndexWriter.h
Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
Source/WebCore/Modules/indexeddb/IDBObjectStore.h
Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp
Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h
Source/WebCore/Modules/indexeddb/IDBPendingDeleteCall.h
Source/WebCore/Modules/indexeddb/IDBRequest.cpp
Source/WebCore/Modules/indexeddb/IDBRequest.h
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/indexeddb/IDBTransaction.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackend.cpp
Source/WebCore/Modules/indexeddb/IDBTransactionBackend.h
Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.cpp
Source/WebCore/Modules/indexeddb/IDBTransactionBackendOperations.h
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBLevelDBCoding.h
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebKit2/ChangeLog
Source/WebKit2/DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h

index a9e218a2170da182a110c62f0de2ee415dc72f4b..5245e818b41437f3100448cf11c131fa5ab549bc 100644 (file)
@@ -764,7 +764,7 @@ set(WebCore_SOURCES
     Modules/indexeddb/IDBCursorBackend.cpp
     Modules/indexeddb/IDBCursorWithValue.cpp
     Modules/indexeddb/IDBDatabase.cpp
-    Modules/indexeddb/IDBDatabaseBackendImpl.cpp
+    Modules/indexeddb/IDBDatabaseBackend.cpp
     Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp
     Modules/indexeddb/IDBDatabaseException.cpp
     Modules/indexeddb/IDBEventDispatcher.cpp
index e0bd15d2328a81c496119dc5c07821860b0b3ce2..34a0d7044f8b80a72fb43454e616069916e83c8c 100644 (file)
@@ -1,3 +1,49 @@
+2013-11-08  Brady Eidson  <beidson@apple.com>
+
+        Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
+        https://bugs.webkit.org/show_bug.cgi?id=124088
+
+        Reviewed by Tim Horton.
++
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
+
+        * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
+        * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
+
+        * Modules/indexeddb/IDBBackingStoreInterface.h:
+        * Modules/indexeddb/IDBCallbacks.h:
+        * Modules/indexeddb/IDBCursor.cpp:
+        * Modules/indexeddb/IDBCursorBackend.cpp:
+        * Modules/indexeddb/IDBCursorBackend.h:
+        * Modules/indexeddb/IDBDatabase.cpp:
+        * Modules/indexeddb/IDBDatabase.h:
+        * Modules/indexeddb/IDBFactoryBackendInterface.h:
+        * Modules/indexeddb/IDBIndex.cpp:
+        * Modules/indexeddb/IDBIndex.h:
+        * Modules/indexeddb/IDBIndexWriter.h:
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBOpenDBRequest.cpp:
+        * Modules/indexeddb/IDBOpenDBRequest.h:
+        * Modules/indexeddb/IDBPendingDeleteCall.h:
+        * Modules/indexeddb/IDBRequest.cpp:
+        * Modules/indexeddb/IDBRequest.h:
+        * Modules/indexeddb/IDBTransaction.cpp:
+        * Modules/indexeddb/IDBTransaction.h:
+        * Modules/indexeddb/IDBTransactionBackend.cpp:
+        * Modules/indexeddb/IDBTransactionBackend.h:
+        * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
+        * Modules/indexeddb/IDBTransactionBackendOperations.h:
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
+        * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
+
 2013-11-08  Andreas Kling  <akling@apple.com>
 
         Reindent JSDOMBinding.h (finally.)
index bc846f49891bfe9ab52c340a4a73dda2e8e18e08..fb0169832e2f795f11d029765349bf2e79be6b0c 100644 (file)
@@ -1800,9 +1800,8 @@ webcore_modules_sources += \
        Source/WebCore/Modules/indexeddb/IDBCursor.h \
        Source/WebCore/Modules/indexeddb/IDBCursorWithValue.cpp \
        Source/WebCore/Modules/indexeddb/IDBCursorWithValue.h \
-       Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp \
-       Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h \
-       Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h \
+       Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp \
+       Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h \
        Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacks.h \
        Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp \
        Source/WebCore/Modules/indexeddb/IDBDatabaseCallbacksImpl.h \
index b920864d3b9d29b14a99f423a554efd3c58f0a2f..0d134950fecf81ad20327bedfe08382d072349fc 100644 (file)
@@ -28,7 +28,7 @@
 
 #include "IDBBackingStoreCursorInterface.h"
 #include "IDBBackingStoreTransactionInterface.h"
-#include "IDBDatabaseBackendInterface.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBMetadata.h"
 #include "IndexedDB.h"
 
@@ -91,7 +91,7 @@ public:
     virtual bool getKeyGeneratorCurrentNumber(IDBBackingStoreTransactionInterface&, int64_t databaseId, int64_t objectStoreId, int64_t& keyGeneratorCurrentNumber) = 0;
     virtual bool maybeUpdateKeyGeneratorCurrentNumber(IDBBackingStoreTransactionInterface&, int64_t databaseId, int64_t objectStoreId, int64_t newState, bool checkCurrent) = 0;
 
-    virtual bool makeIndexWriters(IDBTransactionBackend&, int64_t databaseId, const IDBObjectStoreMetadata&, IDBKey& primaryKey, bool keyWasGenerated, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&, Vector<RefPtr<IDBIndexWriter>>& indexWriters, String* errorMessage, bool& completed) = 0;
+    virtual bool makeIndexWriters(IDBTransactionBackend&, int64_t databaseId, const IDBObjectStoreMetadata&, IDBKey& primaryKey, bool keyWasGenerated, const Vector<int64_t>& indexIds, const Vector<Vector<RefPtr<IDBKey>>>&, Vector<RefPtr<IDBIndexWriter>>& indexWriters, String* errorMessage, bool& completed) = 0;
 
     virtual PassRefPtr<IDBKey> generateKey(IDBTransactionBackend&, int64_t databaseId, int64_t objectStoreId) = 0;
     virtual bool updateKeyGenerator(IDBTransactionBackend&, int64_t databaseId, int64_t objectStoreId, const IDBKey&, bool checkCurrent) = 0;
index 9ed390a1692dd168b5bd991c25618bdcfa5ca1b2..15382bcb2466ad1e059aca1b9526efa702ac8f1c 100644 (file)
@@ -40,7 +40,7 @@
 namespace WebCore {
 class DOMStringList;
 class IDBCursorBackend;
-class IDBDatabaseBackendInterface;
+class IDBDatabaseBackend;
 
 struct IDBDatabaseMetadata;
 
@@ -72,8 +72,8 @@ public:
     // From IDBFactory.open()/deleteDatabase()
     virtual void onBlocked(uint64_t /* existingVersion */) { ASSERT_NOT_REACHED(); }
     // From IDBFactory.open()
-    virtual void onUpgradeNeeded(uint64_t /* oldVersion */, PassRefPtr<IDBDatabaseBackendInterface>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); }
-    virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); }
+    virtual void onUpgradeNeeded(uint64_t /* oldVersion */, PassRefPtr<IDBDatabaseBackend>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); }
+    virtual void onSuccess(PassRefPtr<IDBDatabaseBackend>, const IDBDatabaseMetadata&) { ASSERT_NOT_REACHED(); }
 };
 
 } // namespace WebCore
index 1266dd3c2803e6e035c32901838879d7195c8911..ef06544fe104c5afbfdb15f0bdff3f9524a67651 100644 (file)
@@ -149,7 +149,7 @@ PassRefPtr<IDBRequest> IDBCursor::update(JSC::ExecState* state, ScriptValue& val
         }
     }
 
-    return objectStore->put(IDBDatabaseBackendInterface::CursorUpdate, IDBAny::create(this), state, value, m_currentPrimaryKey, ec);
+    return objectStore->put(IDBDatabaseBackend::CursorUpdate, IDBAny::create(this), state, value, m_currentPrimaryKey, ec);
 }
 
 void IDBCursor::advance(unsigned long count, ExceptionCode& ec)
index f164e3812c4a8cab0957e588908d7954c1a1953f..27d647e9ab6ce33f3824c3904696f6d0e5a0f56d 100644 (file)
@@ -30,7 +30,7 @@
 
 #include "IDBBackingStoreInterface.h"
 #include "IDBCallbacks.h"
-#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBDatabaseCallbacks.h"
 #include "IDBDatabaseError.h"
 #include "IDBDatabaseException.h"
@@ -101,7 +101,7 @@ private:
     RefPtr<IDBCallbacks> m_callbacks;
 };
 
-IDBCursorBackend::IDBCursorBackend(PassRefPtr<IDBBackingStoreCursorInterface> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackend* transaction, int64_t objectStoreId)
+IDBCursorBackend::IDBCursorBackend(PassRefPtr<IDBBackingStoreCursorInterface> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, IDBTransactionBackend* transaction, int64_t objectStoreId)
     : m_taskType(taskType)
     , m_cursorType(cursorType)
     , m_database(&(transaction->database()))
index 314c5bf0fadbbe6396aa3abe54f62818aeaa6648..327967c00895d4aee7863f265a3d4263e4f62bfc 100644 (file)
@@ -30,7 +30,7 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "IDBBackingStoreInterface.h"
-#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBTransactionBackend.h"
 #include "SharedBuffer.h"
 #include <wtf/OwnPtr.h>
@@ -45,9 +45,9 @@ class IDBCursorBackend : public RefCounted<IDBCursorBackend> {
 public:
     static PassRefPtr<IDBCursorBackend> create(PassRefPtr<IDBBackingStoreCursorInterface> cursor, IndexedDB::CursorType cursorType, IDBTransactionBackend* transaction, int64_t objectStoreId)
     {
-        return adoptRef(new IDBCursorBackend(cursor, cursorType, IDBDatabaseBackendInterface::NormalTask, transaction, objectStoreId));
+        return adoptRef(new IDBCursorBackend(cursor, cursorType, IDBDatabaseBackend::NormalTask, transaction, objectStoreId));
     }
-    static PassRefPtr<IDBCursorBackend> create(PassRefPtr<IDBBackingStoreCursorInterface> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackend* transaction, int64_t objectStoreId)
+    static PassRefPtr<IDBCursorBackend> create(PassRefPtr<IDBBackingStoreCursorInterface> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, IDBTransactionBackend* transaction, int64_t objectStoreId)
     {
         return adoptRef(new IDBCursorBackend(cursor, cursorType, taskType, transaction, objectStoreId));
     }
@@ -67,15 +67,15 @@ public:
     void close();
 
 private:
-    IDBCursorBackend(PassRefPtr<IDBBackingStoreCursorInterface>, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, IDBTransactionBackend*, int64_t objectStoreId);
+    IDBCursorBackend(PassRefPtr<IDBBackingStoreCursorInterface>, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, IDBTransactionBackend*, int64_t objectStoreId);
 
     class CursorIterationOperation;
     class CursorAdvanceOperation;
     class CursorPrefetchIterationOperation;
 
-    IDBDatabaseBackendInterface::TaskType m_taskType;
+    IDBDatabaseBackend::TaskType m_taskType;
     IndexedDB::CursorType m_cursorType;
-    const RefPtr<IDBDatabaseBackendInterface> m_database;
+    const RefPtr<IDBDatabaseBackend> m_database;
     RefPtr<IDBTransactionBackend> m_transaction;
     const int64_t m_objectStoreId;
 
index c3bf15e37718b7b914002e015de291c13bc407bd..c53c3613ea3348605c6ffc4ec29f8977c8f81572 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<IDBDatabase> IDBDatabase::create(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseBackendInterface> database, PassRefPtr<IDBDatabaseCallbacks> callbacks)
+PassRefPtr<IDBDatabase> IDBDatabase::create(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseBackend> database, PassRefPtr<IDBDatabaseCallbacks> callbacks)
 {
     RefPtr<IDBDatabase> idbDatabase(adoptRef(new IDBDatabase(context, database, callbacks)));
     idbDatabase->suspendIfNeeded();
     return idbDatabase.release();
 }
 
-IDBDatabase::IDBDatabase(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseBackendInterface> backend, PassRefPtr<IDBDatabaseCallbacks> callbacks)
+IDBDatabase::IDBDatabase(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseBackend> backend, PassRefPtr<IDBDatabaseCallbacks> callbacks)
     : ActiveDOMObject(context)
     , m_backend(backend)
     , m_closePending(false)
@@ -185,7 +185,7 @@ PassRefPtr<IDBObjectStore> IDBDatabase::createObjectStore(const String& name, co
     int64_t objectStoreId = m_metadata.maxObjectStoreId + 1;
     m_backend->createObjectStore(m_versionChangeTransaction->id(), objectStoreId, name, keyPath, autoIncrement);
 
-    IDBObjectStoreMetadata metadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackendInterface::MinimumIndexId);
+    IDBObjectStoreMetadata metadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
     RefPtr<IDBObjectStore> objectStore = IDBObjectStore::create(metadata, m_versionChangeTransaction.get());
     m_metadata.objectStores.set(metadata.id, metadata);
     ++m_metadata.maxObjectStoreId;
index bd9255f5b1ca3cf6b9ea325cbe64025db6af94a7..adf74d096508b13322133de7e38263fefe44a2da 100644 (file)
@@ -51,7 +51,7 @@ typedef int ExceptionCode;
 
 class IDBDatabase FINAL : public RefCounted<IDBDatabase>, public ScriptWrappable, public EventTargetWithInlineData, public ActiveDOMObject {
 public:
-    static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>);
+    static PassRefPtr<IDBDatabase> create(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackend>, PassRefPtr<IDBDatabaseCallbacks>);
     ~IDBDatabase();
 
     void setMetadata(const IDBDatabaseMetadata& metadata) { m_metadata = metadata; }
@@ -101,7 +101,7 @@ public:
         return findObjectStoreId(name) != IDBObjectStoreMetadata::InvalidId;
     }
 
-    IDBDatabaseBackendInterface* backend() const { return m_backend.get(); }
+    IDBDatabaseBackend* backend() const { return m_backend.get(); }
 
     static int64_t nextTransactionId();
 
@@ -109,7 +109,7 @@ public:
     using RefCounted<IDBDatabase>::deref;
 
 private:
-    IDBDatabase(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackendInterface>, PassRefPtr<IDBDatabaseCallbacks>);
+    IDBDatabase(ScriptExecutionContext*, PassRefPtr<IDBDatabaseBackend>, PassRefPtr<IDBDatabaseCallbacks>);
 
     // ActiveDOMObject
     virtual void stop() OVERRIDE;
@@ -121,7 +121,7 @@ private:
     void closeConnection();
 
     IDBDatabaseMetadata m_metadata;
-    RefPtr<IDBDatabaseBackendInterface> m_backend;
+    RefPtr<IDBDatabaseBackend> m_backend;
     RefPtr<IDBTransaction> m_versionChangeTransaction;
     typedef HashMap<int64_t, IDBTransaction*> TransactionMap;
     TransactionMap m_transactions;
similarity index 79%
rename from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp
rename to Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp
index 7161b700bbbb57df438a97f08c3576a196542c29..b4709d9a37e69ffc1d688693eda93c161d6f741b 100644 (file)
@@ -24,7 +24,7 @@
  */
 
 #include "config.h"
-#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseBackend.h"
 
 #if ENABLE(INDEXED_DATABASE)
 
 
 namespace WebCore {
 
-PassRefPtr<IDBDatabaseBackendImpl> IDBDatabaseBackendImpl::create(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
+PassRefPtr<IDBDatabaseBackend> IDBDatabaseBackend::create(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
 {
-    RefPtr<IDBDatabaseBackendImpl> backend = adoptRef(new IDBDatabaseBackendImpl(name, backingStore, factory, uniqueIdentifier));
+    RefPtr<IDBDatabaseBackend> backend = adoptRef(new IDBDatabaseBackend(name, backingStore, factory, uniqueIdentifier));
     backend->openInternalAsync();
     
     return backend.release();
 }
 
-IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
+IDBDatabaseBackend::IDBDatabaseBackend(const String& name, IDBBackingStoreInterface* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
     : m_backingStore(backingStore)
     , m_metadata(name, InvalidId, 0, InvalidId)
     , m_identifier(uniqueIdentifier)
@@ -63,7 +63,7 @@ IDBDatabaseBackendImpl::IDBDatabaseBackendImpl(const String& name, IDBBackingSto
     ASSERT(!m_metadata.name.isNull());
 }
 
-void IDBDatabaseBackendImpl::addObjectStore(const IDBObjectStoreMetadata& objectStore, int64_t newMaxObjectStoreId)
+void IDBDatabaseBackend::addObjectStore(const IDBObjectStoreMetadata& objectStore, int64_t newMaxObjectStoreId)
 {
     ASSERT(!m_metadata.objectStores.contains(objectStore.id));
     if (newMaxObjectStoreId != IDBObjectStoreMetadata::InvalidId) {
@@ -73,13 +73,13 @@ void IDBDatabaseBackendImpl::addObjectStore(const IDBObjectStoreMetadata& object
     m_metadata.objectStores.set(objectStore.id, objectStore);
 }
 
-void IDBDatabaseBackendImpl::removeObjectStore(int64_t objectStoreId)
+void IDBDatabaseBackend::removeObjectStore(int64_t objectStoreId)
 {
     ASSERT(m_metadata.objectStores.contains(objectStoreId));
     m_metadata.objectStores.remove(objectStoreId);
 }
 
-void IDBDatabaseBackendImpl::addIndex(int64_t objectStoreId, const IDBIndexMetadata& index, int64_t newMaxIndexId)
+void IDBDatabaseBackend::addIndex(int64_t objectStoreId, const IDBIndexMetadata& index, int64_t newMaxIndexId)
 {
     ASSERT(m_metadata.objectStores.contains(objectStoreId));
     IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
@@ -93,7 +93,7 @@ void IDBDatabaseBackendImpl::addIndex(int64_t objectStoreId, const IDBIndexMetad
     m_metadata.objectStores.set(objectStoreId, objectStore);
 }
 
-void IDBDatabaseBackendImpl::removeIndex(int64_t objectStoreId, int64_t indexId)
+void IDBDatabaseBackend::removeIndex(int64_t objectStoreId, int64_t indexId)
 {
     ASSERT(m_metadata.objectStores.contains(objectStoreId));
     IDBObjectStoreMetadata objectStore = m_metadata.objectStores.get(objectStoreId);
@@ -103,15 +103,15 @@ void IDBDatabaseBackendImpl::removeIndex(int64_t objectStoreId, int64_t indexId)
     m_metadata.objectStores.set(objectStoreId, objectStore);
 }
 
-void IDBDatabaseBackendImpl::openInternalAsync()
+void IDBDatabaseBackend::openInternalAsync()
 {
-    RefPtr<IDBDatabaseBackendImpl> self = this;
+    RefPtr<IDBDatabaseBackend> self = this;
     m_backingStore->getOrEstablishIDBDatabaseMetadata(m_metadata.name, [self](const IDBDatabaseMetadata& metadata, bool success) {
         self->didOpenInternalAsync(metadata, success);
     });
 }
 
-void IDBDatabaseBackendImpl::didOpenInternalAsync(const IDBDatabaseMetadata& metadata, bool success)
+void IDBDatabaseBackend::didOpenInternalAsync(const IDBDatabaseMetadata& metadata, bool success)
 {
     if (!success) {
         processPendingOpenCalls(false);
@@ -123,33 +123,33 @@ void IDBDatabaseBackendImpl::didOpenInternalAsync(const IDBDatabaseMetadata& met
     processPendingCalls();
 }
 
-IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl()
+IDBDatabaseBackend::~IDBDatabaseBackend()
 {
 }
 
-IDBBackingStoreInterface* IDBDatabaseBackendImpl::backingStore() const
+IDBBackingStoreInterface* IDBDatabaseBackend::backingStore() const
 {
     return m_backingStore.get();
 }
 
-void IDBDatabaseBackendImpl::createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
+void IDBDatabaseBackend::createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::createObjectStore");
+    LOG(StorageAPI, "IDBDatabaseBackend::createObjectStore");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
     ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
 
     ASSERT(!m_metadata.objectStores.contains(objectStoreId));
-    IDBObjectStoreMetadata objectStoreMetadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackendInterface::MinimumIndexId);
+    IDBObjectStoreMetadata objectStoreMetadata(name, objectStoreId, keyPath, autoIncrement, IDBDatabaseBackend::MinimumIndexId);
 
     transaction->scheduleCreateObjectStoreOperation(objectStoreMetadata);
     addObjectStore(objectStoreMetadata, objectStoreId);
 }
 
-void IDBDatabaseBackendImpl::deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
+void IDBDatabaseBackend::deleteObjectStore(int64_t transactionId, int64_t objectStoreId)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::deleteObjectStore");
+    LOG(StorageAPI, "IDBDatabaseBackend::deleteObjectStore");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -162,9 +162,9 @@ void IDBDatabaseBackendImpl::deleteObjectStore(int64_t transactionId, int64_t ob
     removeObjectStore(objectStoreId);
 }
 
-void IDBDatabaseBackendImpl::createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry)
+void IDBDatabaseBackend::createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath& keyPath, bool unique, bool multiEntry)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::createIndex");
+    LOG(StorageAPI, "IDBDatabaseBackend::createIndex");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -181,9 +181,9 @@ void IDBDatabaseBackendImpl::createIndex(int64_t transactionId, int64_t objectSt
     addIndex(objectStoreId, indexMetadata, indexId);
 }
 
-void IDBDatabaseBackendImpl::deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId)
+void IDBDatabaseBackend::deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::deleteIndex");
+    LOG(StorageAPI, "IDBDatabaseBackend::deleteIndex");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -200,30 +200,30 @@ void IDBDatabaseBackendImpl::deleteIndex(int64_t transactionId, int64_t objectSt
     removeIndex(objectStoreId, indexId);
 }
 
-void IDBDatabaseBackendImpl::commit(int64_t transactionId)
+void IDBDatabaseBackend::commit(int64_t transactionId)
 {
     // The frontend suggests that we commit, but we may have previously initiated an abort, and so have disposed of the transaction. onAbort has already been dispatched to the frontend, so it will find out about that asynchronously.
     if (m_transactions.contains(transactionId))
         m_transactions.get(transactionId)->commit();
 }
 
-void IDBDatabaseBackendImpl::abort(int64_t transactionId)
+void IDBDatabaseBackend::abort(int64_t transactionId)
 {
     // If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
     if (m_transactions.contains(transactionId))
         m_transactions.get(transactionId)->abort();
 }
 
-void IDBDatabaseBackendImpl::abort(int64_t transactionId, PassRefPtr<IDBDatabaseError> error)
+void IDBDatabaseBackend::abort(int64_t transactionId, PassRefPtr<IDBDatabaseError> error)
 {
     // If the transaction is unknown, then it has already been aborted by the backend before this call so it is safe to ignore it.
     if (m_transactions.contains(transactionId))
         m_transactions.get(transactionId)->abort(error);
 }
 
-void IDBDatabaseBackendImpl::get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, bool keyOnly, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackend::get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, bool keyOnly, PassRefPtr<IDBCallbacks> callbacks)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::get");
+    LOG(StorageAPI, "IDBDatabaseBackend::get");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -231,9 +231,9 @@ void IDBDatabaseBackendImpl::get(int64_t transactionId, int64_t objectStoreId, i
     transaction->scheduleGetOperation(m_metadata, objectStoreId, indexId, keyRange, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, callbacks);
 }
 
-void IDBDatabaseBackendImpl::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+void IDBDatabaseBackend::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::put");
+    LOG(StorageAPI, "IDBDatabaseBackend::put");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -246,9 +246,9 @@ void IDBDatabaseBackendImpl::put(int64_t transactionId, int64_t objectStoreId, P
     transaction->schedulePutOperation(objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys);
 }
 
-void IDBDatabaseBackendImpl::setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+void IDBDatabaseBackend::setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::setIndexKeys");
+    LOG(StorageAPI, "IDBDatabaseBackend::setIndexKeys");
     ASSERT(prpPrimaryKey);
 
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
@@ -292,9 +292,9 @@ void IDBDatabaseBackendImpl::setIndexKeys(int64_t transactionId, int64_t objectS
     }
 }
 
-void IDBDatabaseBackendImpl::setIndexesReady(int64_t transactionId, int64_t, const Vector<int64_t>& indexIds)
+void IDBDatabaseBackend::setIndexesReady(int64_t transactionId, int64_t, const Vector<int64_t>& indexIds)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::setIndexesReady");
+    LOG(StorageAPI, "IDBDatabaseBackend::setIndexesReady");
 
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
@@ -303,9 +303,9 @@ void IDBDatabaseBackendImpl::setIndexesReady(int64_t transactionId, int64_t, con
     transaction->scheduleSetIndexesReadyOperation(indexIds.size());
 }
 
-void IDBDatabaseBackendImpl::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, bool keyOnly, TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackend::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, bool keyOnly, TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::openCursor");
+    LOG(StorageAPI, "IDBDatabaseBackend::openCursor");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -313,9 +313,9 @@ void IDBDatabaseBackendImpl::openCursor(int64_t transactionId, int64_t objectSto
     transaction->scheduleOpenCursorOperation(objectStoreId, indexId, keyRange, direction, keyOnly ? IndexedDB::CursorKeyOnly : IndexedDB::CursorKeyAndValue, taskType, callbacks);
 }
 
-void IDBDatabaseBackendImpl::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackend::count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::count");
+    LOG(StorageAPI, "IDBDatabaseBackend::count");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -325,9 +325,9 @@ void IDBDatabaseBackendImpl::count(int64_t transactionId, int64_t objectStoreId,
 }
 
 
-void IDBDatabaseBackendImpl::deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackend::deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::deleteRange");
+    LOG(StorageAPI, "IDBDatabaseBackend::deleteRange");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -336,9 +336,9 @@ void IDBDatabaseBackendImpl::deleteRange(int64_t transactionId, int64_t objectSt
     transaction->scheduleDeleteRangeOperation(objectStoreId, keyRange, callbacks);
 }
 
-void IDBDatabaseBackendImpl::clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackend::clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
 {
-    LOG(StorageAPI, "IDBDatabaseBackendImpl::clear");
+    LOG(StorageAPI, "IDBDatabaseBackend::clear");
     IDBTransactionBackend* transaction = m_transactions.get(transactionId);
     if (!transaction)
         return;
@@ -347,7 +347,7 @@ void IDBDatabaseBackendImpl::clear(int64_t transactionId, int64_t objectStoreId,
     transaction->scheduleClearOperation(objectStoreId, callbacks);
 }
 
-void IDBDatabaseBackendImpl::transactionStarted(IDBTransactionBackend* transaction)
+void IDBDatabaseBackend::transactionStarted(IDBTransactionBackend* transaction)
 {
     if (transaction->mode() == IndexedDB::TransactionVersionChange) {
         ASSERT(!m_runningVersionChangeTransaction);
@@ -355,7 +355,7 @@ void IDBDatabaseBackendImpl::transactionStarted(IDBTransactionBackend* transacti
     }
 }
 
-void IDBDatabaseBackendImpl::transactionFinished(IDBTransactionBackend* rawTransaction)
+void IDBDatabaseBackend::transactionFinished(IDBTransactionBackend* rawTransaction)
 {
     RefPtr<IDBTransactionBackend> transaction = rawTransaction;
     ASSERT(m_transactions.contains(transaction->id()));
@@ -367,7 +367,7 @@ void IDBDatabaseBackendImpl::transactionFinished(IDBTransactionBackend* rawTrans
     }
 }
 
-void IDBDatabaseBackendImpl::transactionFinishedAndAbortFired(IDBTransactionBackend* rawTransaction)
+void IDBDatabaseBackend::transactionFinishedAndAbortFired(IDBTransactionBackend* rawTransaction)
 {
     RefPtr<IDBTransactionBackend> transaction = rawTransaction;
     if (transaction->mode() == IndexedDB::TransactionVersionChange) {
@@ -382,20 +382,20 @@ void IDBDatabaseBackendImpl::transactionFinishedAndAbortFired(IDBTransactionBack
     }
 }
 
-void IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired(IDBTransactionBackend* rawTransaction)
+void IDBDatabaseBackend::transactionFinishedAndCompleteFired(IDBTransactionBackend* rawTransaction)
 {
     RefPtr<IDBTransactionBackend> transaction = rawTransaction;
     if (transaction->mode() == IndexedDB::TransactionVersionChange)
         processPendingCalls();
 }
 
-size_t IDBDatabaseBackendImpl::connectionCount()
+size_t IDBDatabaseBackend::connectionCount()
 {
     // This does not include pending open calls, as those should not block version changes and deletes.
     return m_databaseCallbacksSet.size();
 }
 
-void IDBDatabaseBackendImpl::processPendingCalls()
+void IDBDatabaseBackend::processPendingCalls()
 {
     if (m_pendingSecondHalfOpen) {
         ASSERT(m_pendingSecondHalfOpen->version() == m_metadata.version);
@@ -433,7 +433,7 @@ void IDBDatabaseBackendImpl::processPendingCalls()
     processPendingOpenCalls(true);
 }
 
-void IDBDatabaseBackendImpl::processPendingOpenCalls(bool success)
+void IDBDatabaseBackend::processPendingOpenCalls(bool success)
 {
     // Open calls can be requeued if an open call started a version change transaction or deletes the database.
     Deque<OwnPtr<IDBPendingOpenCall>> pendingOpenCalls;
@@ -463,7 +463,7 @@ void IDBDatabaseBackendImpl::processPendingOpenCalls(bool success)
     }
 }
 
-void IDBDatabaseBackendImpl::createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, unsigned short mode)
+void IDBDatabaseBackend::createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, unsigned short mode)
 {
     RefPtr<IDBTransactionBackend> transaction = m_factory->maybeCreateTransactionBackend(this, transactionId, callbacks, objectStoreIds, static_cast<IndexedDB::TransactionMode>(mode));
 
@@ -474,7 +474,7 @@ void IDBDatabaseBackendImpl::createTransaction(int64_t transactionId, PassRefPtr
     m_transactions.add(transactionId, transaction.get());
 }
 
-void IDBDatabaseBackendImpl::openConnection(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
+void IDBDatabaseBackend::openConnection(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
 {
     RefPtr<IDBCallbacks> callbacks = prpCallbacks;
     RefPtr<IDBDatabaseCallbacks> databaseCallbacks = prpDatabaseCallbacks;
@@ -485,7 +485,7 @@ void IDBDatabaseBackendImpl::openConnection(PassRefPtr<IDBCallbacks> prpCallback
 }
 
 
-void IDBDatabaseBackendImpl::openConnectionInternal(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
+void IDBDatabaseBackend::openConnectionInternal(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, uint64_t version)
 {
     ASSERT(m_backingStore.get());
     ASSERT(m_pendingDeleteCalls.isEmpty());
@@ -531,7 +531,7 @@ void IDBDatabaseBackendImpl::openConnectionInternal(PassRefPtr<IDBCallbacks> prp
     callbacks->onSuccess(this, this->metadata());
 }
 
-void IDBDatabaseBackendImpl::runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, int64_t requestedVersion)
+void IDBDatabaseBackend::runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks> prpCallbacks, PassRefPtr<IDBDatabaseCallbacks> prpDatabaseCallbacks, int64_t transactionId, int64_t requestedVersion)
 {
     RefPtr<IDBCallbacks> callbacks = prpCallbacks;
     RefPtr<IDBDatabaseCallbacks> databaseCallbacks = prpDatabaseCallbacks;
@@ -566,7 +566,7 @@ void IDBDatabaseBackendImpl::runIntVersionChangeTransaction(PassRefPtr<IDBCallba
     m_databaseCallbacksSet.add(databaseCallbacks);
 }
 
-void IDBDatabaseBackendImpl::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallbacks)
+void IDBDatabaseBackend::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallbacks)
 {
     RefPtr<IDBCallbacks> callbacks = prpCallbacks;
     if (isDeleteDatabaseBlocked()) {
@@ -584,17 +584,17 @@ void IDBDatabaseBackendImpl::deleteDatabase(PassRefPtr<IDBCallbacks> prpCallback
     deleteDatabaseAsync(callbacks.release());
 }
 
-bool IDBDatabaseBackendImpl::isDeleteDatabaseBlocked()
+bool IDBDatabaseBackend::isDeleteDatabaseBlocked()
 {
     return connectionCount();
 }
 
-void IDBDatabaseBackendImpl::deleteDatabaseAsync(PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseBackend::deleteDatabaseAsync(PassRefPtr<IDBCallbacks> callbacks)
 {
     ASSERT(!isDeleteDatabaseBlocked());
     ASSERT(m_backingStore);
 
-    RefPtr<IDBDatabaseBackendImpl> self(this);
+    RefPtr<IDBDatabaseBackend> self(this);
     m_backingStore->deleteDatabase(m_metadata.name, [self, callbacks](bool success) {
         ASSERT(self->m_deleteCallbacksWaitingCompletion.contains(callbacks));
         self->m_deleteCallbacksWaitingCompletion.remove(callbacks);
@@ -615,7 +615,7 @@ void IDBDatabaseBackendImpl::deleteDatabaseAsync(PassRefPtr<IDBCallbacks> callba
     });
 }
 
-void IDBDatabaseBackendImpl::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks)
+void IDBDatabaseBackend::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks)
 {
     RefPtr<IDBDatabaseCallbacks> callbacks = prpCallbacks;
     ASSERT(m_databaseCallbacksSet.contains(callbacks));
@@ -630,7 +630,7 @@ void IDBDatabaseBackendImpl::close(PassRefPtr<IDBDatabaseCallbacks> prpCallbacks
         return;
 
     // processPendingCalls allows the inspector to process a pending open call
-    // and call close, reentering IDBDatabaseBackendImpl::close. Then the
+    // and call close, reentering IDBDatabaseBackend::close. Then the
     // backend would be removed both by the inspector closing its connection, and
     // by the connection that first called close.
     // To avoid that situation, don't proceed in case of reentrancy.
similarity index 51%
rename from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h
rename to Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.h
index 4ddbe0cbf3b6627c613d344b7c79b2d2538bb785..7aef8e0503b769140ae1be0e831da299eb538b8a 100644 (file)
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef IDBDatabaseBackendImpl_h
-#define IDBDatabaseBackendImpl_h
+#ifndef IDBDatabaseBackend_h
+#define IDBDatabaseBackend_h
 
-#include "IDBDatabaseBackendInterface.h"
+#include "IDBDatabaseBackend.h"
+#include "IDBDatabaseCallbacks.h"
 #include "IDBMetadata.h"
 #include "IDBPendingDeleteCall.h"
+#include "IDBPendingOpenCall.h"
 #include <stdint.h>
 #include <wtf/Deque.h>
 #include <wtf/HashMap.h>
@@ -41,38 +43,49 @@ namespace WebCore {
 class IDBBackingStoreInterface;
 class IDBDatabase;
 class IDBFactoryBackendInterface;
+class IDBKey;
+class IDBKeyPath;
+class IDBKeyRange;
 class IDBTransactionBackend;
 class IDBTransactionCoordinator;
+class SharedBuffer;
 
-class IDBDatabaseBackendImpl FINAL : public IDBDatabaseBackendInterface {
+struct IDBDatabaseMetadata;
+struct IDBIndexMetadata;
+struct IDBObjectStoreMetadata;
+
+typedef Vector<RefPtr<IDBKey>> IndexKeys;
+typedef int ExceptionCode;
+
+class IDBDatabaseBackend : public RefCounted<IDBDatabaseBackend> {
 public:
-    static PassRefPtr<IDBDatabaseBackendImpl> create(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
-    virtual ~IDBDatabaseBackendImpl();
+    static PassRefPtr<IDBDatabaseBackend> create(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
+    ~IDBDatabaseBackend();
 
-    virtual IDBBackingStoreInterface* backingStore() const OVERRIDE;
+    IDBBackingStoreInterface* backingStore() const;
 
     static const int64_t InvalidId = 0;
-    virtual int64_t id() const OVERRIDE { return m_metadata.id; }
-    virtual void addObjectStore(const IDBObjectStoreMetadata&, int64_t newMaxObjectStoreId) OVERRIDE;
-    virtual void removeObjectStore(int64_t objectStoreId) OVERRIDE;
-    virtual void addIndex(int64_t objectStoreId, const IDBIndexMetadata&, int64_t newMaxIndexId) OVERRIDE;
-    virtual void removeIndex(int64_t objectStoreId, int64_t indexId) OVERRIDE;
+    int64_t id() const { return m_metadata.id; }
+    void addObjectStore(const IDBObjectStoreMetadata&, int64_t newMaxObjectStoreId);
+    void removeObjectStore(int64_t objectStoreId);
+    void addIndex(int64_t objectStoreId, const IDBIndexMetadata&, int64_t newMaxIndexId);
+    void removeIndex(int64_t objectStoreId, int64_t indexId);
 
     void openConnection(PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, int64_t transactionId, uint64_t version);
     void deleteDatabase(PassRefPtr<IDBCallbacks>);
 
-    // IDBDatabaseBackendInterface
-    virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement);
-    virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
-    virtual void createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode);
-    virtual void close(PassRefPtr<IDBDatabaseCallbacks>);
+    // IDBDatabaseBackend
+    void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement);
+    void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
+    void createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode);
+    void close(PassRefPtr<IDBDatabaseCallbacks>);
 
-    virtual void commit(int64_t transactionId);
-    virtual void abort(int64_t transactionId);
-    virtual void abort(int64_t transactionId, PassRefPtr<IDBDatabaseError>);
+    void commit(int64_t transactionId);
+    void abort(int64_t transactionId);
+    void abort(int64_t transactionId, PassRefPtr<IDBDatabaseError>);
 
-    virtual void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath&, bool unique, bool multiEntry);
-    virtual void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId);
+    void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath&, bool unique, bool multiEntry);
+    void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId);
 
     IDBTransactionCoordinator* transactionCoordinator() const { return m_transactionCoordinator.get(); }
     void transactionStarted(IDBTransactionBackend*);
@@ -80,30 +93,43 @@ public:
     void transactionFinishedAndCompleteFired(IDBTransactionBackend*);
     void transactionFinishedAndAbortFired(IDBTransactionBackend*);
 
-    virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, bool keyOnly, PassRefPtr<IDBCallbacks>) OVERRIDE;
-    virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) OVERRIDE;
-    virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) OVERRIDE;
-    virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t>& indexIds) OVERRIDE;
-    virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr<IDBCallbacks>) OVERRIDE;
-    virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) OVERRIDE;
-    virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) OVERRIDE;
-    virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>) OVERRIDE;
+    enum TaskType {
+        NormalTask = 0,
+        PreemptiveTask
+    };
+
+    enum PutMode {
+        AddOrUpdate,
+        AddOnly,
+        CursorUpdate
+    };
+
+    static const int64_t MinimumIndexId = 30;
+
+    void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, bool keyOnly, PassRefPtr<IDBCallbacks>);
+    void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&);
+    void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&);
+    void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t>& indexIds);
+    void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr<IDBCallbacks>);
+    void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>);
+    void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>);
+    void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>);
 
-    virtual const IDBDatabaseMetadata& metadata() const OVERRIDE { return m_metadata; }
-    virtual void setCurrentVersion(uint64_t version) OVERRIDE { m_metadata.version = version; }
+    const IDBDatabaseMetadata& metadata() const { return m_metadata; }
+    void setCurrentVersion(uint64_t version) { m_metadata.version = version; }
 
-    virtual bool isIDBDatabaseBackendImpl() OVERRIDE { return true; }
+    bool isIDBDatabaseBackend() { return true; }
 
-    virtual bool hasPendingSecondHalfOpen() OVERRIDE { return m_pendingSecondHalfOpen; }
-    virtual void setPendingSecondHalfOpen(PassOwnPtr<IDBPendingOpenCall> pendingOpenCall) OVERRIDE { m_pendingSecondHalfOpen = pendingOpenCall; }
+    bool hasPendingSecondHalfOpen() { return m_pendingSecondHalfOpen; }
+    void setPendingSecondHalfOpen(PassOwnPtr<IDBPendingOpenCall> pendingOpenCall) { m_pendingSecondHalfOpen = pendingOpenCall; }
 
-    virtual IDBFactoryBackendInterface& factoryBackend() OVERRIDE { return *m_factory; }
+    IDBFactoryBackendInterface& factoryBackend() { return *m_factory; }
 
     class VersionChangeOperation;
     class VersionChangeAbortOperation;
 
 private:
-    IDBDatabaseBackendImpl(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
+    IDBDatabaseBackend(const String& name, IDBBackingStoreInterface*, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
 
     void openConnectionInternal(PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, int64_t transactionId, uint64_t version);
 
@@ -147,4 +173,4 @@ private:
 
 #endif // ENABLE(INDEXED_DATABASE)
 
-#endif // IDBDatabaseBackendImpl_h
+#endif // IDBDatabaseBackend_h
diff --git a/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h b/Source/WebCore/Modules/indexeddb/IDBDatabaseBackendInterface.h
deleted file mode 100644 (file)
index 19add78..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef IDBDatabaseBackendInterface_h
-#define IDBDatabaseBackendInterface_h
-
-#include "IDBCallbacks.h"
-#include "IDBDatabaseCallbacks.h"
-#include "IDBDatabaseError.h"
-#include "IDBPendingOpenCall.h"
-#include "IndexedDB.h"
-#include <wtf/PassOwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/text/WTFString.h>
-
-#if ENABLE(INDEXED_DATABASE)
-
-namespace WebCore {
-
-class IDBBackingStoreInterface;
-class IDBFactoryBackendInterface;
-class IDBKey;
-class IDBKeyPath;
-class IDBKeyRange;
-class SharedBuffer;
-
-struct IDBDatabaseMetadata;
-struct IDBIndexMetadata;
-struct IDBObjectStoreMetadata;
-
-typedef Vector<RefPtr<IDBKey>> IndexKeys;
-typedef int ExceptionCode;
-
-// This is implemented by IDBDatabaseBackendImpl and optionally others (in order to proxy
-// calls across process barriers). All calls to these classes should be non-blocking and
-// trigger work on a background thread if necessary.
-class IDBDatabaseBackendInterface : public RefCounted<IDBDatabaseBackendInterface> {
-public:
-    virtual ~IDBDatabaseBackendInterface() { }
-
-    virtual IDBBackingStoreInterface* backingStore() const = 0;
-
-    virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement) = 0;
-    virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId) = 0;
-    virtual void createTransaction(int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode) = 0;
-    virtual void close(PassRefPtr<IDBDatabaseCallbacks>) = 0;
-
-    // Transaction-specific operations.
-    virtual void commit(int64_t transactionId) = 0;
-    virtual void abort(int64_t transactionId) = 0;
-    virtual void abort(int64_t transactionId, PassRefPtr<IDBDatabaseError>) = 0;
-
-    virtual void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath&, bool unique, bool multiEntry) = 0;
-    virtual void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId) = 0;
-
-    enum TaskType {
-        NormalTask = 0,
-        PreemptiveTask
-    };
-
-    enum PutMode {
-        AddOrUpdate,
-        AddOnly,
-        CursorUpdate
-    };
-
-    static const int64_t MinimumIndexId = 30;
-
-    virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, bool keyOnly, PassRefPtr<IDBCallbacks>) = 0;
-    // Note that 'value' may be consumed/adopted by this call.
-    virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) = 0;
-    virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&) = 0;
-    virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t>& indexIds) = 0;
-    virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr<IDBCallbacks>) = 0;
-    virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
-    virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
-    virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<IDBCallbacks>) = 0;
-
-    virtual int64_t id() const = 0;
-    virtual void addObjectStore(const IDBObjectStoreMetadata&, int64_t newMaxObjectStoreId) = 0;
-    virtual void removeObjectStore(int64_t objectStoreId) = 0;
-    virtual void addIndex(int64_t objectStoreId, const IDBIndexMetadata&, int64_t newMaxIndexId) = 0;
-    virtual void removeIndex(int64_t objectStoreId, int64_t indexId) = 0;
-
-    virtual const IDBDatabaseMetadata& metadata() const = 0;
-    virtual void setCurrentVersion(uint64_t) = 0;
-
-    virtual bool hasPendingSecondHalfOpen() = 0;
-    virtual void setPendingSecondHalfOpen(PassOwnPtr<IDBPendingOpenCall>) = 0;
-
-    virtual bool isIDBDatabaseBackendImpl() { return false; }
-
-    virtual IDBFactoryBackendInterface& factoryBackend() = 0;
-};
-
-} // namespace WebCore
-
-#endif
-
-#endif // IDBDatabaseBackendInterface_h
index e1a5fc3d0f67e6d9aca2d62082590b13a49bbee6..6101ae46649bab248747fc228f7e7b79f3f50e83 100644 (file)
@@ -40,8 +40,9 @@
 namespace WebCore {
 
 class IDBCallbacks;
+class IDBCursorBackend;
 class IDBDatabase;
-class IDBDatabaseBackendInterface;
+class IDBDatabaseBackend;
 class IDBDatabaseCallbacks;
 class IDBTransactionBackend;
 class SecurityOrigin;
@@ -64,9 +65,9 @@ public:
 
     virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) = 0;
 
-    virtual PassRefPtr<IDBTransactionBackend> maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode) = 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, IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId) = 0;
+    virtual PassRefPtr<IDBCursorBackend> createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t objectStoreId) = 0;
 };
 
 } // namespace WebCore
index 6382cb8e8a1efe55fc6d86bde1bc9ef52f361364..df637347e213b6be72dc4f6b3910a37acb59d2bf 100644 (file)
@@ -71,7 +71,7 @@ PassRefPtr<IDBRequest> IDBIndex::openCursor(ScriptExecutionContext* context, Pas
 
     RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
     request->setCursorDetails(IndexedDB::CursorKeyAndValue, direction);
-    backendDB()->openCursor(m_transaction->id(), m_objectStore->id(), m_metadata.id, keyRange, direction, false, IDBDatabaseBackendInterface::NormalTask, request);
+    backendDB()->openCursor(m_transaction->id(), m_objectStore->id(), m_metadata.id, keyRange, direction, false, IDBDatabaseBackend::NormalTask, request);
     return request;
 }
 
@@ -126,7 +126,7 @@ PassRefPtr<IDBRequest> IDBIndex::openKeyCursor(ScriptExecutionContext* context,
 
     RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
     request->setCursorDetails(IndexedDB::CursorKeyOnly, direction);
-    backendDB()->openCursor(m_transaction->id(), m_objectStore->id(), m_metadata.id, keyRange, direction, true, IDBDatabaseBackendInterface::NormalTask, request);
+    backendDB()->openCursor(m_transaction->id(), m_objectStore->id(), m_metadata.id, keyRange, direction, true, IDBDatabaseBackend::NormalTask, request);
     return request;
 }
 
@@ -200,7 +200,7 @@ PassRefPtr<IDBRequest> IDBIndex::getKey(ScriptExecutionContext* context, PassRef
     return request;
 }
 
-IDBDatabaseBackendInterface* IDBIndex::backendDB() const
+IDBDatabaseBackend* IDBIndex::backendDB() const
 {
     return m_transaction->backendDB();
 }
index ac80c508c295f0216c45163c759b5a124905c624..20560f490ba0dcd80e712e7c302a86fe9dac0278 100644 (file)
@@ -83,7 +83,7 @@ public:
 
     void markDeleted() { m_deleted = true; }
 
-    IDBDatabaseBackendInterface* backendDB() const;
+    IDBDatabaseBackend* backendDB() const;
 
 private:
     IDBIndex(const IDBIndexMetadata&, IDBObjectStore*, IDBTransaction*);
index cf1259430a5358e32c3d8a47ef997e9ad3740074..3160a4b9029b990a64179c7cf11583183ae2f812 100644 (file)
@@ -28,7 +28,7 @@
 #define IDBIndexWriter_h
 
 #include "IDBBackingStoreInterface.h"
-#include "IDBDatabaseBackendInterface.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBMetadata.h"
 #include <wtf/RefCounted.h>
 
index d10df0385b0d4197ad3ba007d94285c9904a5105..520c9427fe7d1886b421f7e7f5ddfc05e3ea938e 100644 (file)
@@ -120,28 +120,28 @@ static void generateIndexKeysForValue(DOMRequestState* requestState, const IDBIn
 PassRefPtr<IDBRequest> IDBObjectStore::add(JSC::ExecState* state, ScriptValue& value, const ScriptValue& key, ExceptionCode& ec)
 {
     LOG(StorageAPI, "IDBObjectStore::add");
-    return put(IDBDatabaseBackendInterface::AddOnly, IDBAny::create(this), state, value, key, ec);
+    return put(IDBDatabaseBackend::AddOnly, IDBAny::create(this), state, value, key, ec);
 }
 
 PassRefPtr<IDBRequest> IDBObjectStore::add(JSC::ExecState* state, ScriptValue& value, ExceptionCode& ec)
 {
     LOG(StorageAPI, "IDBObjectStore::add");
-    return put(IDBDatabaseBackendInterface::AddOnly, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
+    return put(IDBDatabaseBackend::AddOnly, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
 }
 
 PassRefPtr<IDBRequest> IDBObjectStore::put(JSC::ExecState* state, ScriptValue& value, const ScriptValue& key, ExceptionCode& ec)
 {
     LOG(StorageAPI, "IDBObjectStore::put");
-    return put(IDBDatabaseBackendInterface::AddOrUpdate, IDBAny::create(this), state, value, key, ec);
+    return put(IDBDatabaseBackend::AddOrUpdate, IDBAny::create(this), state, value, key, ec);
 }
 
 PassRefPtr<IDBRequest> IDBObjectStore::put(JSC::ExecState* state, ScriptValue& value, ExceptionCode& ec)
 {
     LOG(StorageAPI, "IDBObjectStore::put");
-    return put(IDBDatabaseBackendInterface::AddOrUpdate, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
+    return put(IDBDatabaseBackend::AddOrUpdate, IDBAny::create(this), state, value, static_cast<IDBKey*>(0), ec);
 }
 
-PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode putMode, PassRefPtr<IDBAny> source, JSC::ExecState* state, ScriptValue& value, const ScriptValue& keyValue, ExceptionCode& ec)
+PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr<IDBAny> source, JSC::ExecState* state, ScriptValue& value, const ScriptValue& keyValue, ExceptionCode& ec)
 {
     ScriptExecutionContext* context = scriptExecutionContextFromExecState(state);
     DOMRequestState requestState(context);
@@ -149,7 +149,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode
     return put(putMode, source, state, value, key.release(), ec);
 }
 
-PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode putMode, PassRefPtr<IDBAny> source, JSC::ExecState* state, ScriptValue& value, PassRefPtr<IDBKey> prpKey, ExceptionCode& ec)
+PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackend::PutMode putMode, PassRefPtr<IDBAny> source, JSC::ExecState* state, ScriptValue& value, PassRefPtr<IDBKey> prpKey, ExceptionCode& ec)
 {
     RefPtr<IDBKey> key = prpKey;
     if (m_deleted) {
@@ -186,7 +186,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode
     ScriptExecutionContext* context = scriptExecutionContextFromExecState(state);
     DOMRequestState requestState(context);
 
-    if (putMode != IDBDatabaseBackendInterface::CursorUpdate && usesInLineKeys && key) {
+    if (putMode != IDBDatabaseBackend::CursorUpdate && usesInLineKeys && key) {
         ec = IDBDatabaseException::DataError;
         return 0;
     }
@@ -233,7 +233,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::put(IDBDatabaseBackendInterface::PutMode
     // See https://lists.webkit.org/pipermail/webkit-dev/2013-February/023682.html
     Vector<char>* valueBytesSigned = reinterpret_cast<Vector<char>*>(&valueBytes);
     RefPtr<SharedBuffer> valueBuffer = SharedBuffer::adoptVector(*valueBytesSigned);
-    backendDB()->put(m_transaction->id(), id(), valueBuffer, key.release(), static_cast<IDBDatabaseBackendInterface::PutMode>(putMode), request, indexIds, indexKeys);
+    backendDB()->put(m_transaction->id(), id(), valueBuffer, key.release(), static_cast<IDBDatabaseBackend::PutMode>(putMode), request, indexIds, indexKeys);
     return request.release();
 }
 
@@ -299,7 +299,7 @@ namespace {
 // cursor success handlers are kept alive.
 class IndexPopulator : public EventListener {
 public:
-    static PassRefPtr<IndexPopulator> create(PassRefPtr<IDBDatabaseBackendInterface> backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
+    static PassRefPtr<IndexPopulator> create(PassRefPtr<IDBDatabaseBackend> backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
     {
         return adoptRef(new IndexPopulator(backend, transactionId, objectStoreId, indexMetadata));
     }
@@ -310,7 +310,7 @@ public:
     }
 
 private:
-    IndexPopulator(PassRefPtr<IDBDatabaseBackendInterface> backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
+    IndexPopulator(PassRefPtr<IDBDatabaseBackend> backend, int64_t transactionId, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
         : EventListener(CPPEventListenerType)
         , m_databaseBackend(backend)
         , m_transactionId(transactionId)
@@ -354,7 +354,7 @@ private:
 
     }
 
-    RefPtr<IDBDatabaseBackendInterface> m_databaseBackend;
+    RefPtr<IDBDatabaseBackend> m_databaseBackend;
     const int64_t m_transactionId;
     const int64_t m_objectStoreId;
     const IDBIndexMetadata m_indexMetadata;
@@ -415,7 +415,7 @@ PassRefPtr<IDBIndex> IDBObjectStore::createIndex(ScriptExecutionContext* context
     if (ec)
         return 0;
 
-    RefPtr<IDBRequest> indexRequest = openCursor(context, static_cast<IDBKeyRange*>(0), IDBCursor::directionNext(), IDBDatabaseBackendInterface::PreemptiveTask, ec);
+    RefPtr<IDBRequest> indexRequest = openCursor(context, static_cast<IDBKeyRange*>(0), IDBCursor::directionNext(), IDBDatabaseBackend::PreemptiveTask, ec);
     ASSERT(!ec);
     if (ec)
         return 0;
@@ -492,7 +492,27 @@ void IDBObjectStore::deleteIndex(const String& name, ExceptionCode& ec)
     }
 }
 
-PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, const String& directionString, IDBDatabaseBackendInterface::TaskType taskType, ExceptionCode& ec)
+PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, ExceptionCode& ec)
+{
+    return openCursor(context, static_cast<IDBKeyRange*>(0), ec);
+}
+
+PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec)
+{
+    return openCursor(context, keyRange, IDBCursor::directionNext(), ec);
+}
+
+PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, const ScriptValue& key, ExceptionCode& ec)
+{
+    return openCursor(context, key, IDBCursor::directionNext(), ec);
+}
+
+PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, const String& direction, ExceptionCode& ec)
+{
+    return openCursor(context, range, direction, IDBDatabaseBackend::NormalTask, ec);
+}
+
+PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, const String& directionString, IDBDatabaseBackend::TaskType taskType, ExceptionCode& ec)
 {
     LOG(StorageAPI, "IDBObjectStore::openCursor");
     if (m_deleted) {
@@ -510,7 +530,7 @@ PassRefPtr<IDBRequest> IDBObjectStore::openCursor(ScriptExecutionContext* contex
     RefPtr<IDBRequest> request = IDBRequest::create(context, IDBAny::create(this), m_transaction.get());
     request->setCursorDetails(IndexedDB::CursorKeyAndValue, direction);
 
-    backendDB()->openCursor(m_transaction->id(), id(), IDBIndexMetadata::InvalidId, range, direction, false, static_cast<IDBDatabaseBackendInterface::TaskType>(taskType), request);
+    backendDB()->openCursor(m_transaction->id(), id(), IDBIndexMetadata::InvalidId, range, direction, false, static_cast<IDBDatabaseBackend::TaskType>(taskType), request);
     return request.release();
 }
 
@@ -565,7 +585,7 @@ int64_t IDBObjectStore::findIndexId(const String& name) const
     return IDBIndexMetadata::InvalidId;
 }
 
-IDBDatabaseBackendInterface* IDBObjectStore::backendDB() const
+IDBDatabaseBackend* IDBObjectStore::backendDB() const
 {
     return m_transaction->backendDB();
 }
index 108cb00cc8fffc69dc9920e0fed25ebdddc35039..c5fa1f339577537568bc84a1a12bde3f6a5aa378 100644 (file)
@@ -67,11 +67,11 @@ public:
 
     PassRefPtr<IDBRequest> add(JSC::ExecState*, ScriptValue&, ExceptionCode&);
     PassRefPtr<IDBRequest> put(JSC::ExecState*, ScriptValue&, ExceptionCode&);
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, ExceptionCode& ec) { return openCursor(context, static_cast<IDBKeyRange*>(0), ec); }
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> keyRange, ExceptionCode& ec) { return openCursor(context, keyRange, IDBCursor::directionNext(), ec); }
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, const ScriptValue& key, ExceptionCode& ec) { return openCursor(context, key, IDBCursor::directionNext(), ec); }
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext* context, PassRefPtr<IDBKeyRange> range, const String& direction, ExceptionCode& ec) { return openCursor(context, range, direction, IDBDatabaseBackendInterface::NormalTask, ec); }
-    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, const String& direction, IDBDatabaseBackendInterface::TaskType, ExceptionCode&);
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, ExceptionCode&);
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, const String& direction, ExceptionCode&);
+    PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, const String& direction, IDBDatabaseBackend::TaskType, ExceptionCode&);
     PassRefPtr<IDBRequest> openCursor(ScriptExecutionContext*, const ScriptValue& key, const String& direction, ExceptionCode&);
 
     PassRefPtr<IDBRequest> get(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
@@ -94,8 +94,8 @@ public:
     PassRefPtr<IDBRequest> count(ScriptExecutionContext*, PassRefPtr<IDBKeyRange>, ExceptionCode&);
     PassRefPtr<IDBRequest> count(ScriptExecutionContext*, const ScriptValue& key, ExceptionCode&);
 
-    PassRefPtr<IDBRequest> put(IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBAny> source, JSC::ExecState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
-    PassRefPtr<IDBRequest> put(IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBAny> source, JSC::ExecState*, ScriptValue&, PassRefPtr<IDBKey>, ExceptionCode&);
+    PassRefPtr<IDBRequest> put(IDBDatabaseBackend::PutMode, PassRefPtr<IDBAny> source, JSC::ExecState*, ScriptValue&, const ScriptValue& key, ExceptionCode&);
+    PassRefPtr<IDBRequest> put(IDBDatabaseBackend::PutMode, PassRefPtr<IDBAny> source, JSC::ExecState*, ScriptValue&, PassRefPtr<IDBKey>, ExceptionCode&);
     void markDeleted() { m_deleted = true; }
     void transactionFinished();
 
@@ -105,7 +105,7 @@ public:
     typedef Vector<RefPtr<IDBKey>> IndexKeys;
     typedef HashMap<String, IndexKeys> IndexKeyMap;
 
-    IDBDatabaseBackendInterface* backendDB() const;
+    IDBDatabaseBackend* backendDB() const;
 
 private:
     IDBObjectStore(const IDBObjectStoreMetadata&, IDBTransaction*);
index 478a426445b725ba78afbe55230134c16a58a34c..cb6443380c472767bb7cb914cc087628b56895e0 100644 (file)
@@ -45,7 +45,7 @@ PassRefPtr<IDBOpenDBRequest> IDBOpenDBRequest::create(ScriptExecutionContext* co
 }
 
 IDBOpenDBRequest::IDBOpenDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBDatabaseCallbacks> callbacks, int64_t transactionId, uint64_t version, IndexedDB::VersionNullness versionNullness)
-    : IDBRequest(context, IDBAny::createNull(), IDBDatabaseBackendInterface::NormalTask, 0)
+    : IDBRequest(context, IDBAny::createNull(), IDBDatabaseBackend::NormalTask, 0)
     , m_databaseCallbacks(callbacks)
     , m_transactionId(transactionId)
     , m_version(version)
@@ -72,11 +72,11 @@ void IDBOpenDBRequest::onBlocked(uint64_t oldVersion)
     enqueueEvent(IDBVersionChangeEvent::create(oldVersion, m_version, m_versionNullness, eventNames().blockedEvent));
 }
 
-void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDatabaseBackendInterface> prpDatabaseBackend, const IDBDatabaseMetadata& metadata)
+void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDatabaseBackend> prpDatabaseBackend, const IDBDatabaseMetadata& metadata)
 {
     LOG(StorageAPI, "IDBOpenDBRequest::onUpgradeNeeded()");
     if (m_contextStopped || !scriptExecutionContext()) {
-        RefPtr<IDBDatabaseBackendInterface> db = prpDatabaseBackend;
+        RefPtr<IDBDatabaseBackend> db = prpDatabaseBackend;
         db->abort(m_transactionId);
         db->close(m_databaseCallbacks);
         return;
@@ -86,7 +86,7 @@ void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDataba
 
     ASSERT(m_databaseCallbacks);
 
-    RefPtr<IDBDatabaseBackendInterface> databaseBackend = prpDatabaseBackend;
+    RefPtr<IDBDatabaseBackend> databaseBackend = prpDatabaseBackend;
 
     RefPtr<IDBDatabase> idbDatabase = IDBDatabase::create(scriptExecutionContext(), databaseBackend, m_databaseCallbacks);
     idbDatabase->setMetadata(metadata);
@@ -104,13 +104,13 @@ void IDBOpenDBRequest::onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDataba
     enqueueEvent(IDBVersionChangeEvent::create(oldVersion, m_version, m_versionNullness, eventNames().upgradeneededEvent));
 }
 
-void IDBOpenDBRequest::onSuccess(PassRefPtr<IDBDatabaseBackendInterface> prpBackend, const IDBDatabaseMetadata& metadata)
+void IDBOpenDBRequest::onSuccess(PassRefPtr<IDBDatabaseBackend> prpBackend, const IDBDatabaseMetadata& metadata)
 {
     LOG(StorageAPI, "IDBOpenDBRequest::onSuccess()");
     if (!shouldEnqueueEvent())
         return;
 
-    RefPtr<IDBDatabaseBackendInterface> backend = prpBackend;
+    RefPtr<IDBDatabaseBackend> backend = prpBackend;
     RefPtr<IDBDatabase> idbDatabase;
     if (m_result) {
         idbDatabase = m_result->idbDatabase();
index 960459da9724d834487396eafcbd37e92045a51b..39dd536e312b847c4d43777c4923a08f4895d723 100644 (file)
@@ -43,8 +43,8 @@ public:
     using IDBRequest::onSuccess;
 
     virtual void onBlocked(uint64_t existingVersion) OVERRIDE;
-    virtual void onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDatabaseBackendInterface>, const IDBDatabaseMetadata&) OVERRIDE;
-    virtual void onSuccess(PassRefPtr<IDBDatabaseBackendInterface>, const IDBDatabaseMetadata&) OVERRIDE;
+    virtual void onUpgradeNeeded(uint64_t oldVersion, PassRefPtr<IDBDatabaseBackend>, const IDBDatabaseMetadata&) OVERRIDE;
+    virtual void onSuccess(PassRefPtr<IDBDatabaseBackend>, const IDBDatabaseMetadata&) OVERRIDE;
 
     // EventTarget
     virtual EventTargetInterface eventTargetInterface() const;
index e1c2c82643ce51715868eaa247b60a68ab2bdfe6..22bda5d492a54ff04cecb68c3d55e568e56dd48d 100644 (file)
@@ -26,6 +26,7 @@
 #ifndef IDBPendingDeleteCall_h
 #define IDBPendingDeleteCall_h
 
+#include "IDBCallbacks.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefPtr.h>
 
@@ -33,8 +34,6 @@
 
 namespace WebCore {
 
-class IDBCallbacks;
-
 class IDBPendingDeleteCall {
 public:
     static PassOwnPtr<IDBPendingDeleteCall> create(PassRefPtr<IDBCallbacks> callbacks)
index 95d8cf6f5491d53a158aad127e12e0534346ebca..0049eda020ddb3921f1d537f64ca8b1a7eaea915 100644 (file)
@@ -49,7 +49,7 @@ namespace WebCore {
 
 PassRefPtr<IDBRequest> IDBRequest::create(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, IDBTransaction* transaction)
 {
-    RefPtr<IDBRequest> request(adoptRef(new IDBRequest(context, source, IDBDatabaseBackendInterface::NormalTask, transaction)));
+    RefPtr<IDBRequest> request(adoptRef(new IDBRequest(context, source, IDBDatabaseBackend::NormalTask, transaction)));
     request->suspendIfNeeded();
     // Requests associated with IDBFactory (open/deleteDatabase/getDatabaseNames) are not associated with transactions.
     if (transaction)
@@ -57,7 +57,7 @@ PassRefPtr<IDBRequest> IDBRequest::create(ScriptExecutionContext* context, PassR
     return request.release();
 }
 
-PassRefPtr<IDBRequest> IDBRequest::create(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, IDBDatabaseBackendInterface::TaskType taskType, IDBTransaction* transaction)
+PassRefPtr<IDBRequest> IDBRequest::create(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, IDBDatabaseBackend::TaskType taskType, IDBTransaction* transaction)
 {
     RefPtr<IDBRequest> request(adoptRef(new IDBRequest(context, source, taskType, transaction)));
     request->suspendIfNeeded();
@@ -67,7 +67,7 @@ PassRefPtr<IDBRequest> IDBRequest::create(ScriptExecutionContext* context, PassR
     return request.release();
 }
 
-IDBRequest::IDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, IDBDatabaseBackendInterface::TaskType taskType, IDBTransaction* transaction)
+IDBRequest::IDBRequest(ScriptExecutionContext* context, PassRefPtr<IDBAny> source, IDBDatabaseBackend::TaskType taskType, IDBTransaction* transaction)
     : ActiveDOMObject(context)
     , m_result(0)
     , m_errorCode(0)
index 5f59b7d7a9ab9f1bee11a8e17d17180a4412c7f1..430589e99d1d0986024ee19daa36c8de7beefc75 100644 (file)
@@ -42,7 +42,7 @@
 #include "IDBAny.h"
 #include "IDBCallbacks.h"
 #include "IDBCursor.h"
-#include "IDBDatabaseBackendInterface.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBDatabaseCallbacks.h"
 #include "ScriptWrappable.h"
 
@@ -55,7 +55,7 @@ typedef int ExceptionCode;
 class IDBRequest : public ScriptWrappable, public IDBCallbacks, public EventTargetWithInlineData, public ActiveDOMObject {
 public:
     static PassRefPtr<IDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBTransaction*);
-    static PassRefPtr<IDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBDatabaseBackendInterface::TaskType, IDBTransaction*);
+    static PassRefPtr<IDBRequest> create(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBDatabaseBackend::TaskType, IDBTransaction*);
     virtual ~IDBRequest();
 
     PassRefPtr<IDBAny> result(ExceptionCode&) const;
@@ -111,12 +111,12 @@ public:
     using RefCounted<IDBCallbacks>::ref;
     using RefCounted<IDBCallbacks>::deref;
 
-    IDBDatabaseBackendInterface::TaskType taskType() { return m_taskType; }
+    IDBDatabaseBackend::TaskType taskType() { return m_taskType; }
 
     DOMRequestState* requestState() { return &m_requestState; }
 
 protected:
-    IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBDatabaseBackendInterface::TaskType, IDBTransaction*);
+    IDBRequest(ScriptExecutionContext*, PassRefPtr<IDBAny> source, IDBDatabaseBackend::TaskType, IDBTransaction*);
     void enqueueEvent(PassRefPtr<Event>);
     virtual bool shouldEnqueueEvent() const;
     void onSuccessInternal(PassRefPtr<SerializedScriptValue>);
@@ -143,7 +143,7 @@ private:
     void setResultCursor(PassRefPtr<IDBCursor>, PassRefPtr<IDBKey>, PassRefPtr<IDBKey> primaryKey, const ScriptValue&);
 
     RefPtr<IDBAny> m_source;
-    const IDBDatabaseBackendInterface::TaskType m_taskType;
+    const IDBDatabaseBackend::TaskType m_taskType;
 
     bool m_hasPendingActivity;
     Vector<RefPtr<Event>> m_enqueuedEvents;
index 788f6312683047a7daa99cf08291d49af8bfa77f..bd7000450dd9f14e15e101bf826d28f633b90597 100644 (file)
@@ -421,7 +421,7 @@ void IDBTransaction::enqueueEvent(PassRefPtr<Event> event)
     scriptExecutionContext()->eventQueue().enqueueEvent(event);
 }
 
-IDBDatabaseBackendInterface* IDBTransaction::backendDB() const
+IDBDatabaseBackend* IDBTransaction::backendDB() const
 {
     return db()->backend();
 }
index a4e8af01f540b3d61a6fe9807b6fee79b912b07b..9ce0a71499b152beaba40220b71b91c17ee3b9d2 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
 
 class IDBCursor;
 class IDBDatabase;
-class IDBDatabaseBackendInterface;
+class IDBDatabaseBackend;
 class IDBDatabaseError;
 class IDBObjectStore;
 class IDBOpenDBRequest;
@@ -65,7 +65,7 @@ public:
     static IndexedDB::TransactionMode stringToMode(const String&, ExceptionCode&);
     static const AtomicString& modeToString(IndexedDB::TransactionMode);
 
-    IDBDatabaseBackendInterface* backendDB() const;
+    IDBDatabaseBackend* backendDB() const;
 
     int64_t id() const { return m_id; }
     bool isActive() const { return m_state == Active; }
index 37f3141d09b6215f828442a2f33084384c3eb316..fb3fd9906a8c1790a4368e505cf9d10150252a4d 100644 (file)
@@ -29,7 +29,7 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "IDBCursorBackend.h"
-#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBDatabaseCallbacks.h"
 #include "IDBDatabaseException.h"
 #include "IDBFactoryBackendInterface.h"
@@ -40,7 +40,7 @@
 
 namespace WebCore {
 
-PassRefPtr<IDBTransactionBackend> IDBTransactionBackend::create(IDBDatabaseBackendImpl* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
+PassRefPtr<IDBTransactionBackend> IDBTransactionBackend::create(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
 {
     HashSet<int64_t> objectStoreHashSet;
     for (size_t i = 0; i < objectStoreIds.size(); ++i)
@@ -49,7 +49,7 @@ PassRefPtr<IDBTransactionBackend> IDBTransactionBackend::create(IDBDatabaseBacke
     return adoptRef(new IDBTransactionBackend(databaseBackend, id, callbacks, objectStoreHashSet, mode));
 }
 
-IDBTransactionBackend::IDBTransactionBackend(IDBDatabaseBackendImpl* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
+IDBTransactionBackend::IDBTransactionBackend(IDBDatabaseBackend* databaseBackend, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
     : m_objectStoreIds(objectStoreIds)
     , m_mode(mode)
     , m_state(Unused)
@@ -74,12 +74,12 @@ IDBTransactionBackend::~IDBTransactionBackend()
     ASSERT(m_state == Finished);
 }
 
-void IDBTransactionBackend::scheduleTask(IDBDatabaseBackendInterface::TaskType type, PassOwnPtr<IDBOperation> task, PassOwnPtr<IDBOperation> abortTask)
+void IDBTransactionBackend::scheduleTask(IDBDatabaseBackend::TaskType type, PassOwnPtr<IDBOperation> task, PassOwnPtr<IDBOperation> abortTask)
 {
     if (m_state == Finished)
         return;
 
-    if (type == IDBDatabaseBackendInterface::NormalTask)
+    if (type == IDBDatabaseBackend::NormalTask)
         m_taskQueue.append(task);
     else
         m_preemptiveTaskQueue.append(task);
@@ -282,7 +282,7 @@ void IDBTransactionBackend::scheduleDeleteObjectStoreOperation(const IDBObjectSt
 
 void IDBTransactionBackend::scheduleVersionChangeOperation(int64_t transactionId, int64_t requestedVersion, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, const IDBDatabaseMetadata& metadata)
 {
-    scheduleTask(IDBDatabaseBackendImpl::VersionChangeOperation::create(this, transactionId, requestedVersion, callbacks, databaseCallbacks), IDBDatabaseBackendImpl::VersionChangeAbortOperation::create(this, String::number(metadata.version), metadata.version));
+    scheduleTask(IDBDatabaseBackend::VersionChangeOperation::create(this, transactionId, requestedVersion, callbacks, databaseCallbacks), IDBDatabaseBackend::VersionChangeAbortOperation::create(this, String::number(metadata.version), metadata.version));
 }
 
 void IDBTransactionBackend::scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
@@ -300,17 +300,17 @@ void IDBTransactionBackend::scheduleGetOperation(const IDBDatabaseMetadata& meta
     scheduleTask(GetOperation::create(this, m_backingStore.get(), metadata, objectStoreId, indexId, keyRange, cursorType, callbacks));
 }
 
-void IDBTransactionBackend::schedulePutOperation(const IDBObjectStoreMetadata& objectStoreMetadata, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, IDBDatabaseBackendInterface::PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+void IDBTransactionBackend::schedulePutOperation(const IDBObjectStoreMetadata& objectStoreMetadata, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, IDBDatabaseBackend::PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
 {
     scheduleTask(PutOperation::create(this, m_backingStore.get(), database().id(), objectStoreMetadata, value, key, putMode, callbacks, indexIds, indexKeys));
 }
 
 void IDBTransactionBackend::scheduleSetIndexesReadyOperation(size_t indexCount)
 {
-    scheduleTask(IDBDatabaseBackendInterface::PreemptiveTask, SetIndexesReadyOperation::create(this, indexCount));
+    scheduleTask(IDBDatabaseBackend::PreemptiveTask, SetIndexesReadyOperation::create(this, indexCount));
 }
 
-void IDBTransactionBackend::scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
+void IDBTransactionBackend::scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
 {
     scheduleTask(OpenCursorOperation::create(this, m_backingStore.get(), database().id(), objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
 }
@@ -330,7 +330,7 @@ void IDBTransactionBackend::scheduleClearOperation(int64_t objectStoreId, PassRe
     scheduleTask(ClearOperation::create(this, m_backingStore.get(), database().id(), objectStoreId, callbacks));
 }
 
-PassRefPtr<IDBCursorBackend> IDBTransactionBackend::createCursorBackend(IDBBackingStoreCursorInterface& cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, int64_t objectStoreId)
+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);
 }
index ec296bf39f3b7afc46349d0214f379bc87f4d68d..54aa758610ffb3d980f41153e66ebadbb5f8e03f 100644 (file)
@@ -29,8 +29,7 @@
 #if ENABLE(INDEXED_DATABASE)
 
 #include "IDBBackingStoreInterface.h"
-#include "IDBDatabaseBackendImpl.h"
-#include "IDBDatabaseBackendInterface.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBDatabaseError.h"
 #include "IDBOperation.h"
 #include "IDBTransactionBackend.h"
 
 namespace WebCore {
 
+class IDBCursorBackend;
 class IDBDatabaseCallbacks;
 
 class IDBTransactionBackend : public RefCounted<IDBTransactionBackend> {
 public:
-    static PassRefPtr<IDBTransactionBackend> create(IDBDatabaseBackendImpl*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
+    static PassRefPtr<IDBTransactionBackend> create(IDBDatabaseBackend*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
     ~IDBTransactionBackend();
 
     void commit();
@@ -56,8 +56,8 @@ public:
     IndexedDB::TransactionMode mode() const  { return m_mode; }
     const HashSet<int64_t>& scope() const  { return m_objectStoreIds; }
 
-    void scheduleTask(PassOwnPtr<IDBOperation> task, PassOwnPtr<IDBOperation> abortTask = nullptr) { scheduleTask(IDBDatabaseBackendInterface::NormalTask, task, abortTask); }
-    void scheduleTask(IDBDatabaseBackendInterface::TaskType, PassOwnPtr<IDBOperation>, PassOwnPtr<IDBOperation> abortTask = nullptr);
+    void scheduleTask(PassOwnPtr<IDBOperation> task, PassOwnPtr<IDBOperation> abortTask = nullptr) { scheduleTask(IDBDatabaseBackend::NormalTask, task, abortTask); }
+    void scheduleTask(IDBDatabaseBackend::TaskType, PassOwnPtr<IDBOperation>, PassOwnPtr<IDBOperation> abortTask = nullptr);
 
     void registerOpenCursor(IDBCursorBackend*);
     void unregisterOpenCursor(IDBCursorBackend*);
@@ -66,7 +66,7 @@ public:
     void didCompletePreemptiveEvent()  { m_pendingPreemptiveEvents--; ASSERT(m_pendingPreemptiveEvents >= 0); }
     IDBBackingStoreTransactionInterface& backingStoreTransaction() { return *m_backingStoreTransaction; }
 
-    IDBDatabaseBackendInterface& database() const  { return *m_database; }
+    IDBDatabaseBackend& database() const  { return *m_database; }
 
     void scheduleCreateObjectStoreOperation(const IDBObjectStoreMetadata&);
     void scheduleDeleteObjectStoreOperation(const IDBObjectStoreMetadata&);
@@ -74,19 +74,19 @@ public:
     void scheduleCreateIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&);
     void scheduleDeleteIndexOperation(int64_t objectStoreId, const IDBIndexMetadata&);
     void scheduleGetOperation(const IDBDatabaseMetadata&, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorType, PassRefPtr<IDBCallbacks>);
-    void schedulePutOperation(const IDBObjectStoreMetadata&, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, IDBDatabaseBackendInterface::PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&);
+    void schedulePutOperation(const IDBObjectStoreMetadata&, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, IDBDatabaseBackend::PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&);
     void scheduleSetIndexesReadyOperation(size_t indexCount);
-    void scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, PassRefPtr<IDBCallbacks>);
+    void scheduleOpenCursorOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, PassRefPtr<IDBCallbacks>);
     void scheduleCountOperation(int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>);
     void scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>);
     void scheduleClearOperation(int64_t objectStoreId, PassRefPtr<IDBCallbacks>);
 
-    PassRefPtr<IDBCursorBackend> createCursorBackend(IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId);
+    PassRefPtr<IDBCursorBackend> createCursorBackend(IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t objectStoreId);
 
     int64_t id() const { return m_id; }
 
 private:
-    IDBTransactionBackend(IDBDatabaseBackendImpl*, int64_t id, PassRefPtr<IDBDatabaseCallbacks>, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
+    IDBTransactionBackend(IDBDatabaseBackend*, int64_t id, PassRefPtr<IDBDatabaseCallbacks>, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode);
 
     enum State {
         Unused, // Created, but no tasks yet.
@@ -109,7 +109,7 @@ private:
     State m_state;
     bool m_commitPending;
     RefPtr<IDBDatabaseCallbacks> m_callbacks;
-    RefPtr<IDBDatabaseBackendImpl> m_database;
+    RefPtr<IDBDatabaseBackend> m_database;
 
     typedef Deque<OwnPtr<IDBOperation>> TaskQueue;
     TaskQueue m_taskQueue;
index 325ae2615b64ba071d9d34476aa35e1393192d16..d696623770261632657367bec549eaf373eeda1a 100644 (file)
@@ -180,7 +180,7 @@ void PutOperation::perform()
     bool keyWasGenerated = false;
 
     RefPtr<IDBKey> key;
-    if (m_putMode != IDBDatabaseBackendInterface::CursorUpdate && m_objectStore.autoIncrement && !m_key) {
+    if (m_putMode != IDBDatabaseBackend::CursorUpdate && m_objectStore.autoIncrement && !m_key) {
         RefPtr<IDBKey> autoIncKey = m_backingStore->generateKey(*m_transaction, m_databaseId, m_objectStore.id);
         keyWasGenerated = true;
         if (!autoIncKey->isValid()) {
@@ -195,7 +195,7 @@ void PutOperation::perform()
     ASSERT(key->isValid());
 
     RefPtr<IDBRecordIdentifier> recordIdentifier;
-    if (m_putMode == IDBDatabaseBackendInterface::AddOnly) {
+    if (m_putMode == IDBDatabaseBackend::AddOnly) {
         bool ok = m_backingStore->keyExistsInObjectStore(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStore.id, *key, recordIdentifier);
         if (!ok) {
             m_callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error checking key existence."));
@@ -232,7 +232,7 @@ void PutOperation::perform()
         indexWriter->writeIndexKeys(recordIdentifier.get(), *m_backingStore, m_transaction->backingStoreTransaction(), m_databaseId, m_objectStore.id);
     }
 
-    if (m_objectStore.autoIncrement && m_putMode != IDBDatabaseBackendInterface::CursorUpdate && key->type() == IDBKey::NumberType) {
+    if (m_objectStore.autoIncrement && m_putMode != IDBDatabaseBackend::CursorUpdate && key->type() == IDBKey::NumberType) {
         bool ok = m_backingStore->updateKeyGenerator(*m_transaction, m_databaseId, m_objectStore.id, *key, !keyWasGenerated);
         if (!ok) {
             m_callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error updating key generator."));
@@ -258,7 +258,7 @@ void OpenCursorOperation::perform()
     // until the indexing is complete. This can't happen any earlier
     // because we don't want to switch to early mode in case multiple
     // indexes are being created in a row, with put()'s in between.
-    if (m_taskType == IDBDatabaseBackendInterface::PreemptiveTask)
+    if (m_taskType == IDBDatabaseBackend::PreemptiveTask)
         m_transaction->addPreemptiveEvent();
 
     RefPtr<IDBBackingStoreCursorInterface> backingStoreCursor;
@@ -266,7 +266,7 @@ void OpenCursorOperation::perform()
         ASSERT(m_cursorType != IndexedDB::CursorKeyOnly);
         backingStoreCursor = m_backingStore->openObjectStoreCursor(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, m_keyRange.get(), m_direction);
     } else {
-        ASSERT(m_taskType == IDBDatabaseBackendInterface::NormalTask);
+        ASSERT(m_taskType == IDBDatabaseBackend::NormalTask);
         if (m_cursorType == IndexedDB::CursorKeyOnly)
             backingStoreCursor = m_backingStore->openIndexKeyCursor(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, m_indexId, m_keyRange.get(), m_direction);
         else
@@ -278,7 +278,7 @@ void OpenCursorOperation::perform()
         return;
     }
 
-    IDBDatabaseBackendInterface::TaskType taskType(static_cast<IDBDatabaseBackendInterface::TaskType>(m_taskType));
+    IDBDatabaseBackend::TaskType taskType(static_cast<IDBDatabaseBackend::TaskType>(m_taskType));
 
     RefPtr<IDBCursorBackend> cursor = m_transaction->createCursorBackend(*backingStoreCursor, m_cursorType, taskType, m_objectStoreId);
     m_callbacks->onSuccess(cursor, cursor->key(), cursor->primaryKey(), cursor->value());
@@ -342,10 +342,10 @@ void DeleteObjectStoreOperation::perform()
     }
 }
 
-void IDBDatabaseBackendImpl::VersionChangeOperation::perform()
+void IDBDatabaseBackend::VersionChangeOperation::perform()
 {
     LOG(StorageAPI, "VersionChangeOperation");
-    IDBDatabaseBackendInterface& database = m_transaction->database();
+    IDBDatabaseBackend& database = m_transaction->database();
     int64_t databaseId = database.id();
     uint64_t oldVersion = database.metadata().version;
 
@@ -375,7 +375,7 @@ void DeleteObjectStoreAbortOperation::perform()
     m_transaction->database().addObjectStore(m_objectStoreMetadata, IDBObjectStoreMetadata::InvalidId);
 }
 
-void IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform()
+void IDBDatabaseBackend::VersionChangeAbortOperation::perform()
 {
     LOG(StorageAPI, "VersionChangeAbortOperation");
     m_transaction->database().setCurrentVersion(m_previousIntVersion);
index 2065f46a1ed02005c573f64b68dde0bf4cd6afad..14bdf67d0700d49c2352bd2e89063ed79884aab0 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef IDBTransactionBackendOperations_h
 #define IDBTransactionBackendOperations_h
 
-#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBOperation.h"
 #include "IDBTransactionBackend.h"
 
@@ -74,7 +74,7 @@ private:
     const IDBObjectStoreMetadata m_objectStoreMetadata;
 };
 
-class IDBDatabaseBackendImpl::VersionChangeOperation : public IDBOperation {
+class IDBDatabaseBackend::VersionChangeOperation : public IDBOperation {
 public:
     static PassOwnPtr<IDBOperation> create(IDBTransactionBackend* transaction, int64_t transactionId, int64_t version, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks)
     {
@@ -134,7 +134,7 @@ private:
     IDBObjectStoreMetadata m_objectStoreMetadata;
 };
 
-class IDBDatabaseBackendImpl::VersionChangeAbortOperation : public IDBOperation {
+class IDBDatabaseBackend::VersionChangeAbortOperation : public IDBOperation {
 public:
     static PassOwnPtr<IDBOperation> create(IDBTransactionBackend* transaction, const String& previousVersion, int64_t previousIntVersion)
     {
@@ -276,13 +276,13 @@ private:
 
 class PutOperation : public IDBOperation {
 public:
-    static PassOwnPtr<IDBOperation> create(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, const IDBObjectStoreMetadata& objectStore, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, IDBDatabaseBackendInterface::PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+    static PassOwnPtr<IDBOperation> create(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, const IDBObjectStoreMetadata& objectStore, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey> key, IDBDatabaseBackend::PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
     {
         return adoptPtr(new PutOperation(transaction, backingStore, databaseId, objectStore, value, key, putMode, callbacks, indexIds, indexKeys));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    PutOperation(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, const IDBObjectStoreMetadata& objectStore, PassRefPtr<SharedBuffer>& value, PassRefPtr<IDBKey> key, IDBDatabaseBackendInterface::PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
+    PutOperation(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, const IDBObjectStoreMetadata& objectStore, PassRefPtr<SharedBuffer>& value, PassRefPtr<IDBKey> key, IDBDatabaseBackend::PutMode putMode, PassRefPtr<IDBCallbacks> callbacks, const Vector<int64_t>& indexIds, const Vector<IndexKeys>& indexKeys)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -302,7 +302,7 @@ private:
     const IDBObjectStoreMetadata m_objectStore;
     const RefPtr<SharedBuffer> m_value;
     const RefPtr<IDBKey> m_key;
-    const IDBDatabaseBackendInterface::PutMode m_putMode;
+    const IDBDatabaseBackend::PutMode m_putMode;
     const RefPtr<IDBCallbacks> m_callbacks;
     const Vector<int64_t> m_indexIds;
     const Vector<IndexKeys> m_indexKeys;
@@ -328,13 +328,13 @@ private:
 
 class OpenCursorOperation : public IDBOperation {
 public:
-    static PassOwnPtr<IDBOperation> create(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
+    static PassOwnPtr<IDBOperation> create(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
     {
         return adoptPtr(new OpenCursorOperation(transaction, backingStore, databaseId, objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    OpenCursorOperation(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
+    OpenCursorOperation(IDBTransactionBackend* transaction, IDBBackingStoreInterface* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorDirection direction, IndexedDB::CursorType cursorType, IDBDatabaseBackend::TaskType taskType, PassRefPtr<IDBCallbacks> callbacks)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -356,7 +356,7 @@ private:
     const PassRefPtr<IDBKeyRange> m_keyRange;
     const IndexedDB::CursorDirection m_direction;
     const IndexedDB::CursorType m_cursorType;
-    const IDBDatabaseBackendInterface::TaskType m_taskType;
+    const IDBDatabaseBackend::TaskType m_taskType;
     const RefPtr<IDBCallbacks> m_callbacks;
 };
 
index 497c4a6de5d604203e42aea8d6f066fb69216e18..c59bbeb95d48683c3fe4125746c3cb108df56b59 100644 (file)
@@ -32,7 +32,7 @@
 #include "DOMStringList.h"
 #include "IDBBackingStoreLevelDB.h"
 #include "IDBCursorBackend.h"
-#include "IDBDatabaseBackendImpl.h"
+#include "IDBDatabaseBackend.h"
 #include "IDBDatabaseException.h"
 #include "IDBTransactionBackend.h"
 #include "IDBTransactionCoordinator.h"
@@ -122,7 +122,7 @@ void IDBFactoryBackendLevelDB::deleteDatabase(const String& name, PassRefPtr<IDB
         return;
     }
 
-    RefPtr<IDBDatabaseBackendImpl> databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), this, uniqueIdentifier);
+    RefPtr<IDBDatabaseBackend> databaseBackend = IDBDatabaseBackend::create(name, backingStore.get(), this, uniqueIdentifier);
     if (databaseBackend) {
         m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
         databaseBackend->deleteDatabase(callbacks);
@@ -167,7 +167,7 @@ void IDBFactoryBackendLevelDB::open(const String& name, uint64_t version, int64_
     LOG(StorageAPI, "IDBFactoryBackendLevelDB::open");
     const String uniqueIdentifier = computeUniqueIdentifier(name, openingOrigin);
 
-    RefPtr<IDBDatabaseBackendImpl> databaseBackend;
+    RefPtr<IDBDatabaseBackend> databaseBackend;
     IDBDatabaseBackendMap::iterator it = m_databaseBackendMap.find(uniqueIdentifier);
     if (it == m_databaseBackendMap.end()) {
         RefPtr<IDBBackingStoreLevelDB> backingStore = openBackingStore(openingOrigin, m_databaseDirectory);
@@ -176,7 +176,7 @@ void IDBFactoryBackendLevelDB::open(const String& name, uint64_t version, int64_
             return;
         }
 
-        databaseBackend = IDBDatabaseBackendImpl::create(name, backingStore.get(), this, uniqueIdentifier);
+        databaseBackend = IDBDatabaseBackend::create(name, backingStore.get(), this, uniqueIdentifier);
         if (databaseBackend)
             m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
         else {
@@ -189,15 +189,15 @@ void IDBFactoryBackendLevelDB::open(const String& name, uint64_t version, int64_
     databaseBackend->openConnection(callbacks, databaseCallbacks, transactionId, version);
 }
 
-PassRefPtr<IDBTransactionBackend> IDBFactoryBackendLevelDB::maybeCreateTransactionBackend(IDBDatabaseBackendInterface* backend, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
+PassRefPtr<IDBTransactionBackend> IDBFactoryBackendLevelDB::maybeCreateTransactionBackend(IDBDatabaseBackend* backend, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks> databaseCallbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode)
 {
-    if (!backend->isIDBDatabaseBackendImpl())
+    if (!backend->isIDBDatabaseBackend())
         return 0;
 
-    return IDBTransactionBackend::create(static_cast<IDBDatabaseBackendImpl*>(backend), transactionId, databaseCallbacks, objectStoreIds, mode);
+    return IDBTransactionBackend::create(static_cast<IDBDatabaseBackend*>(backend), transactionId, databaseCallbacks, objectStoreIds, mode);
 }
 
-PassRefPtr<IDBCursorBackend> IDBFactoryBackendLevelDB::createCursorBackend(IDBTransactionBackend& transactionBackend, IDBBackingStoreCursorInterface& backingStoreCursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, int64_t objectStoreId)
+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);
 }
index 3c3c776fb7f79a2225393b9c01db6d05c9b5332f..13200b7f2a9ecf522972da3814c91840b2d9c931 100644 (file)
@@ -45,7 +45,7 @@ namespace WebCore {
 class DOMStringList;
 
 class IDBBackingStoreLevelDB;
-class IDBDatabaseBackendImpl;
+class IDBDatabaseBackend;
 
 class IDBFactoryBackendLevelDB : public IDBFactoryBackendInterface {
 public:
@@ -63,9 +63,9 @@ public:
 
     virtual void deleteDatabase(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, ScriptExecutionContext*, const String& dataDir) OVERRIDE FINAL;
 
-    virtual PassRefPtr<IDBTransactionBackend> maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode) OVERRIDE FINAL;
+    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, IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId);
+    virtual PassRefPtr<IDBCursorBackend> createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t objectStoreId);
 
 protected:
     virtual PassRefPtr<IDBBackingStoreLevelDB> openBackingStore(const SecurityOrigin&, const String& dataDir);
@@ -73,7 +73,7 @@ protected:
 private:
     explicit IDBFactoryBackendLevelDB(const String& databaseDirectory);
 
-    typedef HashMap<String, RefPtr<IDBDatabaseBackendImpl> > IDBDatabaseBackendMap;
+    typedef HashMap<String, RefPtr<IDBDatabaseBackend> > IDBDatabaseBackendMap;
     IDBDatabaseBackendMap m_databaseBackendMap;
 
     typedef HashMap<String, WeakPtr<IDBBackingStoreLevelDB> > IDBBackingStoreLevelDBMap;
index 560d19f9865a6dbf5df3897c83157583f027c125..a4dcb1ede2d2991bb62e9b51b3f293b07131c6bd 100644 (file)
@@ -1521,7 +1521,7 @@ int64_t IndexFreeListKey::indexId() const
 }
 
 // FIXME: We never use this to look up object store ids, because a mapping
-// is kept in the IDBDatabaseBackendImpl. Can the mapping become unreliable?
+// is kept in the IDBDatabaseBackend. Can the mapping become unreliable?
 // Can we remove this?
 const char* ObjectStoreNamesKey::decode(const char* start, const char* limit, ObjectStoreNamesKey* result)
 {
index 278d0f8131946869f0f54b9df2255f11e9445c4f..9ac39bfd313dce8a30fe1c572904e4896b5ebbe0 100644 (file)
@@ -281,7 +281,7 @@ private:
 class ObjectStoreNamesKey {
 public:
     // FIXME: We never use this to look up object store ids, because a mapping
-    // is kept in the IDBDatabaseBackendImpl. Can the mapping become unreliable?
+    // is kept in the IDBDatabaseBackend. Can the mapping become unreliable?
     // Can we remove this?
     static const char* decode(const char* start, const char* limit, ObjectStoreNamesKey* result);
     static Vector<char> encode(int64_t databaseId, const String& objectStoreName);
index f59716b8cab1248b1c60b2806bf4a3510996e2a9..022e4ac90e283df7e4295eb58a92dbeb83549eb0 100644 (file)
     <ClInclude Include="..\Modules\indexeddb\IDBCursor.h" />
     <ClInclude Include="..\Modules\indexeddb\IDBCursorBackend.h" />
     <ClInclude Include="..\Modules\indexeddb\IDBDatabase.h" />
-    <ClInclude Include="..\Modules\indexeddb\IDBDatabaseBackendImpl.h" />
-    <ClInclude Include="..\Modules\indexeddb\IDBDatabaseBackendInterface.h" />
+    <ClInclude Include="..\Modules\indexeddb\IDBDatabaseBackend.h" />
     <ClInclude Include="..\Modules\indexeddb\IDBDatabaseError.h" />
     <ClInclude Include="..\Modules\indexeddb\IDBDatabaseException.h" />
     <ClInclude Include="..\Modules\indexeddb\IDBFactory.h" />
index 20a723586e5d0b5df47f3e98724f7af9b1c1ef6c..df0d34696248a0169bae583c87b290e8829678fb 100644 (file)
                510D4A38103165EE0049EA54 /* SocketStreamHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */; };
                510EC42A18170C7500C897D6 /* IDBIndexWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510EC42818170C7500C897D6 /* IDBIndexWriter.cpp */; };
                510EC42B18170C7500C897D6 /* IDBIndexWriter.h in Headers */ = {isa = PBXBuildFile; fileRef = 510EC42918170C7500C897D6 /* IDBIndexWriter.h */; };
-               510EC44F181779D500C897D6 /* IDBDatabaseBackendImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510EC44D181779D500C897D6 /* IDBDatabaseBackendImpl.cpp */; };
-               510EC450181779D500C897D6 /* IDBDatabaseBackendImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 510EC44E181779D500C897D6 /* IDBDatabaseBackendImpl.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5112935F3D54B4B52FAF973F /* InspectorHeapProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */; };
                511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */; };
                511EF2C017F0FD3500E4FA16 /* JSIDBAny.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EF2A817F0FC4800E4FA16 /* JSIDBAny.cpp */; };
                51741D110B07259A00ED442C /* HistoryItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 51741D0D0B07259A00ED442C /* HistoryItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51741D120B07259A00ED442C /* HistoryItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51741D0E0B07259A00ED442C /* HistoryItem.cpp */; };
                5174E20A10A1F44F00F95E6F /* PopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5174E20810A1F44F00F95E6F /* PopStateEvent.h */; };
+               51771C8E182DB4B7008E781E /* IDBDatabaseBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */; };
+               51771C8F182DB4B7008E781E /* IDBDatabaseBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */; settings = {ATTRIBUTES = (Private, ); }; };
                517FBA1E151AB17C00B57959 /* DOMWindowExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */; };
                5189F01D10B37BD900F3C739 /* JSPopStateEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */; };
                5189F01E10B37BD900F3C739 /* JSPopStateEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 5189F01C10B37BD900F3C739 /* JSPopStateEvent.h */; };
                51D719C4181106E00016DC51 /* IDBCursorWithValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7197A181106DF0016DC51 /* IDBCursorWithValue.h */; };
                51D719C6181106E00016DC51 /* IDBDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D7197C181106DF0016DC51 /* IDBDatabase.cpp */; };
                51D719C7181106E00016DC51 /* IDBDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7197D181106DF0016DC51 /* IDBDatabase.h */; };
-               51D719C9181106E00016DC51 /* IDBDatabaseBackendInterface.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D7197F181106DF0016DC51 /* IDBDatabaseBackendInterface.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D719CA181106E00016DC51 /* IDBDatabaseCallbacks.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */; settings = {ATTRIBUTES = (Private, ); }; };
                51D719CB181106E00016DC51 /* IDBDatabaseCallbacksImpl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */; };
                51D719CC181106E00016DC51 /* IDBDatabaseCallbacksImpl.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D71982181106DF0016DC51 /* IDBDatabaseCallbacksImpl.h */; };
                510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamHandleClient.h; sourceTree = "<group>"; };
                510EC42818170C7500C897D6 /* IDBIndexWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBIndexWriter.cpp; sourceTree = "<group>"; };
                510EC42918170C7500C897D6 /* IDBIndexWriter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBIndexWriter.h; sourceTree = "<group>"; };
-               510EC44D181779D500C897D6 /* IDBDatabaseBackendImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseBackendImpl.cpp; sourceTree = "<group>"; };
-               510EC44E181779D500C897D6 /* IDBDatabaseBackendImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackendImpl.h; sourceTree = "<group>"; };
                511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorHeapProfilerAgent.cpp; sourceTree = "<group>"; };
                511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorHeapProfilerAgent.h; sourceTree = "<group>"; };
                511EF2A817F0FC4800E4FA16 /* JSIDBAny.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBAny.cpp; sourceTree = "<group>"; };
                51741D0E0B07259A00ED442C /* HistoryItem.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryItem.cpp; sourceTree = "<group>"; };
                5174E20810A1F44F00F95E6F /* PopStateEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopStateEvent.h; sourceTree = "<group>"; };
                5174E20B10A1F49A00F95E6F /* PopStateEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = PopStateEvent.idl; sourceTree = "<group>"; };
+               51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseBackend.cpp; sourceTree = "<group>"; };
+               51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackend.h; sourceTree = "<group>"; };
                517FBA17151AA71B00B57959 /* DOMWindowExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowExtension.cpp; sourceTree = "<group>"; };
                517FBA18151AA71B00B57959 /* DOMWindowExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowExtension.h; sourceTree = "<group>"; };
                5189F01B10B37BD900F3C739 /* JSPopStateEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPopStateEvent.cpp; sourceTree = "<group>"; };
                51D7197C181106DF0016DC51 /* IDBDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabase.cpp; sourceTree = "<group>"; };
                51D7197D181106DF0016DC51 /* IDBDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabase.h; sourceTree = "<group>"; };
                51D7197E181106DF0016DC51 /* IDBDatabase.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = IDBDatabase.idl; sourceTree = "<group>"; };
-               51D7197F181106DF0016DC51 /* IDBDatabaseBackendInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseBackendInterface.h; sourceTree = "<group>"; };
                51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseCallbacks.h; sourceTree = "<group>"; };
                51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBDatabaseCallbacksImpl.cpp; sourceTree = "<group>"; };
                51D71982181106DF0016DC51 /* IDBDatabaseCallbacksImpl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBDatabaseCallbacksImpl.h; sourceTree = "<group>"; };
                                51D7197C181106DF0016DC51 /* IDBDatabase.cpp */,
                                51D7197D181106DF0016DC51 /* IDBDatabase.h */,
                                51D7197E181106DF0016DC51 /* IDBDatabase.idl */,
-                               510EC44D181779D500C897D6 /* IDBDatabaseBackendImpl.cpp */,
-                               510EC44E181779D500C897D6 /* IDBDatabaseBackendImpl.h */,
-                               51D7197F181106DF0016DC51 /* IDBDatabaseBackendInterface.h */,
+                               51771C8C182DB4B7008E781E /* IDBDatabaseBackend.cpp */,
+                               51771C8D182DB4B7008E781E /* IDBDatabaseBackend.h */,
                                51D71980181106DF0016DC51 /* IDBDatabaseCallbacks.h */,
                                51D71981181106DF0016DC51 /* IDBDatabaseCallbacksImpl.cpp */,
                                51D71982181106DF0016DC51 /* IDBDatabaseCallbacksImpl.h */,
                                51C81B8A0C4422F70019ECE3 /* FTPDirectoryParser.h in Headers */,
                                FD31600D12B0267600C1A359 /* GainNode.h in Headers */,
                                935C477509AC4D8E00A6AAB4 /* GapRects.h in Headers */,
+                               51771C8F182DB4B7008E781E /* IDBDatabaseBackend.h in Headers */,
                                1432E8470C51493800B1500F /* GCController.h in Headers */,
                                C0C054CC1118C8E400CE2636 /* generate-bindings.pl in Headers */,
                                BC23F0DB0DAFF4A4009FDC91 /* GeneratedImage.h in Headers */,
                                935C476309AC4CE600A6AAB4 /* MouseEventWithHitTestResults.h in Headers */,
                                85031B480A44EFC700F992E0 /* MouseRelatedEvent.h in Headers */,
                                93309DFC099E64920056E581 /* MoveSelectionCommand.h in Headers */,
-                               510EC450181779D500C897D6 /* IDBDatabaseBackendImpl.h in Headers */,
                                FDB1700614A2BAB200A2B5D9 /* MultiChannelResampler.h in Headers */,
                                C6F0900A14327B6100685849 /* MutationCallback.h in Headers */,
                                85031B4A0A44EFC700F992E0 /* MutationEvent.h in Headers */,
                                BC5EB69A0E81DA6300B25965 /* StyleVisualData.h in Headers */,
                                D000ED2811C1B9CD00C47726 /* SubframeLoader.h in Headers */,
                                1FC40FBA1655CCB90040F29E /* SubimageCacheWithTimer.h in Headers */,
-                               51D719C9181106E00016DC51 /* IDBDatabaseBackendInterface.h in Headers */,
                                F55B3DD41251F12D003EF269 /* SubmitInputType.h in Headers */,
                                656D37480ADBA5DE00A4554D /* SubresourceLoader.h in Headers */,
                                659A7D130B6DB4D9001155B3 /* SubstituteData.h in Headers */,
                                1A2E6E7A0CC556D5004A2062 /* SQLiteAuthorizer.cpp in Sources */,
                                1A2246490CC98DDB00C05240 /* SQLiteDatabase.cpp in Sources */,
                                B5A684240FFABEAA00D24689 /* SQLiteFileSystem.cpp in Sources */,
+                               51771C8E182DB4B7008E781E /* IDBDatabaseBackend.cpp in Sources */,
                                1A22464B0CC98DDB00C05240 /* SQLiteStatement.cpp in Sources */,
                                1A22464D0CC98DDB00C05240 /* SQLiteTransaction.cpp in Sources */,
                                97BC6A411505F081001B74AC /* SQLResultSet.cpp in Sources */,
                                078E091117D14CEE00420AA1 /* RTCVoidRequestImpl.cpp in Sources */,
                                498391580F1E776900C23782 /* WebKitCSSMatrix.cpp in Sources */,
                                A24BF77C15CC3BAF003191F2 /* WebKitCSSMixFunctionValue.cpp in Sources */,
-                               510EC44F181779D500C897D6 /* IDBDatabaseBackendImpl.cpp in Sources */,
                                8AA61CFF144D595B00F37350 /* WebKitCSSRegionRule.cpp in Sources */,
                                5038BC0714711CDB0095E0D1 /* WebKitCSSShaderValue.cpp in Sources */,
                                0562F9461573ECEB0031CA16 /* WebKitCSSSVGDocumentValue.cpp in Sources */,
index 1a6db40efc07898620e2721ac70540ca80e5ea35..3405802f7849b5aeec4d5aeeaf49cb17be46ff71 100644 (file)
@@ -1,3 +1,26 @@
+2013-11-08  Brady Eidson  <beidson@apple.com>
+
+        Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
+        https://bugs.webkit.org/show_bug.cgi?id=124088
+
+        Reviewed by Tim Horton.
+
+        This abstraction is no longer meaningful in its current form in WebCore.
+        The current groundwork for the WK2 DatabaseProcess relied on this abstraction,
+        but that will be reworked in a future patch.
+
+        * DatabaseProcess/IndexedDB/DatabaseProcessIDBDatabaseBackend.h:
+
+        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
+        (WebKit::WebIDBFactoryBackend::maybeCreateTransactionBackend):
+        (WebKit::WebIDBFactoryBackend::createCursorBackend):
+        * WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
+
+        * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp:
+        (WebKit::WebProcessIDBDatabaseBackend::put):
+        (WebKit::WebProcessIDBDatabaseBackend::openCursor):
+        * WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h:
+
 2013-11-08  Jaehun Lim  <ljaehun.lim@samsung.com>
 
         Unreviewed build fix after r158984.
index ded0e630cddbbcda5469cf82d72f018412912ebb..62c045ef58dcf443db88091e0d6aea8879f61c3e 100644 (file)
@@ -27,7 +27,7 @@
 #define DatabaseProcessIDBDatabaseBackend_h
 
 #include "MessageSender.h"
-#include <WebCore/IDBDatabaseBackendInterface.h>
+#include <WebCore/IDBDatabaseBackend.h>
 
 #if ENABLE(INDEXED_DATABASE) && ENABLE(DATABASE_PROCESS)
 
@@ -35,7 +35,7 @@ namespace WebKit {
 
 class DatabaseToWebProcessConnection;
 
-// FIXME: When adding actual IDB logic, this class will inherit from WebCore::IDBDatabaseBackendInterface
+// FIXME: When adding actual IDB logic, this class will inherit from WebCore::IDBDatabaseBackend
 // instead of inheriting from RefCounted directly.
 // Doing so will also add a large number of interface methods to implement which is why I'm holding off for now.
 
index 4dd1d2c43fad473feab60048765405a3be5a71f5..a0c109bc77eda84ddd41b913e60456979ba1a699 100644 (file)
@@ -100,13 +100,13 @@ void WebIDBFactoryBackend::removeIDBDatabaseBackend(const String&)
     notImplemented();
 }
 
-PassRefPtr<IDBTransactionBackend> WebIDBFactoryBackend::maybeCreateTransactionBackend(IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode)
+PassRefPtr<IDBTransactionBackend> WebIDBFactoryBackend::maybeCreateTransactionBackend(IDBDatabaseBackend*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode)
 {
     notImplemented();
     return 0;
 }
 
-PassRefPtr<IDBCursorBackend> WebIDBFactoryBackend::createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, int64_t)
+PassRefPtr<IDBCursorBackend> WebIDBFactoryBackend::createCursorBackend(IDBTransactionBackend&, IDBBackingStoreCursorInterface&, IndexedDB::CursorType, IDBDatabaseBackend::TaskType, int64_t)
 {
     notImplemented();
     return 0;
index 06417b1419c021c10c49fd1ac3de32eaa3565ec7..ae991c8eaec84dcfad22d226d302cc3d7ffbd252 100644 (file)
@@ -45,9 +45,9 @@ public:
 
     virtual void removeIDBDatabaseBackend(const String& uniqueIdentifier) OVERRIDE;
 
-    virtual PassRefPtr<WebCore::IDBTransactionBackend> maybeCreateTransactionBackend(WebCore::IDBDatabaseBackendInterface*, int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const Vector<int64_t>&, WebCore::IndexedDB::TransactionMode) OVERRIDE;
+    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::IDBDatabaseBackendInterface::TaskType, int64_t objectStoreId) 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);
index f3794b894dd9502dfc637174d1a9731683cf6165..b84f59003e62266711964cb269d519fb048a4925 100644 (file)
@@ -116,7 +116,7 @@ void WebProcessIDBDatabaseBackend::get(int64_t transactionId, int64_t objectStor
     ASSERT_NOT_REACHED();
 }
 
-void WebProcessIDBDatabaseBackend::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&)
+void WebProcessIDBDatabaseBackend::put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<SharedBuffer> value, PassRefPtr<IDBKey>, IDBDatabaseBackend::PutMode, PassRefPtr<IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<IndexKeys>&)
 {
     ASSERT_NOT_REACHED();
 }
@@ -131,7 +131,7 @@ void WebProcessIDBDatabaseBackend::setIndexesReady(int64_t transactionId, int64_
     ASSERT_NOT_REACHED();
 }
 
-void WebProcessIDBDatabaseBackend::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr<IDBCallbacks>)
+void WebProcessIDBDatabaseBackend::openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange>, IndexedDB::CursorDirection, bool keyOnly, IDBDatabaseBackend::TaskType, PassRefPtr<IDBCallbacks>)
 {
     ASSERT_NOT_REACHED();
 }
index 3e57716cb8f3cbfe5eb864900c3756350a55362a..19e6de31b7c9b4a407e9ec23566d832fc9442fb1 100644 (file)
@@ -28,7 +28,7 @@
 #define WebProcessIDBDatabaseBackend_h
 
 #include "MessageSender.h"
-#include <WebCore/IDBDatabaseBackendInterface.h>
+#include <WebCore/IDBDatabaseBackend.h>
 
 #if ENABLE(INDEXED_DATABASE)
 #if ENABLE(DATABASE_PROCESS)
@@ -41,50 +41,50 @@ namespace WebKit {
 
 class WebIDBFactoryBackend;
 
-class WebProcessIDBDatabaseBackend FINAL : public WebCore::IDBDatabaseBackendInterface, public CoreIPC::MessageSender {
+class WebProcessIDBDatabaseBackend : public RefCounted<WebProcessIDBDatabaseBackend>, public CoreIPC::MessageSender {
 public:
     static PassRefPtr<WebProcessIDBDatabaseBackend> create(WebIDBFactoryBackend& factory, const String& name) { return adoptRef(new WebProcessIDBDatabaseBackend(factory, name)); }
 
     virtual ~WebProcessIDBDatabaseBackend();
 
-    virtual WebCore::IDBBackingStoreInterface* backingStore() const OVERRIDE;
+    virtual WebCore::IDBBackingStoreInterface* backingStore() const;
 
-    virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const WebCore::IDBKeyPath&, bool autoIncrement) OVERRIDE;
-    virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId) OVERRIDE;
-    virtual void createTransaction(int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode) OVERRIDE;
-    virtual void close(PassRefPtr<WebCore::IDBDatabaseCallbacks>) OVERRIDE;
+    virtual void createObjectStore(int64_t transactionId, int64_t objectStoreId, const String& name, const WebCore::IDBKeyPath&, bool autoIncrement);
+    virtual void deleteObjectStore(int64_t transactionId, int64_t objectStoreId);
+    virtual void createTransaction(int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseCallbacks>, const Vector<int64_t>& objectStoreIds, unsigned short mode);
+    virtual void close(PassRefPtr<WebCore::IDBDatabaseCallbacks>);
 
     // Transaction-specific operations.
-    virtual void commit(int64_t transactionId) OVERRIDE;
-    virtual void abort(int64_t transactionId) OVERRIDE;
-    virtual void abort(int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseError>) OVERRIDE;
+    virtual void commit(int64_t transactionId);
+    virtual void abort(int64_t transactionId);
+    virtual void abort(int64_t transactionId, PassRefPtr<WebCore::IDBDatabaseError>);
 
-    virtual void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const WebCore::IDBKeyPath&, bool unique, bool multiEntry) OVERRIDE;
-    virtual void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId) OVERRIDE;
+    virtual void createIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId, const String& name, const WebCore::IDBKeyPath&, bool unique, bool multiEntry);
+    virtual void deleteIndex(int64_t transactionId, int64_t objectStoreId, int64_t indexId);
 
-    virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<WebCore::IDBKeyRange>, bool keyOnly, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE;
+    virtual void get(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<WebCore::IDBKeyRange>, bool keyOnly, PassRefPtr<WebCore::IDBCallbacks>);
     // Note that 'value' may be consumed/adopted by this call.
-    virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::SharedBuffer> value, PassRefPtr<WebCore::IDBKey>, PutMode, PassRefPtr<WebCore::IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<WebCore::IndexKeys>&) OVERRIDE;
-    virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<WebCore::IndexKeys>&) OVERRIDE;
-    virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t>& indexIds) OVERRIDE;
-    virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<WebCore::IDBKeyRange>, WebCore::IndexedDB::CursorDirection, bool keyOnly, TaskType, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE;
-    virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE;
-    virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE;
-    virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::IDBCallbacks>) OVERRIDE;
+    virtual void put(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::SharedBuffer> value, PassRefPtr<WebCore::IDBKey>, WebCore::IDBDatabaseBackend::PutMode, PassRefPtr<WebCore::IDBCallbacks>, const Vector<int64_t>& indexIds, const Vector<WebCore::IndexKeys>&);
+    virtual void setIndexKeys(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::IDBKey> prpPrimaryKey, const Vector<int64_t>& indexIds, const Vector<WebCore::IndexKeys>&);
+    virtual void setIndexesReady(int64_t transactionId, int64_t objectStoreId, const Vector<int64_t>& indexIds);
+    virtual void openCursor(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<WebCore::IDBKeyRange>, WebCore::IndexedDB::CursorDirection, bool keyOnly, WebCore::IDBDatabaseBackend::TaskType, PassRefPtr<WebCore::IDBCallbacks>);
+    virtual void count(int64_t transactionId, int64_t objectStoreId, int64_t indexId, PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>);
+    virtual void deleteRange(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::IDBKeyRange>, PassRefPtr<WebCore::IDBCallbacks>);
+    virtual void clear(int64_t transactionId, int64_t objectStoreId, PassRefPtr<WebCore::IDBCallbacks>);
 
-    virtual int64_t id() const OVERRIDE;
-    virtual void addObjectStore(const WebCore::IDBObjectStoreMetadata&, int64_t newMaxObjectStoreId) OVERRIDE;
-    virtual void removeObjectStore(int64_t objectStoreId) OVERRIDE;
-    virtual void addIndex(int64_t objectStoreId, const WebCore::IDBIndexMetadata&, int64_t newMaxIndexId) OVERRIDE;
-    virtual void removeIndex(int64_t objectStoreId, int64_t indexId) OVERRIDE;
+    virtual int64_t id() const;
+    virtual void addObjectStore(const WebCore::IDBObjectStoreMetadata&, int64_t newMaxObjectStoreId);
+    virtual void removeObjectStore(int64_t objectStoreId);
+    virtual void addIndex(int64_t objectStoreId, const WebCore::IDBIndexMetadata&, int64_t newMaxIndexId);
+    virtual void removeIndex(int64_t objectStoreId, int64_t indexId);
 
-    virtual const WebCore::IDBDatabaseMetadata& metadata() const OVERRIDE;
-    virtual void setCurrentVersion(uint64_t) OVERRIDE;
+    virtual const WebCore::IDBDatabaseMetadata& metadata() const;
+    virtual void setCurrentVersion(uint64_t);
 
-    virtual bool hasPendingSecondHalfOpen() OVERRIDE;
-    virtual void setPendingSecondHalfOpen(PassOwnPtr<WebCore::IDBPendingOpenCall>) OVERRIDE;
+    virtual bool hasPendingSecondHalfOpen();
+    virtual void setPendingSecondHalfOpen(PassOwnPtr<WebCore::IDBPendingOpenCall>);
 
-    virtual WebCore::IDBFactoryBackendInterface& factoryBackend() OVERRIDE;
+    virtual WebCore::IDBFactoryBackendInterface& factoryBackend();
 
     void openConnection(PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::IDBDatabaseCallbacks>, int64_t transactionId, uint64_t version);
 
@@ -97,7 +97,7 @@ private:
     RefPtr<WebCore::SecurityOrigin> m_securityOrigin;
 
     // CoreIPC::MessageSender
-    virtual CoreIPC::Connection* messageSenderConnection() OVERRIDE;
+    virtual CoreIPC::Connection* messageSenderConnection();
     virtual uint64_t messageSenderDestinationID() OVERRIDE { return m_backendIdentifier; }
 
     uint64_t m_backendIdentifier;