Configure serviceWorkerRegistrationDirectory on the web site data store and move...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Feb 2018 19:25:21 +0000 (19:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Feb 2018 19:25:21 +0000 (19:25 +0000)
commite454a97e4078669e85d49587584f580a1d11e9e6
tree507e5b7c660f37244946624393c07987489b0222
parent40ba3321544aa91521ee97c72d45a72829d1b332
Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
https://bugs.webkit.org/show_bug.cgi?id=182403

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-02
Reviewed by Alex Christensen.

Source/WebKit:

WebsiteDataStore is the place to set configuration information such as service worker registration path.
This patch updates WebKit code accordingly.
By default, the service worker registration path is in a Caches subfolder, similarly to cache API path.

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithLegacyOptions):
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
(API::ProcessPoolConfiguration::ProcessPoolConfiguration):
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyServiceWorkerDatabaseDirectory): Deleted.
(WKContextConfigurationSetServiceWorkerDatabaseDirectory): Deleted.
* UIProcess/API/C/WKContextConfigurationRef.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultServiceWorkerRegistrationDirectory):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _serviceWorkerRegistrationDirectory]):
(-[WKWebsiteDataStore _setServiceWorkerRegistrationDirectory:]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureStorageProcessAndWebsiteDataStore):
(WebKit::WebProcessPool::initializeNewWebProcess):
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::serviceWorkerRegistrationDirectory const):
(WebKit::WebsiteDataStore::setServiceWorkerRegistrationDirectory):
* UIProcess/gtk/WebProcessPoolGtk.cpp:
* UIProcess/gtk/WebProcessPoolWPE.cpp:

Tools:

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::generateContextConfiguration const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@228019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.cpp
Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h
Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.cpp
Source/WebKit/UIProcess/API/C/WKContextConfigurationRef.h
Source/WebKit/UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h
Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
Source/WebKit/UIProcess/gtk/WebProcessPoolGtk.cpp
Source/WebKit/UIProcess/wpe/WebProcessPoolWPE.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm