Global rename of the class "IDBBackingStore" to "IDBBackingStoreLevelDB"
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Oct 2013 16:41:44 +0000 (16:41 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 19 Oct 2013 16:41:44 +0000 (16:41 +0000)
Rubberstamped by Anders Carlsson (And Andreas Kling wanted to, but he wasn’t around)

* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:

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

16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBTransactionBackendInterface.h
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h

index 9db1242..651971e 100644 (file)
@@ -1,3 +1,25 @@
+2013-10-19  Brady Eidson  <beidson@apple.com>
+
+        Global rename of the class "IDBBackingStore" to "IDBBackingStoreLevelDB"
+
+        Rubberstamped by Anders Carlsson (And Andreas Kling wanted to, but he wasn’t around)
+
+        * Modules/indexeddb/IDBTransactionBackendInterface.h:
+        * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBCursorBackendLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBObjectStoreBackendLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
+        * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:
+        * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.cpp:
+        * Modules/indexeddb/leveldb/IDBTransactionBackendLevelDBOperations.h:
+
 2013-10-19  peavo@outlook.com  <peavo@outlook.com>
 
         [WinCairo] Link fails.
index bd3a973..702b2e9 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace WebCore {
 
-class IDBBackingStore; // FIXME: IDBBackingStore is actually a LevelDB type doesn't belong in the cross-platform directory.
+class IDBBackingStoreLevelDB; // FIXME: IDBBackingStoreLevelDB is actually a LevelDB type doesn't belong in the cross-platform directory.
 class IDBCallbacks;
 class IDBDatabaseCallbacks;
 class IDBDatabaseError;
@@ -69,9 +69,9 @@ public:
     virtual void scheduleDeleteRangeOperation(int64_t objectStoreId, PassRefPtr<IDBKeyRange>, PassRefPtr<IDBCallbacks>) = 0;
     virtual void scheduleClearOperation(int64_t objectStoreId, PassRefPtr<IDBCallbacks>) = 0;
 
-    // FIXME: IDBBackingStore is actually a LevelDB type, but probably doesn't warrant abstraction.
+    // FIXME: IDBBackingStoreLevelDB is actually a LevelDB type, but probably doesn't warrant abstraction.
     // This is to keep the build working until this requirement can be removed.
-    virtual IDBBackingStore::Transaction* backingStoreTransaction() = 0;
+    virtual IDBBackingStoreLevelDB::Transaction* backingStoreTransaction() = 0;
 
     int64_t id() const { return m_id; }
 
index 93d371a..c8657e2 100644 (file)
@@ -51,7 +51,7 @@ using namespace IDBLevelDBCoding;
 
 const int64_t KeyGeneratorInitialNumber = 1; // From the IndexedDB specification.
 
-enum IDBBackingStoreErrorSource {
+enum IDBBackingStoreLevelDBErrorSource {
     // 0 - 2 are no longer used.
     FindKeyInIndex = 3,
     GetIDBDatabaseMetaData,
@@ -76,7 +76,7 @@ enum IDBBackingStoreErrorSource {
     IDBLevelDBBackingStoreInternalErrorMax,
 };
 
-static void recordInternalError(const char* type, IDBBackingStoreErrorSource location)
+static void recordInternalError(const char* type, IDBBackingStoreLevelDBErrorSource location)
 {
     String name = String::format("WebCore.IndexedDB.BackingStore.%sError", type);
     HistogramSupport::histogramEnumeration(name.utf8().data(), location, IDBLevelDBBackingStoreInternalErrorMax);
@@ -335,7 +335,7 @@ public:
     }
 };
 
-IDBBackingStore::IDBBackingStore(const String& identifier, PassOwnPtr<LevelDBDatabase> db, PassOwnPtr<LevelDBComparator> comparator)
+IDBBackingStoreLevelDB::IDBBackingStoreLevelDB(const String& identifier, PassOwnPtr<LevelDBDatabase> db, PassOwnPtr<LevelDBComparator> comparator)
     : m_identifier(identifier)
     , m_db(db)
     , m_comparator(comparator)
@@ -343,14 +343,14 @@ IDBBackingStore::IDBBackingStore(const String& identifier, PassOwnPtr<LevelDBDat
 {
 }
 
-IDBBackingStore::IDBBackingStore()
+IDBBackingStoreLevelDB::IDBBackingStoreLevelDB()
     : m_weakFactory(this)
 {
     // FIXME: this comments was related to Chromium code. It may be incorrect
     // This constructor should only be used in unit tests.
 }
 
-IDBBackingStore::~IDBBackingStore()
+IDBBackingStoreLevelDB::~IDBBackingStoreLevelDB()
 {
     // m_db's destructor uses m_comparator. The order of destruction is important.
     m_db.clear();
@@ -372,15 +372,15 @@ enum IDBLevelDBBackingStoreOpenResult {
     IDBLevelDBBackingStoreOpenMax,
 };
 
-PassRefPtr<IDBBackingStore> IDBBackingStore::open(SecurityOrigin* securityOrigin, const String& pathBaseArg, const String& fileIdentifier)
+PassRefPtr<IDBBackingStoreLevelDB> IDBBackingStoreLevelDB::open(SecurityOrigin* securityOrigin, const String& pathBaseArg, const String& fileIdentifier)
 {
     DefaultLevelDBFactory levelDBFactory;
-    return IDBBackingStore::open(securityOrigin, pathBaseArg, fileIdentifier, &levelDBFactory);
+    return IDBBackingStoreLevelDB::open(securityOrigin, pathBaseArg, fileIdentifier, &levelDBFactory);
 }
 
-PassRefPtr<IDBBackingStore> IDBBackingStore::open(SecurityOrigin* securityOrigin, const String& pathBaseArg, const String& fileIdentifier, LevelDBFactory* levelDBFactory)
+PassRefPtr<IDBBackingStoreLevelDB> IDBBackingStoreLevelDB::open(SecurityOrigin* securityOrigin, const String& pathBaseArg, const String& fileIdentifier, LevelDBFactory* levelDBFactory)
 {
-    LOG(StorageAPI, "IDBBackingStore::open");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::open");
     ASSERT(!pathBaseArg.isEmpty());
     String pathBase = pathBaseArg;
 
@@ -392,7 +392,7 @@ PassRefPtr<IDBBackingStore> IDBBackingStore::open(SecurityOrigin* securityOrigin
     if (!makeAllDirectories(pathBase)) {
         LOG_ERROR("Unable to create IndexedDB database path %s", pathBase.utf8().data());
         HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenFailedDirectory, IDBLevelDBBackingStoreOpenMax);
-        return PassRefPtr<IDBBackingStore>();
+        return PassRefPtr<IDBBackingStoreLevelDB>();
     }
 
     String path = pathByAppendingComponent(pathBase, securityOrigin->databaseIdentifier() + ".indexeddb.leveldb");
@@ -420,7 +420,7 @@ PassRefPtr<IDBBackingStore> IDBBackingStore::open(SecurityOrigin* securityOrigin
         if (!success) {
             LOG_ERROR("IndexedDB backing store cleanup failed");
             HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenCleanupDestroyFailed, IDBLevelDBBackingStoreOpenMax);
-            return PassRefPtr<IDBBackingStore>();
+            return PassRefPtr<IDBBackingStoreLevelDB>();
         }
 
         LOG_ERROR("IndexedDB backing store cleanup succeeded, reopening");
@@ -428,7 +428,7 @@ PassRefPtr<IDBBackingStore> IDBBackingStore::open(SecurityOrigin* securityOrigin
         if (!db) {
             LOG_ERROR("IndexedDB backing store reopen after recovery failed");
             HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenCleanupReopenFailed, IDBLevelDBBackingStoreOpenMax);
-            return PassRefPtr<IDBBackingStore>();
+            return PassRefPtr<IDBBackingStoreLevelDB>();
         }
         HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenCleanupReopenSuccess, IDBLevelDBBackingStoreOpenMax);
     }
@@ -436,46 +436,46 @@ PassRefPtr<IDBBackingStore> IDBBackingStore::open(SecurityOrigin* securityOrigin
     if (!db) {
         ASSERT_NOT_REACHED();
         HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenFailedUnknownErr, IDBLevelDBBackingStoreOpenMax);
-        return PassRefPtr<IDBBackingStore>();
+        return PassRefPtr<IDBBackingStoreLevelDB>();
     }
 
     return create(fileIdentifier, db.release(), comparator.release());
 }
 
-PassRefPtr<IDBBackingStore> IDBBackingStore::openInMemory(SecurityOrigin* securityOrigin, const String& identifier)
+PassRefPtr<IDBBackingStoreLevelDB> IDBBackingStoreLevelDB::openInMemory(SecurityOrigin* securityOrigin, const String& identifier)
 {
     DefaultLevelDBFactory levelDBFactory;
-    return IDBBackingStore::openInMemory(securityOrigin, identifier, &levelDBFactory);
+    return IDBBackingStoreLevelDB::openInMemory(securityOrigin, identifier, &levelDBFactory);
 }
 
-PassRefPtr<IDBBackingStore> IDBBackingStore::openInMemory(SecurityOrigin*, const String& identifier, LevelDBFactory*)
+PassRefPtr<IDBBackingStoreLevelDB> IDBBackingStoreLevelDB::openInMemory(SecurityOrigin*, const String& identifier, LevelDBFactory*)
 {
-    LOG(StorageAPI, "IDBBackingStore::openInMemory");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::openInMemory");
 
     OwnPtr<LevelDBComparator> comparator = adoptPtr(new Comparator());
     OwnPtr<LevelDBDatabase> db = LevelDBDatabase::openInMemory(comparator.get());
     if (!db) {
         LOG_ERROR("LevelDBDatabase::openInMemory failed.");
         HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenMemoryFailed, IDBLevelDBBackingStoreOpenMax);
-        return PassRefPtr<IDBBackingStore>();
+        return PassRefPtr<IDBBackingStoreLevelDB>();
     }
     HistogramSupport::histogramEnumeration("WebCore.IndexedDB.BackingStore.OpenStatus", IDBLevelDBBackingStoreOpenMemorySuccess, IDBLevelDBBackingStoreOpenMax);
 
     return create(identifier, db.release(), comparator.release());
 }
 
-PassRefPtr<IDBBackingStore> IDBBackingStore::create(const String& identifier, PassOwnPtr<LevelDBDatabase> db, PassOwnPtr<LevelDBComparator> comparator)
+PassRefPtr<IDBBackingStoreLevelDB> IDBBackingStoreLevelDB::create(const String& identifier, PassOwnPtr<LevelDBDatabase> db, PassOwnPtr<LevelDBComparator> comparator)
 {
     // FIXME: Handle comparator name changes.
-    RefPtr<IDBBackingStore> backingStore(adoptRef(new IDBBackingStore(identifier, db, comparator)));
+    RefPtr<IDBBackingStoreLevelDB> backingStore(adoptRef(new IDBBackingStoreLevelDB(identifier, db, comparator)));
 
     if (!setUpMetadata(backingStore->m_db.get(), identifier))
-        return PassRefPtr<IDBBackingStore>();
+        return PassRefPtr<IDBBackingStoreLevelDB>();
 
     return backingStore.release();
 }
 
-Vector<String> IDBBackingStore::getDatabaseNames()
+Vector<String> IDBBackingStoreLevelDB::getDatabaseNames()
 {
     Vector<String> foundNames;
     const Vector<char> startKey = DatabaseNameKey::encodeMinKeyForOrigin(m_identifier);
@@ -497,7 +497,7 @@ Vector<String> IDBBackingStore::getDatabaseNames()
     return foundNames;
 }
 
-bool IDBBackingStore::getIDBDatabaseMetaData(const String& name, IDBDatabaseMetadata* metadata, bool& found)
+bool IDBBackingStoreLevelDB::getIDBDatabaseMetaData(const String& name, IDBDatabaseMetadata* metadata, bool& found)
 {
     const Vector<char> key = DatabaseNameKey::encode(m_identifier, name);
     found = false;
@@ -576,7 +576,7 @@ WARN_UNUSED_RETURN static bool getNewDatabaseId(LevelDBDatabase* db, int64_t& ne
 }
 
 // FIXME: The version semantics have changed. String versions no longer exist, and the integer version is now a uint64_t
-bool IDBBackingStore::createIDBDatabaseMetaData(const String& name, const String& version, int64_t intVersion, int64_t& rowId)
+bool IDBBackingStoreLevelDB::createIDBDatabaseMetaData(const String& name, const String& version, int64_t intVersion, int64_t& rowId)
 {
     bool ok = getNewDatabaseId(m_db.get(), rowId);
     if (!ok)
@@ -597,7 +597,7 @@ bool IDBBackingStore::createIDBDatabaseMetaData(const String& name, const String
     return true;
 }
 
-bool IDBBackingStore::updateIDBDatabaseIntVersion(IDBBackingStore::Transaction* transaction, int64_t rowId, int64_t intVersion)
+bool IDBBackingStoreLevelDB::updateIDBDatabaseIntVersion(IDBBackingStoreLevelDB::Transaction* transaction, int64_t rowId, int64_t intVersion)
 {
     if (intVersion == IDBDatabaseMetadata::NoIntVersion)
         intVersion = IDBDatabaseMetadata::DefaultIntVersion;
@@ -606,7 +606,7 @@ bool IDBBackingStore::updateIDBDatabaseIntVersion(IDBBackingStore::Transaction*
     return true;
 }
 
-bool IDBBackingStore::updateIDBDatabaseMetaData(IDBBackingStore::Transaction* transaction, int64_t rowId, const String& version)
+bool IDBBackingStoreLevelDB::updateIDBDatabaseMetaData(IDBBackingStoreLevelDB::Transaction* transaction, int64_t rowId, const String& version)
 {
     putString(Transaction::levelDBTransactionFrom(transaction), DatabaseMetaDataKey::encode(rowId, DatabaseMetaDataKey::UserVersion), version);
     return true;
@@ -620,9 +620,9 @@ static void deleteRange(LevelDBTransaction* transaction, const Vector<char>& beg
 }
 
 
-bool IDBBackingStore::deleteDatabase(const String& name)
+bool IDBBackingStoreLevelDB::deleteDatabase(const String& name)
 {
-    LOG(StorageAPI, "IDBBackingStore::deleteDatabase");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::deleteDatabase");
     OwnPtr<LevelDBWriteOnlyTransaction> transaction = LevelDBWriteOnlyTransaction::create(m_db.get());
 
     IDBDatabaseMetadata metadata;
@@ -665,9 +665,9 @@ static bool checkObjectStoreAndMetaDataType(const LevelDBIterator* it, const Vec
 }
 
 // FIXME: This should do some error handling rather than plowing ahead when bad data is encountered.
-bool IDBBackingStore::getObjectStores(int64_t databaseId, IDBDatabaseMetadata::ObjectStoreMap* objectStores)
+bool IDBBackingStoreLevelDB::getObjectStores(int64_t databaseId, IDBDatabaseMetadata::ObjectStoreMap* objectStores)
 {
-    LOG(StorageAPI, "IDBBackingStore::getObjectStores");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::getObjectStores");
     if (!KeyPrefix::isValidDatabaseId(databaseId))
         return false;
     const Vector<char> startKey = ObjectStoreMetaDataKey::encode(databaseId, 1, 0);
@@ -780,12 +780,12 @@ WARN_UNUSED_RETURN static bool setMaxObjectStoreId(LevelDBTransaction* transacti
     return true;
 }
 
-bool IDBBackingStore::createObjectStore(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
+bool IDBBackingStoreLevelDB::createObjectStore(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const String& name, const IDBKeyPath& keyPath, bool autoIncrement)
 {
-    LOG(StorageAPI, "IDBBackingStore::createObjectStore");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::createObjectStore");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     if (!setMaxObjectStoreId(levelDBTransaction, databaseId, objectStoreId))
         return false;
 
@@ -811,12 +811,12 @@ bool IDBBackingStore::createObjectStore(IDBBackingStore::Transaction* transactio
     return true;
 }
 
-bool IDBBackingStore::deleteObjectStore(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId)
+bool IDBBackingStoreLevelDB::deleteObjectStore(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId)
 {
-    LOG(StorageAPI, "IDBBackingStore::deleteObjectStore");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::deleteObjectStore");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
 
     String objectStoreName;
     bool found = false;
@@ -840,12 +840,12 @@ bool IDBBackingStore::deleteObjectStore(IDBBackingStore::Transaction* transactio
     return clearObjectStore(transaction, databaseId, objectStoreId);
 }
 
-bool IDBBackingStore::getRecord(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey& key, Vector<char>& record)
+bool IDBBackingStoreLevelDB::getRecord(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey& key, Vector<char>& record)
 {
-    LOG(StorageAPI, "IDBBackingStore::getRecord");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::getRecord");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
 
     const Vector<char> leveldbKey = ObjectStoreDataKey::encode(databaseId, objectStoreId, key);
     Vector<char> data;
@@ -898,14 +898,14 @@ WARN_UNUSED_RETURN static bool getNewVersionNumber(LevelDBTransaction* transacti
     return true;
 }
 
-bool IDBBackingStore::putRecord(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey& key, PassRefPtr<SharedBuffer> prpValue, RecordIdentifier* recordIdentifier)
+bool IDBBackingStoreLevelDB::putRecord(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey& key, PassRefPtr<SharedBuffer> prpValue, RecordIdentifier* recordIdentifier)
 {
-    LOG(StorageAPI, "IDBBackingStore::putRecord");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::putRecord");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
     ASSERT(key.isValid());
 
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     int64_t version = -1;
     bool ok = getNewVersionNumber(levelDBTransaction, databaseId, objectStoreId, version);
     if (!ok)
@@ -928,12 +928,12 @@ bool IDBBackingStore::putRecord(IDBBackingStore::Transaction* transaction, int64
     return true;
 }
 
-bool IDBBackingStore::clearObjectStore(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId)
+bool IDBBackingStoreLevelDB::clearObjectStore(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId)
 {
-    LOG(StorageAPI, "IDBBackingStore::clearObjectStore");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::clearObjectStore");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     const Vector<char> startKey = KeyPrefix(databaseId, objectStoreId).encode();
     const Vector<char> stopKey = KeyPrefix(databaseId, objectStoreId + 1).encode();
 
@@ -941,12 +941,12 @@ bool IDBBackingStore::clearObjectStore(IDBBackingStore::Transaction* transaction
     return true;
 }
 
-bool IDBBackingStore::deleteRecord(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const RecordIdentifier& recordIdentifier)
+bool IDBBackingStoreLevelDB::deleteRecord(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const RecordIdentifier& recordIdentifier)
 {
-    LOG(StorageAPI, "IDBBackingStore::deleteRecord");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::deleteRecord");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
 
     const Vector<char> objectStoreDataKey = ObjectStoreDataKey::encode(databaseId, objectStoreId, recordIdentifier.primaryKey());
     levelDBTransaction->remove(objectStoreDataKey);
@@ -957,11 +957,11 @@ bool IDBBackingStore::deleteRecord(IDBBackingStore::Transaction* transaction, in
 }
 
 
-bool IDBBackingStore::getKeyGeneratorCurrentNumber(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t& keyGeneratorCurrentNumber)
+bool IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t& keyGeneratorCurrentNumber)
 {
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
 
     const Vector<char> keyGeneratorCurrentNumberKey = ObjectStoreMetaDataKey::encode(databaseId, objectStoreId, ObjectStoreMetaDataKey::KeyGeneratorCurrentNumber);
 
@@ -1007,11 +1007,11 @@ bool IDBBackingStore::getKeyGeneratorCurrentNumber(IDBBackingStore::Transaction*
     return keyGeneratorCurrentNumber;
 }
 
-bool IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t newNumber, bool checkCurrent)
+bool IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t newNumber, bool checkCurrent)
 {
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
 
     if (checkCurrent) {
         int64_t currentNumber;
@@ -1027,13 +1027,13 @@ bool IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber(IDBBackingStore::Tran
     return true;
 }
 
-bool IDBBackingStore::keyExistsInObjectStore(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey& key, RecordIdentifier* foundRecordIdentifier, bool& found)
+bool IDBBackingStoreLevelDB::keyExistsInObjectStore(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey& key, RecordIdentifier* foundRecordIdentifier, bool& found)
 {
-    LOG(StorageAPI, "IDBBackingStore::keyExistsInObjectStore");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::keyExistsInObjectStore");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
     found = false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     const Vector<char> leveldbKey = ObjectStoreDataKey::encode(databaseId, objectStoreId, key);
     Vector<char> data;
 
@@ -1070,9 +1070,9 @@ static bool checkIndexAndMetaDataKey(const LevelDBIterator* it, const Vector<cha
 
 
 // FIXME: This should do some error handling rather than plowing ahead when bad data is encountered.
-bool IDBBackingStore::getIndexes(int64_t databaseId, int64_t objectStoreId, IDBObjectStoreMetadata::IndexMap* indexes)
+bool IDBBackingStoreLevelDB::getIndexes(int64_t databaseId, int64_t objectStoreId, IDBObjectStoreMetadata::IndexMap* indexes)
 {
-    LOG(StorageAPI, "IDBBackingStore::getIndexes");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::getIndexes");
     if (!KeyPrefix::validIds(databaseId, objectStoreId))
         return false;
     const Vector<char> startKey = IndexMetaDataKey::encode(databaseId, objectStoreId, 0, 0);
@@ -1148,12 +1148,12 @@ WARN_UNUSED_RETURN static bool setMaxIndexId(LevelDBTransaction* transaction, in
     return true;
 }
 
-bool IDBBackingStore::createIndex(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath& keyPath, bool isUnique, bool isMultiEntry)
+bool IDBBackingStoreLevelDB::createIndex(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath& keyPath, bool isUnique, bool isMultiEntry)
 {
-    LOG(StorageAPI, "IDBBackingStore::createIndex");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::createIndex");
     if (!KeyPrefix::validIds(databaseId, objectStoreId, indexId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     if (!setMaxIndexId(levelDBTransaction, databaseId, objectStoreId, indexId))
         return false;
 
@@ -1169,12 +1169,12 @@ bool IDBBackingStore::createIndex(IDBBackingStore::Transaction* transaction, int
     return true;
 }
 
-bool IDBBackingStore::deleteIndex(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId)
+bool IDBBackingStoreLevelDB::deleteIndex(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId)
 {
-    LOG(StorageAPI, "IDBBackingStore::deleteIndex");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::deleteIndex");
     if (!KeyPrefix::validIds(databaseId, objectStoreId, indexId))
         return false;
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
 
     const Vector<char> indexMetaDataStart = IndexMetaDataKey::encode(databaseId, objectStoreId, indexId, 0);
     const Vector<char> indexMetaDataEnd = IndexMetaDataKey::encodeMaxKey(databaseId, objectStoreId, indexId);
@@ -1186,14 +1186,14 @@ bool IDBBackingStore::deleteIndex(IDBBackingStore::Transaction* transaction, int
     return true;
 }
 
-bool IDBBackingStore::putIndexDataForRecord(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& key, const RecordIdentifier& recordIdentifier)
+bool IDBBackingStoreLevelDB::putIndexDataForRecord(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& key, const RecordIdentifier& recordIdentifier)
 {
-    LOG(StorageAPI, "IDBBackingStore::putIndexDataForRecord");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::putIndexDataForRecord");
     ASSERT(key.isValid());
     if (!KeyPrefix::validIds(databaseId, objectStoreId, indexId))
         return false;
 
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     const Vector<char> indexDataKey = IndexDataKey::encode(databaseId, objectStoreId, indexId, encodeIDBKey(key), recordIdentifier.primaryKey());
 
     Vector<char> data;
@@ -1249,15 +1249,15 @@ static bool versionExists(LevelDBTransaction* transaction, int64_t databaseId, i
     return true;
 }
 
-bool IDBBackingStore::findKeyInIndex(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& key, Vector<char>& foundEncodedPrimaryKey, bool& found)
+bool IDBBackingStoreLevelDB::findKeyInIndex(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& key, Vector<char>& foundEncodedPrimaryKey, bool& found)
 {
-    LOG(StorageAPI, "IDBBackingStore::findKeyInIndex");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::findKeyInIndex");
     ASSERT(KeyPrefix::validIds(databaseId, objectStoreId, indexId));
 
     ASSERT(foundEncodedPrimaryKey.isEmpty());
     found = false;
 
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
     const Vector<char> leveldbKey = IndexDataKey::encode(databaseId, objectStoreId, indexId, key);
     OwnPtr<LevelDBIterator> it = levelDBTransaction->createIterator();
     it->seek(leveldbKey);
@@ -1291,9 +1291,9 @@ bool IDBBackingStore::findKeyInIndex(IDBBackingStore::Transaction* transaction,
     }
 }
 
-bool IDBBackingStore::getPrimaryKeyViaIndex(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& key, RefPtr<IDBKey>& primaryKey)
+bool IDBBackingStoreLevelDB::getPrimaryKeyViaIndex(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& key, RefPtr<IDBKey>& primaryKey)
 {
-    LOG(StorageAPI, "IDBBackingStore::getPrimaryKeyViaIndex");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::getPrimaryKeyViaIndex");
     if (!KeyPrefix::validIds(databaseId, objectStoreId, indexId))
         return false;
 
@@ -1312,9 +1312,9 @@ bool IDBBackingStore::getPrimaryKeyViaIndex(IDBBackingStore::Transaction* transa
     return true;
 }
 
-bool IDBBackingStore::keyExistsInIndex(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey, bool& exists)
+bool IDBBackingStoreLevelDB::keyExistsInIndex(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey, bool& exists)
 {
-    LOG(StorageAPI, "IDBBackingStore::keyExistsInIndex");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::keyExistsInIndex");
     if (!KeyPrefix::validIds(databaseId, objectStoreId, indexId))
         return false;
 
@@ -1332,7 +1332,7 @@ bool IDBBackingStore::keyExistsInIndex(IDBBackingStore::Transaction* transaction
     return true;
 }
 
-IDBBackingStore::Cursor::Cursor(const IDBBackingStore::Cursor* other)
+IDBBackingStoreLevelDB::Cursor::Cursor(const IDBBackingStoreLevelDB::Cursor* other)
     : m_transaction(other->m_transaction)
     , m_cursorOptions(other->m_cursorOptions)
     , m_currentKey(other->m_currentKey)
@@ -1347,7 +1347,7 @@ IDBBackingStore::Cursor::Cursor(const IDBBackingStore::Cursor* other)
     }
 }
 
-bool IDBBackingStore::Cursor::firstSeek()
+bool IDBBackingStoreLevelDB::Cursor::firstSeek()
 {
     m_iterator = m_transaction->createIterator();
     if (m_cursorOptions.forward)
@@ -1358,7 +1358,7 @@ bool IDBBackingStore::Cursor::firstSeek()
     return continueFunction(0, Ready);
 }
 
-bool IDBBackingStore::Cursor::advance(unsigned long count)
+bool IDBBackingStoreLevelDB::Cursor::advance(unsigned long count)
 {
     while (count--) {
         if (!continueFunction())
@@ -1367,7 +1367,7 @@ bool IDBBackingStore::Cursor::advance(unsigned long count)
     return true;
 }
 
-bool IDBBackingStore::Cursor::continueFunction(const IDBKey* key, IteratorState nextState)
+bool IDBBackingStoreLevelDB::Cursor::continueFunction(const IDBKey* key, IteratorState nextState)
 {
     RefPtr<IDBKey> previousKey = m_currentKey;
 
@@ -1465,7 +1465,7 @@ bool IDBBackingStore::Cursor::continueFunction(const IDBKey* key, IteratorState
     return true;
 }
 
-bool IDBBackingStore::Cursor::haveEnteredRange() const
+bool IDBBackingStoreLevelDB::Cursor::haveEnteredRange() const
 {
     if (m_cursorOptions.forward) {
         if (m_cursorOptions.lowOpen)
@@ -1479,7 +1479,7 @@ bool IDBBackingStore::Cursor::haveEnteredRange() const
     return compareIndexKeys(m_iterator->key(), m_cursorOptions.highKey) <= 0;
 }
 
-bool IDBBackingStore::Cursor::isPastBounds() const
+bool IDBBackingStoreLevelDB::Cursor::isPastBounds() const
 {
     if (m_cursorOptions.forward) {
         if (m_cursorOptions.highOpen)
@@ -1492,19 +1492,19 @@ bool IDBBackingStore::Cursor::isPastBounds() const
     return compareIndexKeys(m_iterator->key(), m_cursorOptions.lowKey) < 0;
 }
 
-class ObjectStoreKeyCursorImpl : public IDBBackingStore::Cursor {
+class ObjectStoreKeyCursorImpl : public IDBBackingStoreLevelDB::Cursor {
 public:
-    static PassRefPtr<ObjectStoreKeyCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
+    static PassRefPtr<ObjectStoreKeyCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
     {
         return adoptRef(new ObjectStoreKeyCursorImpl(transaction, cursorOptions));
     }
 
-    virtual PassRefPtr<IDBBackingStore::Cursor> clone()
+    virtual PassRefPtr<IDBBackingStoreLevelDB::Cursor> clone()
     {
         return adoptRef(new ObjectStoreKeyCursorImpl(this));
     }
 
-    // IDBBackingStore::Cursor
+    // IDBBackingStoreLevelDB::Cursor
     virtual PassRefPtr<SharedBuffer> value() const { ASSERT_NOT_REACHED(); return 0; }
     virtual bool loadCurrentRow();
 
@@ -1515,13 +1515,13 @@ protected:
     }
 
 private:
-    ObjectStoreKeyCursorImpl(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
-        : IDBBackingStore::Cursor(transaction, cursorOptions)
+    ObjectStoreKeyCursorImpl(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
+        : IDBBackingStoreLevelDB::Cursor(transaction, cursorOptions)
     {
     }
 
     ObjectStoreKeyCursorImpl(const ObjectStoreKeyCursorImpl* other)
-        : IDBBackingStore::Cursor(other)
+        : IDBBackingStoreLevelDB::Cursor(other)
     {
     }
 };
@@ -1553,19 +1553,19 @@ bool ObjectStoreKeyCursorImpl::loadCurrentRow()
     return true;
 }
 
-class ObjectStoreCursorImpl : public IDBBackingStore::Cursor {
+class ObjectStoreCursorImpl : public IDBBackingStoreLevelDB::Cursor {
 public:
-    static PassRefPtr<ObjectStoreCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
+    static PassRefPtr<ObjectStoreCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
     {
         return adoptRef(new ObjectStoreCursorImpl(transaction, cursorOptions));
     }
 
-    virtual PassRefPtr<IDBBackingStore::Cursor> clone()
+    virtual PassRefPtr<IDBBackingStoreLevelDB::Cursor> clone()
     {
         return adoptRef(new ObjectStoreCursorImpl(this));
     }
 
-    // IDBBackingStore::Cursor
+    // IDBBackingStoreLevelDB::Cursor
     virtual PassRefPtr<SharedBuffer> value() const { return m_currentValue; }
     virtual bool loadCurrentRow();
 
@@ -1576,13 +1576,13 @@ protected:
     }
 
 private:
-    ObjectStoreCursorImpl(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
-        : IDBBackingStore::Cursor(transaction, cursorOptions)
+    ObjectStoreCursorImpl(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
+        : IDBBackingStoreLevelDB::Cursor(transaction, cursorOptions)
     {
     }
 
     ObjectStoreCursorImpl(const ObjectStoreCursorImpl* other)
-        : IDBBackingStore::Cursor(other)
+        : IDBBackingStoreLevelDB::Cursor(other)
         , m_currentValue(other->m_currentValue)
     {
     }
@@ -1620,22 +1620,22 @@ bool ObjectStoreCursorImpl::loadCurrentRow()
     return true;
 }
 
-class IndexKeyCursorImpl : public IDBBackingStore::Cursor {
+class IndexKeyCursorImpl : public IDBBackingStoreLevelDB::Cursor {
 public:
-    static PassRefPtr<IndexKeyCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
+    static PassRefPtr<IndexKeyCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
     {
         return adoptRef(new IndexKeyCursorImpl(transaction, cursorOptions));
     }
 
-    virtual PassRefPtr<IDBBackingStore::Cursor> clone()
+    virtual PassRefPtr<IDBBackingStoreLevelDB::Cursor> clone()
     {
         return adoptRef(new IndexKeyCursorImpl(this));
     }
 
-    // IDBBackingStore::Cursor
+    // IDBBackingStoreLevelDB::Cursor
     virtual PassRefPtr<SharedBuffer> value() const { ASSERT_NOT_REACHED(); return 0; }
     virtual PassRefPtr<IDBKey> primaryKey() const { return m_primaryKey; }
-    virtual const IDBBackingStore::RecordIdentifier& recordIdentifier() const { ASSERT_NOT_REACHED(); return m_recordIdentifier; }
+    virtual const IDBBackingStoreLevelDB::RecordIdentifier& recordIdentifier() const { ASSERT_NOT_REACHED(); return m_recordIdentifier; }
     virtual bool loadCurrentRow();
 
 protected:
@@ -1645,13 +1645,13 @@ protected:
     }
 
 private:
-    IndexKeyCursorImpl(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
-        : IDBBackingStore::Cursor(transaction, cursorOptions)
+    IndexKeyCursorImpl(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
+        : IDBBackingStoreLevelDB::Cursor(transaction, cursorOptions)
     {
     }
 
     IndexKeyCursorImpl(const IndexKeyCursorImpl* other)
-        : IDBBackingStore::Cursor(other)
+        : IDBBackingStoreLevelDB::Cursor(other)
         , m_primaryKey(other->m_primaryKey)
     {
     }
@@ -1711,22 +1711,22 @@ bool IndexKeyCursorImpl::loadCurrentRow()
     return true;
 }
 
-class IndexCursorImpl : public IDBBackingStore::Cursor {
+class IndexCursorImpl : public IDBBackingStoreLevelDB::Cursor {
 public:
-    static PassRefPtr<IndexCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
+    static PassRefPtr<IndexCursorImpl> create(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
     {
         return adoptRef(new IndexCursorImpl(transaction, cursorOptions));
     }
 
-    virtual PassRefPtr<IDBBackingStore::Cursor> clone()
+    virtual PassRefPtr<IDBBackingStoreLevelDB::Cursor> clone()
     {
         return adoptRef(new IndexCursorImpl(this));
     }
 
-    // IDBBackingStore::Cursor
+    // IDBBackingStoreLevelDB::Cursor
     virtual PassRefPtr<SharedBuffer> value() const { return m_currentValue; }
     virtual PassRefPtr<IDBKey> primaryKey() const { return m_primaryKey; }
-    virtual const IDBBackingStore::RecordIdentifier& recordIdentifier() const { ASSERT_NOT_REACHED(); return m_recordIdentifier; }
+    virtual const IDBBackingStoreLevelDB::RecordIdentifier& recordIdentifier() const { ASSERT_NOT_REACHED(); return m_recordIdentifier; }
     bool loadCurrentRow();
 
 protected:
@@ -1736,13 +1736,13 @@ protected:
     }
 
 private:
-    IndexCursorImpl(LevelDBTransaction* transaction, const IDBBackingStore::Cursor::CursorOptions& cursorOptions)
-        : IDBBackingStore::Cursor(transaction, cursorOptions)
+    IndexCursorImpl(LevelDBTransaction* transaction, const IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
+        : IDBBackingStoreLevelDB::Cursor(transaction, cursorOptions)
     {
     }
 
     IndexCursorImpl(const IndexCursorImpl* other)
-        : IDBBackingStore::Cursor(other)
+        : IDBBackingStoreLevelDB::Cursor(other)
         , m_primaryKey(other->m_primaryKey)
         , m_currentValue(other->m_currentValue)
         , m_primaryLevelDBKey(other->m_primaryLevelDBKey)
@@ -1811,7 +1811,7 @@ bool IndexCursorImpl::loadCurrentRow()
     return true;
 }
 
-static bool objectStoreCursorOptions(LevelDBTransaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange* range, IndexedDB::CursorDirection direction, IDBBackingStore::Cursor::CursorOptions& cursorOptions)
+static bool objectStoreCursorOptions(LevelDBTransaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange* range, IndexedDB::CursorDirection direction, IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
 {
     cursorOptions.databaseId = databaseId;
     cursorOptions.objectStoreId = objectStoreId;
@@ -1861,7 +1861,7 @@ static bool objectStoreCursorOptions(LevelDBTransaction* transaction, int64_t da
     return true;
 }
 
-static bool indexCursorOptions(LevelDBTransaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange* range, IndexedDB::CursorDirection direction, IDBBackingStore::Cursor::CursorOptions& cursorOptions)
+static bool indexCursorOptions(LevelDBTransaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange* range, IndexedDB::CursorDirection direction, IDBBackingStoreLevelDB::Cursor::CursorOptions& cursorOptions)
 {
     ASSERT(transaction);
     if (!KeyPrefix::validIds(databaseId, objectStoreId, indexId))
@@ -1911,11 +1911,11 @@ static bool indexCursorOptions(LevelDBTransaction* transaction, int64_t database
     return true;
 }
 
-PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openObjectStoreCursor(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
+PassRefPtr<IDBBackingStoreLevelDB::Cursor> IDBBackingStoreLevelDB::openObjectStoreCursor(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
 {
-    LOG(StorageAPI, "IDBBackingStore::openObjectStoreCursor");
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
-    IDBBackingStore::Cursor::CursorOptions cursorOptions;
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::openObjectStoreCursor");
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
+    IDBBackingStoreLevelDB::Cursor::CursorOptions cursorOptions;
     if (!objectStoreCursorOptions(levelDBTransaction, databaseId, objectStoreId, range, direction, cursorOptions))
         return 0;
     RefPtr<ObjectStoreCursorImpl> cursor = ObjectStoreCursorImpl::create(levelDBTransaction, cursorOptions);
@@ -1925,11 +1925,11 @@ PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openObjectStoreCursor(IDBBa
     return cursor.release();
 }
 
-PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openObjectStoreKeyCursor(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
+PassRefPtr<IDBBackingStoreLevelDB::Cursor> IDBBackingStoreLevelDB::openObjectStoreKeyCursor(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
 {
-    LOG(StorageAPI, "IDBBackingStore::openObjectStoreKeyCursor");
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
-    IDBBackingStore::Cursor::CursorOptions cursorOptions;
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::openObjectStoreKeyCursor");
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
+    IDBBackingStoreLevelDB::Cursor::CursorOptions cursorOptions;
     if (!objectStoreCursorOptions(levelDBTransaction, databaseId, objectStoreId, range, direction, cursorOptions))
         return 0;
     RefPtr<ObjectStoreKeyCursorImpl> cursor = ObjectStoreKeyCursorImpl::create(levelDBTransaction, cursorOptions);
@@ -1939,11 +1939,11 @@ PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openObjectStoreKeyCursor(ID
     return cursor.release();
 }
 
-PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openIndexKeyCursor(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
+PassRefPtr<IDBBackingStoreLevelDB::Cursor> IDBBackingStoreLevelDB::openIndexKeyCursor(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
 {
-    LOG(StorageAPI, "IDBBackingStore::openIndexKeyCursor");
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
-    IDBBackingStore::Cursor::CursorOptions cursorOptions;
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::openIndexKeyCursor");
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
+    IDBBackingStoreLevelDB::Cursor::CursorOptions cursorOptions;
     if (!indexCursorOptions(levelDBTransaction, databaseId, objectStoreId, indexId, range, direction, cursorOptions))
         return 0;
     RefPtr<IndexKeyCursorImpl> cursor = IndexKeyCursorImpl::create(levelDBTransaction, cursorOptions);
@@ -1953,11 +1953,11 @@ PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openIndexKeyCursor(IDBBacki
     return cursor.release();
 }
 
-PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openIndexCursor(IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
+PassRefPtr<IDBBackingStoreLevelDB::Cursor> IDBBackingStoreLevelDB::openIndexCursor(IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange* range, IndexedDB::CursorDirection direction)
 {
-    LOG(StorageAPI, "IDBBackingStore::openIndexCursor");
-    LevelDBTransaction* levelDBTransaction = IDBBackingStore::Transaction::levelDBTransactionFrom(transaction);
-    IDBBackingStore::Cursor::CursorOptions cursorOptions;
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::openIndexCursor");
+    LevelDBTransaction* levelDBTransaction = IDBBackingStoreLevelDB::Transaction::levelDBTransactionFrom(transaction);
+    IDBBackingStoreLevelDB::Cursor::CursorOptions cursorOptions;
     if (!indexCursorOptions(levelDBTransaction, databaseId, objectStoreId, indexId, range, direction, cursorOptions))
         return 0;
     RefPtr<IndexCursorImpl> cursor = IndexCursorImpl::create(levelDBTransaction, cursorOptions);
@@ -1967,21 +1967,21 @@ PassRefPtr<IDBBackingStore::Cursor> IDBBackingStore::openIndexCursor(IDBBackingS
     return cursor.release();
 }
 
-IDBBackingStore::Transaction::Transaction(IDBBackingStore* backingStore)
+IDBBackingStoreLevelDB::Transaction::Transaction(IDBBackingStoreLevelDB* backingStore)
     : m_backingStore(backingStore)
 {
 }
 
-void IDBBackingStore::Transaction::begin()
+void IDBBackingStoreLevelDB::Transaction::begin()
 {
-    LOG(StorageAPI, "IDBBackingStore::Transaction::begin");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::Transaction::begin");
     ASSERT(!m_transaction);
     m_transaction = LevelDBTransaction::create(m_backingStore->m_db.get());
 }
 
-bool IDBBackingStore::Transaction::commit()
+bool IDBBackingStoreLevelDB::Transaction::commit()
 {
-    LOG(StorageAPI, "IDBBackingStore::Transaction::commit");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::Transaction::commit");
     ASSERT(m_transaction);
     bool result = m_transaction->commit();
     m_transaction.clear();
@@ -1990,9 +1990,9 @@ bool IDBBackingStore::Transaction::commit()
     return result;
 }
 
-void IDBBackingStore::Transaction::rollback()
+void IDBBackingStoreLevelDB::Transaction::rollback()
 {
-    LOG(StorageAPI, "IDBBackingStore::Transaction::rollback");
+    LOG(StorageAPI, "IDBBackingStoreLevelDB::Transaction::rollback");
     ASSERT(m_transaction);
     m_transaction->rollback();
     m_transaction.clear();
index 11601bf..691170d 100644 (file)
@@ -54,27 +54,27 @@ public:
     virtual bool destroyLevelDB(const String& fileName) = 0;
 };
 
-class IDBBackingStore : public RefCounted<IDBBackingStore> {
+class IDBBackingStoreLevelDB : public RefCounted<IDBBackingStoreLevelDB> {
 public:
     class Transaction;
 
-    virtual ~IDBBackingStore();
-    static PassRefPtr<IDBBackingStore> open(SecurityOrigin*, const String& pathBase, const String& fileIdentifier);
-    static PassRefPtr<IDBBackingStore> open(SecurityOrigin*, const String& pathBase, const String& fileIdentifier, LevelDBFactory*);
-    static PassRefPtr<IDBBackingStore> openInMemory(SecurityOrigin*, const String& identifier);
-    static PassRefPtr<IDBBackingStore> openInMemory(SecurityOrigin*, const String& identifier, LevelDBFactory*);
-    WeakPtr<IDBBackingStore> createWeakPtr() { return m_weakFactory.createWeakPtr(); }
+    virtual ~IDBBackingStoreLevelDB();
+    static PassRefPtr<IDBBackingStoreLevelDB> open(SecurityOrigin*, const String& pathBase, const String& fileIdentifier);
+    static PassRefPtr<IDBBackingStoreLevelDB> open(SecurityOrigin*, const String& pathBase, const String& fileIdentifier, LevelDBFactory*);
+    static PassRefPtr<IDBBackingStoreLevelDB> openInMemory(SecurityOrigin*, const String& identifier);
+    static PassRefPtr<IDBBackingStoreLevelDB> openInMemory(SecurityOrigin*, const String& identifier, LevelDBFactory*);
+    WeakPtr<IDBBackingStoreLevelDB> createWeakPtr() { return m_weakFactory.createWeakPtr(); }
 
     virtual Vector<String> getDatabaseNames();
     virtual bool getIDBDatabaseMetaData(const String& name, IDBDatabaseMetadata*, bool& success) WARN_UNUSED_RETURN;
     virtual bool createIDBDatabaseMetaData(const String& name, const String& version, int64_t intVersion, int64_t& rowId);
-    virtual bool updateIDBDatabaseMetaData(IDBBackingStore::Transaction*, int64_t rowId, const String& version);
-    virtual bool updateIDBDatabaseIntVersion(IDBBackingStore::Transaction*, int64_t rowId, int64_t intVersion);
+    virtual bool updateIDBDatabaseMetaData(IDBBackingStoreLevelDB::Transaction*, int64_t rowId, const String& version);
+    virtual bool updateIDBDatabaseIntVersion(IDBBackingStoreLevelDB::Transaction*, int64_t rowId, int64_t intVersion);
     virtual bool deleteDatabase(const String& name);
 
     bool getObjectStores(int64_t databaseId, IDBDatabaseMetadata::ObjectStoreMap*) WARN_UNUSED_RETURN;
-    virtual bool createObjectStore(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement);
-    virtual bool deleteObjectStore(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId) WARN_UNUSED_RETURN;
+    virtual bool createObjectStore(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const String& name, const IDBKeyPath&, bool autoIncrement);
+    virtual bool deleteObjectStore(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId) WARN_UNUSED_RETURN;
 
     class RecordIdentifier {
         WTF_MAKE_NONCOPYABLE(RecordIdentifier);
@@ -91,19 +91,19 @@ public:
         int64_t m_version;
     };
 
-    virtual bool getRecord(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, Vector<char>& record) WARN_UNUSED_RETURN;
-    virtual bool putRecord(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, PassRefPtr<SharedBuffer> value, RecordIdentifier*) WARN_UNUSED_RETURN;
-    virtual bool clearObjectStore(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId) WARN_UNUSED_RETURN;
-    virtual bool deleteRecord(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const RecordIdentifier&) WARN_UNUSED_RETURN;
-    virtual bool getKeyGeneratorCurrentNumber(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t& currentNumber) WARN_UNUSED_RETURN;
-    virtual bool maybeUpdateKeyGeneratorCurrentNumber(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t newState, bool checkCurrent) WARN_UNUSED_RETURN;
-    virtual bool keyExistsInObjectStore(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, RecordIdentifier* foundRecordIdentifier, bool& found) WARN_UNUSED_RETURN;
+    virtual bool getRecord(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, Vector<char>& record) WARN_UNUSED_RETURN;
+    virtual bool putRecord(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, PassRefPtr<SharedBuffer> value, RecordIdentifier*) WARN_UNUSED_RETURN;
+    virtual bool clearObjectStore(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId) WARN_UNUSED_RETURN;
+    virtual bool deleteRecord(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const RecordIdentifier&) WARN_UNUSED_RETURN;
+    virtual bool getKeyGeneratorCurrentNumber(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t& currentNumber) WARN_UNUSED_RETURN;
+    virtual bool maybeUpdateKeyGeneratorCurrentNumber(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t newState, bool checkCurrent) WARN_UNUSED_RETURN;
+    virtual bool keyExistsInObjectStore(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKey&, RecordIdentifier* foundRecordIdentifier, bool& found) WARN_UNUSED_RETURN;
 
-    virtual bool createIndex(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath&, bool isUnique, bool isMultiEntry) WARN_UNUSED_RETURN;
-    virtual bool deleteIndex(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId) WARN_UNUSED_RETURN;
-    virtual bool putIndexDataForRecord(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, const RecordIdentifier&) WARN_UNUSED_RETURN;
-    virtual bool getPrimaryKeyViaIndex(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, RefPtr<IDBKey>& primaryKey) WARN_UNUSED_RETURN;
-    virtual bool keyExistsInIndex(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey, bool& exists) WARN_UNUSED_RETURN;
+    virtual bool createIndex(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const String& name, const IDBKeyPath&, bool isUnique, bool isMultiEntry) WARN_UNUSED_RETURN;
+    virtual bool deleteIndex(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId) WARN_UNUSED_RETURN;
+    virtual bool putIndexDataForRecord(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, const RecordIdentifier&) WARN_UNUSED_RETURN;
+    virtual bool getPrimaryKeyViaIndex(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, RefPtr<IDBKey>& primaryKey) WARN_UNUSED_RETURN;
+    virtual bool keyExistsInIndex(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey& indexKey, RefPtr<IDBKey>& foundPrimaryKey, bool& exists) WARN_UNUSED_RETURN;
 
     class Cursor : public RefCounted<Cursor> {
     public:
@@ -142,7 +142,7 @@ public:
             , m_cursorOptions(cursorOptions)
         {
         }
-        explicit Cursor(const IDBBackingStore::Cursor* other);
+        explicit Cursor(const IDBBackingStoreLevelDB::Cursor* other);
 
         virtual Vector<char> encodeKey(const IDBKey&) = 0;
 
@@ -155,17 +155,17 @@ public:
         OwnPtr<LevelDBIterator> m_iterator;
 #endif
         RefPtr<IDBKey> m_currentKey;
-        IDBBackingStore::RecordIdentifier m_recordIdentifier;
+        IDBBackingStoreLevelDB::RecordIdentifier m_recordIdentifier;
     };
 
-    virtual PassRefPtr<Cursor> openObjectStoreKeyCursor(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IndexedDB::CursorDirection);
-    virtual PassRefPtr<Cursor> openObjectStoreCursor(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IndexedDB::CursorDirection);
-    virtual PassRefPtr<Cursor> openIndexKeyCursor(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IndexedDB::CursorDirection);
-    virtual PassRefPtr<Cursor> openIndexCursor(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IndexedDB::CursorDirection);
+    virtual PassRefPtr<Cursor> openObjectStoreKeyCursor(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IndexedDB::CursorDirection);
+    virtual PassRefPtr<Cursor> openObjectStoreCursor(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, const IDBKeyRange*, IndexedDB::CursorDirection);
+    virtual PassRefPtr<Cursor> openIndexKeyCursor(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IndexedDB::CursorDirection);
+    virtual PassRefPtr<Cursor> openIndexCursor(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IndexedDB::CursorDirection);
 
     class Transaction {
     public:
-        explicit Transaction(IDBBackingStore*);
+        explicit Transaction(IDBBackingStoreLevelDB*);
         void begin();
         bool commit();
         void rollback();
@@ -188,29 +188,29 @@ public:
         }
 
     private:
-        IDBBackingStore* m_backingStore;
+        IDBBackingStoreLevelDB* m_backingStore;
 #if USE(LEVELDB)
         RefPtr<LevelDBTransaction> m_transaction;
 #endif
     };
 
 protected:
-    IDBBackingStore(const String& identifier, PassOwnPtr<LevelDBDatabase>, PassOwnPtr<LevelDBComparator>);
+    IDBBackingStoreLevelDB(const String& identifier, PassOwnPtr<LevelDBDatabase>, PassOwnPtr<LevelDBComparator>);
 
     // Should only used for mocking.
-    IDBBackingStore();
+    IDBBackingStoreLevelDB();
 
 private:
-    static PassRefPtr<IDBBackingStore> create(const String& identifier, PassOwnPtr<LevelDBDatabase>, PassOwnPtr<LevelDBComparator>);
+    static PassRefPtr<IDBBackingStoreLevelDB> create(const String& identifier, PassOwnPtr<LevelDBDatabase>, PassOwnPtr<LevelDBComparator>);
 
-    bool findKeyInIndex(IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, Vector<char>& foundEncodedPrimaryKey, bool& found);
+    bool findKeyInIndex(IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey&, Vector<char>& foundEncodedPrimaryKey, bool& found);
     bool getIndexes(int64_t databaseId, int64_t objectStoreId, IDBObjectStoreMetadata::IndexMap*) WARN_UNUSED_RETURN;
 
     String m_identifier;
 
     OwnPtr<LevelDBDatabase> m_db;
     OwnPtr<LevelDBComparator> m_comparator;
-    WeakPtrFactory<IDBBackingStore> m_weakFactory;
+    WeakPtrFactory<IDBBackingStoreLevelDB> m_weakFactory;
 };
 
 } // namespace WebCore
index fbaef2c..a8fd1d6 100644 (file)
@@ -101,7 +101,7 @@ private:
     RefPtr<IDBCallbacks> m_callbacks;
 };
 
-IDBCursorBackendLevelDB::IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStore::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
+IDBCursorBackendLevelDB::IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStoreLevelDB::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
     : m_taskType(taskType)
     , m_cursorType(cursorType)
     , m_database(transaction->database())
index 08e14c6..5b6d847 100644 (file)
@@ -44,11 +44,11 @@ class IDBKeyRange;
 
 class IDBCursorBackendLevelDB : public IDBCursorBackendInterface {
 public:
-    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStore::Cursor> cursor, IndexedDB::CursorType cursorType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
+    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStoreLevelDB::Cursor> cursor, IndexedDB::CursorType cursorType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
     {
         return adoptRef(new IDBCursorBackendLevelDB(cursor, cursorType, IDBDatabaseBackendInterface::NormalTask, transaction, objectStoreId));
     }
-    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStore::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
+    static PassRefPtr<IDBCursorBackendLevelDB> create(PassRefPtr<IDBBackingStoreLevelDB::Cursor> cursor, IndexedDB::CursorType cursorType, IDBDatabaseBackendInterface::TaskType taskType, IDBTransactionBackendLevelDB* transaction, int64_t objectStoreId)
     {
         return adoptRef(new IDBCursorBackendLevelDB(cursor, cursorType, taskType, transaction, objectStoreId));
     }
@@ -68,7 +68,7 @@ public:
     void close();
 
 private:
-    IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStore::Cursor>, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, IDBTransactionBackendLevelDB*, int64_t objectStoreId);
+    IDBCursorBackendLevelDB(PassRefPtr<IDBBackingStoreLevelDB::Cursor>, IndexedDB::CursorType, IDBDatabaseBackendInterface::TaskType, IDBTransactionBackendLevelDB*, int64_t objectStoreId);
 
     class CursorIterationOperation;
     class CursorAdvanceOperation;
@@ -80,8 +80,8 @@ private:
     const RefPtr<IDBTransactionBackendLevelDB> m_transaction;
     const int64_t m_objectStoreId;
 
-    RefPtr<IDBBackingStore::Cursor> m_cursor; // Must be destroyed before m_transaction.
-    RefPtr<IDBBackingStore::Cursor> m_savedCursor; // Must be destroyed before m_transaction.
+    RefPtr<IDBBackingStoreLevelDB::Cursor> m_cursor; // Must be destroyed before m_transaction.
+    RefPtr<IDBBackingStoreLevelDB::Cursor> m_savedCursor; // Must be destroyed before m_transaction.
 
     bool m_closed;
 };
index 285722b..b887166 100644 (file)
@@ -42,7 +42,7 @@
 
 namespace WebCore {
 
-PassRefPtr<IDBDatabaseBackendLevelDB> IDBDatabaseBackendLevelDB::create(const String& name, IDBBackingStore* database, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
+PassRefPtr<IDBDatabaseBackendLevelDB> IDBDatabaseBackendLevelDB::create(const String& name, IDBBackingStoreLevelDB* database, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
 {
     RefPtr<IDBDatabaseBackendLevelDB> backend = adoptRef(new IDBDatabaseBackendLevelDB(name, database, factory, uniqueIdentifier));
     if (!backend->openInternal())
@@ -50,7 +50,7 @@ PassRefPtr<IDBDatabaseBackendLevelDB> IDBDatabaseBackendLevelDB::create(const St
     return backend.release();
 }
 
-IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB(const String& name, IDBBackingStore* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
+IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB(const String& name, IDBBackingStoreLevelDB* backingStore, IDBFactoryBackendInterface* factory, const String& uniqueIdentifier)
     : m_backingStore(backingStore)
     , m_metadata(name, InvalidId, 0, InvalidId)
     , m_identifier(uniqueIdentifier)
@@ -118,7 +118,7 @@ IDBDatabaseBackendLevelDB::~IDBDatabaseBackendLevelDB()
 {
 }
 
-PassRefPtr<IDBBackingStore> IDBDatabaseBackendLevelDB::backingStore() const
+PassRefPtr<IDBBackingStoreLevelDB> IDBDatabaseBackendLevelDB::backingStore() const
 {
     return m_backingStore;
 }
@@ -246,9 +246,9 @@ void IDBDatabaseBackendLevelDB::setIndexKeys(int64_t transactionId, int64_t obje
     ASSERT(transaction->mode() == IndexedDB::TransactionVersionChange);
 
     RefPtr<IDBKey> primaryKey = prpPrimaryKey;
-    RefPtr<IDBBackingStore> store = backingStore();
+    RefPtr<IDBBackingStoreLevelDB> store = backingStore();
     // FIXME: This method could be asynchronous, but we need to evaluate if it's worth the extra complexity.
-    IDBBackingStore::RecordIdentifier recordIdentifier;
+    IDBBackingStoreLevelDB::RecordIdentifier recordIdentifier;
     bool found = false;
     bool ok = store->keyExistsInObjectStore(transaction->backingStoreTransaction(), m_metadata.id, objectStoreId, *primaryKey, &recordIdentifier, found);
     if (!ok) {
index 6d7c3e4..762c7d1 100644 (file)
@@ -37,7 +37,7 @@
 
 namespace WebCore {
 
-class IDBBackingStore;
+class IDBBackingStoreLevelDB;
 class IDBDatabase;
 class IDBFactoryBackendInterface;
 class IDBTransactionBackendInterface;
@@ -45,10 +45,10 @@ class IDBTransactionCoordinatorLevelDB;
 
 class IDBDatabaseBackendLevelDB : public IDBDatabaseBackendInterface {
 public:
-    static PassRefPtr<IDBDatabaseBackendLevelDB> create(const String& name, IDBBackingStore* database, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
+    static PassRefPtr<IDBDatabaseBackendLevelDB> create(const String& name, IDBBackingStoreLevelDB* database, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
     virtual ~IDBDatabaseBackendLevelDB();
 
-    PassRefPtr<IDBBackingStore> backingStore() const;
+    PassRefPtr<IDBBackingStoreLevelDB> backingStore() const;
 
     static const int64_t InvalidId = 0;
     int64_t id() const { return m_metadata.id; }
@@ -93,7 +93,7 @@ public:
     class VersionChangeAbortOperation;
 
 private:
-    IDBDatabaseBackendLevelDB(const String& name, IDBBackingStore* database, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
+    IDBDatabaseBackendLevelDB(const String& name, IDBBackingStoreLevelDB* database, IDBFactoryBackendInterface*, const String& uniqueIdentifier);
 
     bool openInternal();
     void runIntVersionChangeTransaction(PassRefPtr<IDBCallbacks>, PassRefPtr<IDBDatabaseCallbacks>, int64_t transactionId, int64_t requestedVersion);
@@ -103,7 +103,7 @@ private:
     bool isDeleteDatabaseBlocked();
     void deleteDatabaseFinal(PassRefPtr<IDBCallbacks>);
 
-    RefPtr<IDBBackingStore> m_backingStore;
+    RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     IDBDatabaseMetadata m_metadata;
 
     String m_identifier;
index 33b6374..8745025 100644 (file)
@@ -83,7 +83,7 @@ void IDBFactoryBackendLevelDB::removeIDBDatabaseBackend(const String& uniqueIden
 void IDBFactoryBackendLevelDB::getDatabaseNames(PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> securityOrigin, ScriptExecutionContext*, const String& dataDirectory)
 {
     LOG(StorageAPI, "IDBFactoryBackendLevelDB::getDatabaseNames");
-    RefPtr<IDBBackingStore> backingStore = openBackingStore(securityOrigin, dataDirectory);
+    RefPtr<IDBBackingStoreLevelDB> backingStore = openBackingStore(securityOrigin, dataDirectory);
     if (!backingStore) {
         callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error opening backing store for indexedDB.webkitGetDatabaseNames."));
         return;
@@ -112,7 +112,7 @@ void IDBFactoryBackendLevelDB::deleteDatabase(const String& name, PassRefPtr<IDB
     }
 
     // FIXME: Everything from now on should be done on another thread.
-    RefPtr<IDBBackingStore> backingStore = openBackingStore(securityOrigin, dataDirectory);
+    RefPtr<IDBBackingStoreLevelDB> backingStore = openBackingStore(securityOrigin, dataDirectory);
     if (!backingStore) {
         callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error opening backing store for indexedDB.deleteDatabase."));
         return;
@@ -127,20 +127,20 @@ void IDBFactoryBackendLevelDB::deleteDatabase(const String& name, PassRefPtr<IDB
         callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error creating database backend for indexedDB.deleteDatabase."));
 }
 
-PassRefPtr<IDBBackingStore> IDBFactoryBackendLevelDB::openBackingStore(PassRefPtr<SecurityOrigin> securityOrigin, const String& dataDirectory)
+PassRefPtr<IDBBackingStoreLevelDB> IDBFactoryBackendLevelDB::openBackingStore(PassRefPtr<SecurityOrigin> securityOrigin, const String& dataDirectory)
 {
     const String fileIdentifier = computeFileIdentifier(securityOrigin.get());
     const bool openInMemory = dataDirectory.isEmpty();
 
-    IDBBackingStoreMap::iterator it2 = m_backingStoreMap.find(fileIdentifier);
+    IDBBackingStoreLevelDBMap::iterator it2 = m_backingStoreMap.find(fileIdentifier);
     if (it2 != m_backingStoreMap.end() && it2->value.get())
         return it2->value.get();
 
-    RefPtr<IDBBackingStore> backingStore;
+    RefPtr<IDBBackingStoreLevelDB> backingStore;
     if (openInMemory)
-        backingStore = IDBBackingStore::openInMemory(securityOrigin.get(), fileIdentifier);
+        backingStore = IDBBackingStoreLevelDB::openInMemory(securityOrigin.get(), fileIdentifier);
     else
-        backingStore = IDBBackingStore::open(securityOrigin.get(), dataDirectory, fileIdentifier);
+        backingStore = IDBBackingStoreLevelDB::open(securityOrigin.get(), dataDirectory, fileIdentifier);
 
     if (backingStore) {
         cleanWeakMap(m_backingStoreMap);
@@ -167,7 +167,7 @@ void IDBFactoryBackendLevelDB::open(const String& name, int64_t version, int64_t
     RefPtr<IDBDatabaseBackendLevelDB> databaseBackend;
     IDBDatabaseBackendMap::iterator it = m_databaseBackendMap.find(uniqueIdentifier);
     if (it == m_databaseBackendMap.end()) {
-        RefPtr<IDBBackingStore> backingStore = openBackingStore(securityOrigin, dataDirectory);
+        RefPtr<IDBBackingStoreLevelDB> backingStore = openBackingStore(securityOrigin, dataDirectory);
         if (!backingStore) {
             callbacks->onError(IDBDatabaseError::create(IDBDatabaseException::UnknownError, "Internal error opening backing store for indexedDB.open."));
             return;
index d820f5b..ff09d3f 100644 (file)
@@ -44,7 +44,7 @@ namespace WebCore {
 
 class DOMStringList;
 
-class IDBBackingStore;
+class IDBBackingStoreLevelDB;
 class IDBDatabaseBackendLevelDB;
 
 class IDBFactoryBackendLevelDB : public IDBFactoryBackendInterface {
@@ -65,16 +65,16 @@ public:
 
 protected:
     IDBFactoryBackendLevelDB();
-    virtual PassRefPtr<IDBBackingStore> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
+    virtual PassRefPtr<IDBBackingStoreLevelDB> openBackingStore(PassRefPtr<SecurityOrigin>, const String& dataDir);
 
 private:
     typedef HashMap<String, RefPtr<IDBDatabaseBackendLevelDB> > IDBDatabaseBackendMap;
     IDBDatabaseBackendMap m_databaseBackendMap;
 
-    typedef HashMap<String, WeakPtr<IDBBackingStore> > IDBBackingStoreMap;
-    IDBBackingStoreMap m_backingStoreMap;
+    typedef HashMap<String, WeakPtr<IDBBackingStoreLevelDB> > IDBBackingStoreLevelDBMap;
+    IDBBackingStoreLevelDBMap m_backingStoreMap;
 
-    HashSet<RefPtr<IDBBackingStore> > m_sessionOnlyBackingStores;
+    HashSet<RefPtr<IDBBackingStoreLevelDB> > m_sessionOnlyBackingStores;
 
     // Only one instance of the factory should exist at any given time.
     static IDBFactoryBackendLevelDB* idbFactoryBackendImpl;
index 753515d..78c5a2e 100644 (file)
@@ -44,7 +44,7 @@
 
 namespace WebCore {
 
-bool IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys(IDBBackingStore& backingStore, IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, bool& canAddKeys, const IDBKey* primaryKey, String* errorMessage) const
+bool IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys(IDBBackingStoreLevelDB& backingStore, IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, bool& canAddKeys, const IDBKey* primaryKey, String* errorMessage) const
 {
     canAddKeys = false;
     for (size_t i = 0; i < m_indexKeys.size(); ++i) {
@@ -61,7 +61,7 @@ bool IDBObjectStoreBackendLevelDB::IndexWriter::verifyIndexKeys(IDBBackingStore&
     return true;
 }
 
-void IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys(const IDBBackingStore::RecordIdentifier& recordIdentifier, IDBBackingStore& backingStore, IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId) const
+void IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys(const IDBBackingStoreLevelDB::RecordIdentifier& recordIdentifier, IDBBackingStoreLevelDB& backingStore, IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId) const
 {
     int64_t indexId = m_indexMetadata.id;
     for (size_t i = 0; i < m_indexKeys.size(); ++i) {
@@ -71,7 +71,7 @@ void IDBObjectStoreBackendLevelDB::IndexWriter::writeIndexKeys(const IDBBackingS
     }
 }
 
-bool IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed(IDBBackingStore& backingStore, IDBBackingStore::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey* indexKey, const IDBKey* primaryKey, bool& allowed) const
+bool IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed(IDBBackingStoreLevelDB& backingStore, IDBBackingStoreLevelDB::Transaction* transaction, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey* indexKey, const IDBKey* primaryKey, bool& allowed) const
 {
     allowed = false;
     if (!m_indexMetadata.unique) {
@@ -89,7 +89,7 @@ bool IDBObjectStoreBackendLevelDB::IndexWriter::addingKeyAllowed(IDBBackingStore
     return true;
 }
 
-bool IDBObjectStoreBackendLevelDB::makeIndexWriters(PassRefPtr<IDBTransactionBackendInterface> transaction, IDBBackingStore* backingStore, int64_t databaseId, const IDBObjectStoreMetadata& objectStore, PassRefPtr<IDBKey> primaryKey, bool keyWasGenerated, const Vector<int64_t>& indexIds, const Vector<IDBDatabaseBackendInterface::IndexKeys>& indexKeys, Vector<OwnPtr<IndexWriter>>* indexWriters, String* errorMessage, bool& completed)
+bool IDBObjectStoreBackendLevelDB::makeIndexWriters(PassRefPtr<IDBTransactionBackendInterface> transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, const IDBObjectStoreMetadata& objectStore, PassRefPtr<IDBKey> primaryKey, bool keyWasGenerated, const Vector<int64_t>& indexIds, const Vector<IDBDatabaseBackendInterface::IndexKeys>& indexKeys, Vector<OwnPtr<IndexWriter>>* indexWriters, String* errorMessage, bool& completed)
 {
     ASSERT(indexIds.size() == indexKeys.size());
     completed = false;
@@ -122,7 +122,7 @@ bool IDBObjectStoreBackendLevelDB::makeIndexWriters(PassRefPtr<IDBTransactionBac
     return true;
 }
 
-PassRefPtr<IDBKey> IDBObjectStoreBackendLevelDB::generateKey(PassRefPtr<IDBBackingStore> backingStore, PassRefPtr<IDBTransactionBackendLevelDB> transaction, int64_t databaseId, int64_t objectStoreId)
+PassRefPtr<IDBKey> IDBObjectStoreBackendLevelDB::generateKey(PassRefPtr<IDBBackingStoreLevelDB> backingStore, PassRefPtr<IDBTransactionBackendLevelDB> transaction, int64_t databaseId, int64_t objectStoreId)
 {
     const int64_t maxGeneratorValue = 9007199254740992LL; // Maximum integer storable as ECMAScript number.
     int64_t currentNumber;
@@ -137,7 +137,7 @@ PassRefPtr<IDBKey> IDBObjectStoreBackendLevelDB::generateKey(PassRefPtr<IDBBacki
     return IDBKey::createNumber(currentNumber);
 }
 
-bool IDBObjectStoreBackendLevelDB::updateKeyGenerator(PassRefPtr<IDBBackingStore> backingStore, PassRefPtr<IDBTransactionBackendLevelDB> transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey* key, bool checkCurrent)
+bool IDBObjectStoreBackendLevelDB::updateKeyGenerator(PassRefPtr<IDBBackingStoreLevelDB> backingStore, PassRefPtr<IDBTransactionBackendLevelDB> transaction, int64_t databaseId, int64_t objectStoreId, const IDBKey* key, bool checkCurrent)
 {
     ASSERT(key && key->type() == IDBKey::NumberType);
     return backingStore->maybeUpdateKeyGeneratorCurrentNumber(transaction->backingStoreTransaction(), databaseId, objectStoreId, static_cast<int64_t>(floor(key->number())) + 1, checkCurrent);
index c6b36b0..95577b5 100644 (file)
@@ -55,21 +55,21 @@ namespace IDBObjectStoreBackendLevelDB {
             , m_indexKeys(indexKeys)
         { }
 
-        bool verifyIndexKeys(IDBBackingStore&, IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, bool& canAddKeys, const IDBKey* primaryKey = 0, String* errorMessage = 0) const WARN_UNUSED_RETURN;
+        bool verifyIndexKeys(IDBBackingStoreLevelDB&, IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, bool& canAddKeys, const IDBKey* primaryKey = 0, String* errorMessage = 0) const WARN_UNUSED_RETURN;
 
-        void writeIndexKeys(const IDBBackingStore::RecordIdentifier&, IDBBackingStore&, IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId) const;
+        void writeIndexKeys(const IDBBackingStoreLevelDB::RecordIdentifier&, IDBBackingStoreLevelDB&, IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId) const;
 
     private:
-        bool addingKeyAllowed(IDBBackingStore&, IDBBackingStore::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey* indexKey, const IDBKey* primaryKey, bool& allowed) const WARN_UNUSED_RETURN;
+        bool addingKeyAllowed(IDBBackingStoreLevelDB&, IDBBackingStoreLevelDB::Transaction*, int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKey* indexKey, const IDBKey* primaryKey, bool& allowed) const WARN_UNUSED_RETURN;
 
         const IDBIndexMetadata m_indexMetadata;
         IDBDatabaseBackendInterface::IndexKeys m_indexKeys;
     };
 
-    bool makeIndexWriters(PassRefPtr<IDBTransactionBackendInterface>, IDBBackingStore*, int64_t databaseId, const IDBObjectStoreMetadata&, PassRefPtr<IDBKey> primaryKey, bool keyWasGenerated, const Vector<int64_t>& indexIds, const Vector<IDBDatabaseBackendInterface::IndexKeys>&, Vector<OwnPtr<IndexWriter>>* indexWriters, String* errorMessage, bool& completed) WARN_UNUSED_RETURN;
+    bool makeIndexWriters(PassRefPtr<IDBTransactionBackendInterface>, IDBBackingStoreLevelDB*, int64_t databaseId, const IDBObjectStoreMetadata&, PassRefPtr<IDBKey> primaryKey, bool keyWasGenerated, const Vector<int64_t>& indexIds, const Vector<IDBDatabaseBackendInterface::IndexKeys>&, Vector<OwnPtr<IndexWriter>>* indexWriters, String* errorMessage, bool& completed) WARN_UNUSED_RETURN;
 
-    PassRefPtr<IDBKey> generateKey(PassRefPtr<IDBBackingStore>, PassRefPtr<IDBTransactionBackendLevelDB>, int64_t databaseId, int64_t objectStoreId);
-    bool updateKeyGenerator(PassRefPtr<IDBBackingStore>, PassRefPtr<IDBTransactionBackendLevelDB>, int64_t databaseId, int64_t objectStoreId, const IDBKey*, bool checkCurrent);
+    PassRefPtr<IDBKey> generateKey(PassRefPtr<IDBBackingStoreLevelDB>, PassRefPtr<IDBTransactionBackendLevelDB>, int64_t databaseId, int64_t objectStoreId);
+    bool updateKeyGenerator(PassRefPtr<IDBBackingStoreLevelDB>, PassRefPtr<IDBTransactionBackendLevelDB>, int64_t databaseId, int64_t objectStoreId, const IDBKey*, bool checkCurrent);
 };
 
 } // namespace WebCore
index e5dbee9..a3a3bcf 100644 (file)
@@ -40,7 +40,7 @@
 
 namespace WebCore {
 
-PassRefPtr<IDBTransactionBackendLevelDB> IDBTransactionBackendLevelDB::create(IDBBackingStore* backingStore, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode, IDBDatabaseBackendLevelDB* database)
+PassRefPtr<IDBTransactionBackendLevelDB> IDBTransactionBackendLevelDB::create(IDBBackingStoreLevelDB* backingStore, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const Vector<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode, IDBDatabaseBackendLevelDB* database)
 {
     HashSet<int64_t> objectStoreHashSet;
     for (size_t i = 0; i < objectStoreIds.size(); ++i)
@@ -49,7 +49,7 @@ PassRefPtr<IDBTransactionBackendLevelDB> IDBTransactionBackendLevelDB::create(ID
     return adoptRef(new IDBTransactionBackendLevelDB(backingStore, id, callbacks, objectStoreHashSet, mode, database));
 }
 
-IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB(IDBBackingStore* backingStore, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode, IDBDatabaseBackendLevelDB* database)
+IDBTransactionBackendLevelDB::IDBTransactionBackendLevelDB(IDBBackingStoreLevelDB* backingStore, int64_t id, PassRefPtr<IDBDatabaseCallbacks> callbacks, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode mode, IDBDatabaseBackendLevelDB* database)
     : IDBTransactionBackendInterface(id)
     , m_objectStoreIds(objectStoreIds)
     , m_mode(mode)
index 765a9e6..4d5e4bc 100644 (file)
 
 namespace WebCore {
 
-class IDBBackingStore;
+class IDBBackingStoreLevelDB;
 class IDBCursorBackendLevelDB;
 class IDBDatabaseCallbacks;
 
 class IDBTransactionBackendLevelDB : public IDBTransactionBackendInterface {
 public:
-    static PassRefPtr<IDBTransactionBackendLevelDB> create(IDBBackingStore*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode, IDBDatabaseBackendLevelDB*);
+    static PassRefPtr<IDBTransactionBackendLevelDB> create(IDBBackingStoreLevelDB*, int64_t transactionId, PassRefPtr<IDBDatabaseCallbacks>, const Vector<int64_t>&, IndexedDB::TransactionMode, IDBDatabaseBackendLevelDB*);
     virtual ~IDBTransactionBackendLevelDB();
 
     virtual void commit() OVERRIDE FINAL;
@@ -68,7 +68,7 @@ public:
     void unregisterOpenCursor(IDBCursorBackendLevelDB*);
     void addPreemptiveEvent() { m_pendingPreemptiveEvents++; }
     void didCompletePreemptiveEvent() { m_pendingPreemptiveEvents--; ASSERT(m_pendingPreemptiveEvents >= 0); }
-    virtual IDBBackingStore::Transaction* backingStoreTransaction() OVERRIDE FINAL { return &m_transaction; }
+    virtual IDBBackingStoreLevelDB::Transaction* backingStoreTransaction() { return &m_transaction; }
 
     IDBDatabaseBackendLevelDB* database() const { return m_database.get(); }
 
@@ -86,7 +86,7 @@ public:
     virtual void scheduleClearOperation(int64_t objectStoreId, PassRefPtr<IDBCallbacks>) OVERRIDE FINAL;
     
 private:
-    IDBTransactionBackendLevelDB(IDBBackingStore*, int64_t id, PassRefPtr<IDBDatabaseCallbacks>, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode, IDBDatabaseBackendLevelDB*);
+    IDBTransactionBackendLevelDB(IDBBackingStoreLevelDB*, int64_t id, PassRefPtr<IDBDatabaseCallbacks>, const HashSet<int64_t>& objectStoreIds, IndexedDB::TransactionMode, IDBDatabaseBackendLevelDB*);
 
     enum State {
         Unused, // Created, but no tasks yet.
@@ -116,7 +116,7 @@ private:
     TaskQueue m_preemptiveTaskQueue;
     TaskQueue m_abortTaskQueue;
 
-    IDBBackingStore::Transaction m_transaction;
+    IDBBackingStoreLevelDB::Transaction m_transaction;
 
     // FIXME: delete the timer once we have threads instead.
     Timer<IDBTransactionBackendLevelDB> m_taskTimer;
@@ -124,7 +124,7 @@ private:
 
     HashSet<IDBCursorBackendLevelDB*> m_openCursors;
     
-    RefPtr<IDBBackingStore> m_backingStore;
+    RefPtr<IDBBackingStoreLevelDB> m_backingStore;
 };
 
 } // namespace WebCore
index fc34ce2..9e8de06 100644 (file)
@@ -87,7 +87,7 @@ void GetOperation::perform()
     if (m_keyRange->isOnlyKey())
         key = m_keyRange->lower();
     else {
-        RefPtr<IDBBackingStore::Cursor> backingStoreCursor;
+        RefPtr<IDBBackingStoreLevelDB::Cursor> backingStoreCursor;
         if (m_indexId == IDBIndexMetadata::InvalidId) {
             ASSERT(m_cursorType != IndexedDB::CursorKeyOnly);
             // ObjectStore Retrieval Operation
@@ -193,7 +193,7 @@ void PutOperation::perform()
     ASSERT(key);
     ASSERT(key->isValid());
 
-    IDBBackingStore::RecordIdentifier recordIdentifier;
+    IDBBackingStoreLevelDB::RecordIdentifier recordIdentifier;
     if (m_putMode == IDBDatabaseBackendInterface::AddOnly) {
         bool found = false;
         bool ok = m_backingStore->keyExistsInObjectStore(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStore.id, *key, &recordIdentifier, found);
@@ -261,7 +261,7 @@ void OpenCursorOperation::perform()
     if (m_taskType == IDBDatabaseBackendInterface::PreemptiveTask)
         m_transaction->addPreemptiveEvent();
 
-    RefPtr<IDBBackingStore::Cursor> backingStoreCursor;
+    RefPtr<IDBBackingStoreLevelDB::Cursor> backingStoreCursor;
     if (m_indexId == IDBIndexMetadata::InvalidId) {
         ASSERT(m_cursorType != IndexedDB::CursorKeyOnly);
         backingStoreCursor = m_backingStore->openObjectStoreCursor(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, m_keyRange.get(), m_direction);
@@ -287,7 +287,7 @@ void CountOperation::perform()
 {
     LOG(StorageAPI, "CountOperation");
     uint32_t count = 0;
-    RefPtr<IDBBackingStore::Cursor> backingStoreCursor;
+    RefPtr<IDBBackingStoreLevelDB::Cursor> backingStoreCursor;
 
     if (m_indexId == IDBIndexMetadata::InvalidId)
         backingStoreCursor = m_backingStore->openObjectStoreKeyCursor(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, m_keyRange.get(), IndexedDB::CursorNext);
@@ -308,7 +308,7 @@ void CountOperation::perform()
 void DeleteRangeOperation::perform()
 {
     LOG(StorageAPI, "DeleteRangeOperation");
-    RefPtr<IDBBackingStore::Cursor> backingStoreCursor = m_backingStore->openObjectStoreCursor(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, m_keyRange.get(), IndexedDB::CursorNext);
+    RefPtr<IDBBackingStoreLevelDB::Cursor> backingStoreCursor = m_backingStore->openObjectStoreCursor(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, m_keyRange.get(), IndexedDB::CursorNext);
     if (backingStoreCursor) {
         do {
             if (!m_backingStore->deleteRecord(m_transaction->backingStoreTransaction(), m_databaseId, m_objectStoreId, backingStoreCursor->recordIdentifier())) {
index 08deb41..faa7df8 100644 (file)
@@ -34,13 +34,13 @@ namespace WebCore {
 
 class CreateObjectStoreOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
     {
         return adoptPtr(new CreateObjectStoreOperation(transaction, backingStore, objectStoreMetadata));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    CreateObjectStoreOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
+    CreateObjectStoreOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_objectStoreMetadata(objectStoreMetadata)
@@ -48,19 +48,19 @@ private:
     }
     
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const IDBObjectStoreMetadata m_objectStoreMetadata;
 };
 
 class DeleteObjectStoreOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
     {
         return adoptPtr(new DeleteObjectStoreOperation(transaction, backingStore, objectStoreMetadata));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    DeleteObjectStoreOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
+    DeleteObjectStoreOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, const IDBObjectStoreMetadata& objectStoreMetadata)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_objectStoreMetadata(objectStoreMetadata)
@@ -68,7 +68,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const IDBObjectStoreMetadata m_objectStoreMetadata;
 };
 
@@ -154,13 +154,13 @@ private:
 
 class CreateIndexOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
     {
         return adoptPtr(new CreateIndexOperation(transaction, backingStore, objectStoreId, indexMetadata));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    CreateIndexOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
+    CreateIndexOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_objectStoreId(objectStoreId)
@@ -169,7 +169,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_objectStoreId;
     const IDBIndexMetadata m_indexMetadata;
 };
@@ -196,13 +196,13 @@ private:
 
 class DeleteIndexOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
     {
         return adoptPtr(new DeleteIndexOperation(transaction, backingStore, objectStoreId, indexMetadata));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    DeleteIndexOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
+    DeleteIndexOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t objectStoreId, const IDBIndexMetadata& indexMetadata)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_objectStoreId(objectStoreId)
@@ -211,7 +211,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_objectStoreId;
     const IDBIndexMetadata m_indexMetadata;
 };
@@ -238,13 +238,13 @@ private:
 
 class GetOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, const IDBDatabaseMetadata& metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorType cursorType, PassRefPtr<IDBCallbacks> callbacks)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, const IDBDatabaseMetadata& metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorType cursorType, PassRefPtr<IDBCallbacks> callbacks)
     {
         return adoptPtr(new GetOperation(transaction, backingStore, metadata, objectStoreId, indexId, keyRange, cursorType, callbacks));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    GetOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, const IDBDatabaseMetadata& metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorType cursorType, PassRefPtr<IDBCallbacks> callbacks)
+    GetOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, const IDBDatabaseMetadata& metadata, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, IndexedDB::CursorType cursorType, PassRefPtr<IDBCallbacks> callbacks)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(metadata.id)
@@ -261,7 +261,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_databaseId;
     const int64_t m_objectStoreId;
     const int64_t m_indexId;
@@ -274,13 +274,13 @@ private:
 
 class PutOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* 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<IDBDatabaseBackendInterface::IndexKeys>& indexKeys)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* 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<IDBDatabaseBackendInterface::IndexKeys>& indexKeys)
     {
         return adoptPtr(new PutOperation(transaction, backingStore, databaseId, objectStore, value, key, putMode, callbacks, indexIds, indexKeys));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    PutOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* 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<IDBDatabaseBackendInterface::IndexKeys>& indexKeys)
+    PutOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* 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<IDBDatabaseBackendInterface::IndexKeys>& indexKeys)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -295,7 +295,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_databaseId;
     const IDBObjectStoreMetadata m_objectStore;
     const RefPtr<SharedBuffer> m_value;
@@ -326,13 +326,13 @@ private:
 
 class OpenCursorOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* 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<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* 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)
     {
         return adoptPtr(new OpenCursorOperation(transaction, backingStore, databaseId, objectStoreId, indexId, keyRange, direction, cursorType, taskType, callbacks));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    OpenCursorOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* 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(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* 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)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -347,7 +347,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_databaseId;
     const int64_t m_objectStoreId;
     const int64_t m_indexId;
@@ -360,13 +360,13 @@ private:
 
 class CountOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
     {
         return adoptPtr(new CountOperation(transaction, backingStore, databaseId, objectStoreId, indexId, keyRange, callbacks));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    CountOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+    CountOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, int64_t objectStoreId, int64_t indexId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -378,7 +378,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_databaseId;
     const int64_t m_objectStoreId;
     const int64_t m_indexId;
@@ -388,13 +388,13 @@ private:
 
 class DeleteRangeOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
     {
         return adoptPtr(new DeleteRangeOperation(transaction, backingStore, databaseId, objectStoreId, keyRange, callbacks));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    DeleteRangeOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
+    DeleteRangeOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBKeyRange> keyRange, PassRefPtr<IDBCallbacks> callbacks)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -405,7 +405,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_databaseId;
     const int64_t m_objectStoreId;
     const RefPtr<IDBKeyRange> m_keyRange;
@@ -414,13 +414,13 @@ private:
 
 class ClearOperation : public IDBTransactionBackendLevelDB::Operation {
 public:
-    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
+    static PassOwnPtr<IDBTransactionBackendLevelDB::Operation> create(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
     {
         return adoptPtr(new ClearOperation(transaction, backingStore, databaseId, objectStoreId, callbacks));
     }
     virtual void perform() OVERRIDE FINAL;
 private:
-    ClearOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStore* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
+    ClearOperation(IDBTransactionBackendLevelDB* transaction, IDBBackingStoreLevelDB* backingStore, int64_t databaseId, int64_t objectStoreId, PassRefPtr<IDBCallbacks> callbacks)
         : m_transaction(transaction)
         , m_backingStore(backingStore)
         , m_databaseId(databaseId)
@@ -430,7 +430,7 @@ private:
     }
 
     RefPtr<IDBTransactionBackendLevelDB> m_transaction;
-    const RefPtr<IDBBackingStore> m_backingStore;
+    const RefPtr<IDBBackingStoreLevelDB> m_backingStore;
     const int64_t m_databaseId;
     const int64_t m_objectStoreId;
     const RefPtr<IDBCallbacks> m_callbacks;