Get a directory path to SWServers for storing ServiceWorker registrations.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Dec 2017 21:50:31 +0000 (21:50 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Dec 2017 21:50:31 +0000 (21:50 +0000)
commitec8225a59c6cc00c94e9dd6b6d914736a8e7f854
tree57ca2e522e85a65f1c7a453762e7cce169de6030
parenta32829f9eba60f6570717595ed9e7af1482f778a
Get a directory path to SWServers for storing ServiceWorker registrations.
https://bugs.webkit.org/show_bug.cgi?id=180362

Reviewed by Chris Dumez.

Source/WebCore:

No new tests (No observable behavior change yet).

* workers/service/server/SWServer.cpp:
(WebCore::SWServer::SWServer):
* workers/service/server/SWServer.h:

Source/WebKit:

This gets all of the plumbing in place for specifying a ServiceWorker registration storage path
in a particular WebsiteDataStore.

* Shared/Storage/StorageProcessCreationParameters.cpp:
(WebKit::StorageProcessCreationParameters::encode const):
(WebKit::StorageProcessCreationParameters::decode):
* Shared/Storage/StorageProcessCreationParameters.h:

* StorageProcess/StorageProcess.cpp:
(WebKit::StorageProcess::initializeWebsiteDataStore):
(WebKit::StorageProcess::swServerForSession):
* StorageProcess/StorageProcess.h:

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
* UIProcess/API/APIProcessPoolConfiguration.h:

* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
* UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):

* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::legacyPlatformDefaultIndexedDBDatabaseDirectory):
(WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
* UIProcess/WebProcessPool.h:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::resolveDirectoriesIfNecessary):
(WebKit::WebsiteDataStore::storageProcessParameters):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::resolvedServiceWorkerRegistrationDirectory const):

* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):

* UIProcess/wpe/WebProcessPoolWPE.cpp:
(WebKit::WebProcessPool::legacyPlatformDefaultServiceWorkerRegistrationDirectory):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/WebCore/ChangeLog
Source/WebCore/workers/service/server/SWServer.cpp
Source/WebCore/workers/service/server/SWServer.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/Storage/StorageProcessCreationParameters.cpp
Source/WebKit/Shared/Storage/StorageProcessCreationParameters.h
Source/WebKit/StorageProcess/StorageProcess.cpp
Source/WebKit/StorageProcess/StorageProcess.h
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
Source/WebKit/UIProcess/API/APIWebsiteDataStore.h
Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp
Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp