Add SPI for setting media cache and key location on _WKWebsiteDataStoreConfiguration
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2019 19:32:48 +0000 (19:32 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2019 19:32:48 +0000 (19:32 +0000)
commitc8d0ca5803097f953f1f363fc4a9167e7d055ed0
treebc475608855d0846e48a67090dd0ef10c93f2071
parentc96bee6deeb234277a236e8f83bb3c4536afdf4c
Add SPI for setting media cache and key location on _WKWebsiteDataStoreConfiguration
https://bugs.webkit.org/show_bug.cgi?id=199972

Reviewed by Jer Noble.

Source/WebKit:

This is a step towards removing WebsiteDataStore::legacyDefaultDataStoreConfiguration
I added a unit test for the media cache location,
but the media key location can't reasonably be unit tested in an open source project.

* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _initWithConfiguration:]):
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
(-[_WKWebsiteDataStoreConfiguration mediaCacheDirectory]):
(-[_WKWebsiteDataStoreConfiguration setMediaCacheDirectory:]):
(-[_WKWebsiteDataStoreConfiguration mediaKeysStorageDirectory]):
(-[_WKWebsiteDataStoreConfiguration setMediaKeysStorageDirectory:]):

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
Tools/ChangeLog
Tools/TestWebKitAPI/TCPServer.cpp
Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm