Refactor IDB factory creation.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 04:19:39 +0000 (04:19 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Oct 2013 04:19:39 +0000 (04:19 +0000)
commit0b70b8398e08656aa592f5d123d2bec30fbebf5b
tree10542d9a13acfdeec516ecf6da631dcc2ddb3fee
parent2e5b71f77f33c9cb78c04a156240474d7638df76
Refactor IDB factory creation.
https://bugs.webkit.org/show_bug.cgi?id=123347

Reviewed by Andreas Kling.

- Rework how database directory location is passed around.
- Make (some) SecurityOrigin arguments be references instead of pointers.
- Add two SecurityOrigin arguments to opening databases for future use.

Source/WebCore:

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):

* Modules/indexeddb/IDBFactoryBackendInterface.cpp:
(WebCore::IDBFactoryBackendInterface::create):
* Modules/indexeddb/IDBFactoryBackendInterface.h:

* Modules/indexeddb/PageGroupIndexedDatabase.cpp:
(WebCore::PageGroupIndexedDatabase::PageGroupIndexedDatabase):
(WebCore::PageGroupIndexedDatabase::from):
(WebCore::PageGroupIndexedDatabase::factoryBackend):
* Modules/indexeddb/PageGroupIndexedDatabase.h:

* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
(WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
(WebCore::WorkerGlobalScopeIndexedDatabase::from):
(WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
* Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h:

* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::open):
(WebCore::IDBBackingStoreLevelDB::openInMemory):
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:

* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
(WebCore::computeFileIdentifier):
(WebCore::computeUniqueIdentifier):
(WebCore::IDBFactoryBackendLevelDB::IDBFactoryBackendLevelDB):
(WebCore::IDBFactoryBackendLevelDB::getDatabaseNames):
(WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
(WebCore::IDBFactoryBackendLevelDB::openBackingStore):
(WebCore::IDBFactoryBackendLevelDB::open):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
(WebCore::IDBFactoryBackendLevelDB::create):

* WebCore.exp.in:

* platform/DatabaseStrategy.cpp:
(WebCore::DatabaseStrategy::createIDBFactoryBackend):
* platform/DatabaseStrategy.h:

Source/WebKit2:

* Shared/Databases/IndexedDB/IDBUtilities.cpp:
(WebKit::uniqueDatabaseIdentifier):
* Shared/Databases/IndexedDB/IDBUtilities.h:

* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
(WebKit::WebIDBFactoryBackend::WebIDBFactoryBackend):
(WebKit::WebIDBFactoryBackend::open):
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
(WebKit::WebIDBFactoryBackend::create):

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

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createIDBFactoryBackend):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
24 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBFactory.cpp
Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.cpp
Source/WebCore/Modules/indexeddb/IDBFactoryBackendInterface.h
Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.cpp
Source/WebCore/Modules/indexeddb/PageGroupIndexedDatabase.h
Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp
Source/WebCore/Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp
Source/WebCore/Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h
Source/WebCore/WebCore.exp.in
Source/WebCore/platform/DatabaseStrategy.cpp
Source/WebCore/platform/DatabaseStrategy.h
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Databases/IndexedDB/IDBUtilities.cpp
Source/WebKit2/Shared/Databases/IndexedDB/IDBUtilities.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.cpp
Source/WebKit2/WebProcess/Databases/IndexedDB/WebProcessIDBDatabaseBackend.h
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h