Skip to content

Commit

Permalink
Merge r228109 - Storage Access API: Add testRunner.getAllStorageAcces…
Browse files Browse the repository at this point in the history
…sEntries() to make testing easier and more explicit

https://bugs.webkit.org/show_bug.cgi?id=181601
<rdar://problem/36475837>

Reviewed by Alex Christensen.

Source/WebCore:

No new tests. Existing test updated.

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const):

Source/WebKit:

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getAllStorageAccessEntries):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _getAllStorageAccessEntries:]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getAllStorageAccessEntries):
(WebKit::NetworkProcessProxy::allStorageAccessEntriesResult):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getAllStorageAccessEntries):
* UIProcess/WebsiteData/WebsiteDataStore.h:

Tools:

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStorageAccessAPIEnabled):
    Just moved for source file grouping.
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::getAllStorageAccessEntries):
    Note that this is just stubbed out, i.e. not implemented.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAllStorageAccessEntries):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::getAllStorageAccessEntries):
    This is the Cocoa-specific version of this test infrastructure.

LayoutTests:

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-expected.txt:
* http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html:
* platform/mac-wk2/TestExpectations:
    http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html
    no longer marked as flaky. Note that the wrong test was marked flaky. It should have been
    http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html.
  • Loading branch information
johnwilander authored and carlosgcampos committed Feb 19, 2018
1 parent 49c224a commit 3d2a827
Show file tree
Hide file tree
Showing 28 changed files with 310 additions and 39 deletions.
20 changes: 20 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,23 @@
2018-02-05 John Wilander <wilander@apple.com>

Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
https://bugs.webkit.org/show_bug.cgi?id=181601
<rdar://problem/36475837>

Reviewed by Alex Christensen.

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access-expected.txt:
* http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html:
* platform/mac-wk2/TestExpectations:
http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html
no longer marked as flaky. Note that the wrong test was marked flaky. It should have been
http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html.

2018-02-05 Chris Dumez <cdumez@apple.com>

Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html is flaky
Expand Down
Expand Up @@ -4,7 +4,8 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE


PASS Storage access was granted. document.cookie == firstPartyCookie=value, cookies seen server-side == {"firstPartyCookie":"value"}
PASS PASS. document.cookie == , cookies seen server-side == "No cookies"
PASS There is a storage access entry for localhost.
PASS There is no storage access entry for localhost after iframe detach.
PASS successfullyParsed is true

TEST COMPLETE
Expand Down
Expand Up @@ -23,28 +23,47 @@
}

const iframeID = "TheIframeThatRequestsStorageAccess";
function askIframeIfItHasStorageAccess() {
var iframeContentWindow = document.getElementById(iframeID).contentWindow;
iframeContentWindow.postMessage("reportBackCookies", "http://localhost:8000");
function askIfIframeStillHasStorageAccess() {
testRunner.getAllStorageAccessEntries(function (arrayOfDomains) {
var passed = true;
for (var i = 0; i < arrayOfDomains.length; ++i) {
if (arrayOfDomains[i] === "localhost") {
passed = false;
break;
}
}
if (passed)
testPassed("There is no storage access entry for localhost after iframe detach.");
else
testFailed("There is still a storage access entry for localhost after iframe detach.");
finishTest();
});
}

function detachIframeAndAskWhetherItStillHasStorageAccess() {
var theIframe = document.getElementById(iframeID);
theIframe.onload = askIframeIfItHasStorageAccess;
document.getElementsByTagName('body')[0].appendChild(theIframe);
function detachIframeAndCheckWhetherItStillHasStorageAccess() {
testRunner.getAllStorageAccessEntries(function (arrayOfDomains) {
var passed = false;
for (var i = 0; i < arrayOfDomains.length; ++i) {
if (arrayOfDomains[i] === "localhost") {
passed = true;
break;
}
}
if (passed)
testPassed("There is a storage access entry for localhost.");
else
testFailed("There is no storage access entry for localhost.");
var theIframe = document.getElementById(iframeID);
theIframe.onload = askIfIframeStillHasStorageAccess;
document.getElementsByTagName('body')[0].appendChild(theIframe);
});
}

const expectedPassMessages = 2;
var passMessagesReceived = 0;
function receiveMessage(event) {
if (event.origin === "http://localhost:8000") {
if (event.data.indexOf("PASS") !== -1) {
testPassed(event.data.replace("PASS ", ""));
passMessagesReceived++;
if (passMessagesReceived >= expectedPassMessages)
finishTest();
else
detachIframeAndAskWhetherItStillHasStorageAccess();
detachIframeAndCheckWhetherItStillHasStorageAccess();
} else {
testFailed(event.data);
finishTest();
Expand All @@ -60,14 +79,7 @@
var centerX = element.offsetLeft + element.offsetWidth / 2;
var centerY = element.offsetTop + element.offsetHeight / 2;
UIHelper.activateAt(centerX, centerY).then(
function () {
if (window.eventSender)
eventSender.keyDown("escape");
else {
testFailed("No eventSender.");
finishTest();
}
},
function () { },
function () {
testFailed("Promise rejected.");
finishTest();
Expand All @@ -77,8 +89,8 @@

function runTest() {
if (document.location.hash !== "#elementActivated") {
activateElement(iframeID);
document.location.hash = "elementActivated";
activateElement(iframeID);
}
}

Expand All @@ -99,6 +111,8 @@
</script>
</head>
<body>
<iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-modals" onload="runTest()" id="TheIframeThatRequestsStorageAccess" src="http://localhost:8000/storageAccess/resources/request-storage-access-iframe.html#userShouldGrantAccess,userShouldBeConsulted,policyShouldGrantAccess"></iframe>
<div>
<iframe sandbox="allow-storage-access-by-user-activation allow-scripts allow-same-origin allow-modals" onload="runTest()" id="TheIframeThatRequestsStorageAccess" src="http://localhost:8000/storageAccess/resources/request-storage-access-iframe.html#userShouldGrantAccess,userShouldBeConsulted,policyShouldGrantAccess"></iframe>
</div>
</body>
</html>
3 changes: 1 addition & 2 deletions LayoutTests/platform/mac-wk2/TestExpectations
Expand Up @@ -760,8 +760,7 @@ http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-r
[ HighSierra+ ] http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-non-recent-user-interaction.html [ Pass ]
[ HighSierra+ ] http/tests/storageAccess/has-storage-access-from-prevalent-domain-with-recent-user-interaction.html [ Pass ]
[ HighSierra+ ] http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html [ Pass ]

webkit.org/b/181601 [ HighSierra+ Release ] http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html [ Pass Failure ]
[ HighSierra+ ] http/tests/storageAccess/request-and-grant-access-then-navigate-should-not-have-access.html [ Pass ]

webkit.org/b/173861 [ Release ] http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html [ Pass Timeout ]
webkit.org/b/173861 [ Release ] http/tests/webrtc/filtering-ice-candidate-cross-origin-frame.html [ Pass Timeout ]
Expand Down
19 changes: 19 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,22 @@
2018-02-05 John Wilander <wilander@apple.com>

Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
https://bugs.webkit.org/show_bug.cgi?id=181601
<rdar://problem/36475837>

Reviewed by Alex Christensen.

No new tests. Existing test updated.

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::getAllStorageAccessEntries const):

2018-02-05 Chris Dumez <cdumez@apple.com>

Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/register-same-scope-different-script-url.https.html is flaky
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/platform/network/NetworkStorageSession.h
Expand Up @@ -106,6 +106,7 @@ class NetworkStorageSession {
WEBCORE_EXPORT void removePrevalentDomains(const Vector<String>& domains);
WEBCORE_EXPORT bool hasStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID) const;
WEBCORE_EXPORT bool hasStorageAccessForFrame(const ResourceRequest&, uint64_t frameID, uint64_t pageID) const;
WEBCORE_EXPORT Vector<String> getAllStorageAccessEntries() const;
WEBCORE_EXPORT void grantStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID);
WEBCORE_EXPORT void removeStorageAccessForFrame(uint64_t frameID, uint64_t pageID);
WEBCORE_EXPORT void removeStorageAccessForAllFramesOnPage(uint64_t pageID);
Expand Down
11 changes: 11 additions & 0 deletions Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Expand Up @@ -304,6 +304,17 @@ bool NetworkStorageSession::hasStorageAccessForFrame(const ResourceRequest& requ
return hasStorageAccessForFrame(getPartitioningDomain(request.url()), getPartitioningDomain(request.firstPartyForCookies()), frameID, pageID);
}

Vector<String> NetworkStorageSession::getAllStorageAccessEntries() const
{
Vector<String> entries;
for (auto& pageID : m_framesGrantedStorageAccess.keys()) {
auto it1 = m_framesGrantedStorageAccess.find(pageID);
for (auto& frameID : it1->value.keys())
entries.append(it1->value.find(frameID)->value);
}
return entries;
}

void NetworkStorageSession::grantStorageAccessForFrame(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID)
{
UNUSED_PARAM(firstPartyDomain);
Expand Down
29 changes: 29 additions & 0 deletions Source/WebKit/ChangeLog
@@ -1,3 +1,32 @@
2018-02-05 John Wilander <wilander@apple.com>

Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
https://bugs.webkit.org/show_bug.cgi?id=181601
<rdar://problem/36475837>

Reviewed by Alex Christensen.

http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getAllStorageAccessEntries):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _getAllStorageAccessEntries:]):
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getAllStorageAccessEntries):
(WebKit::NetworkProcessProxy::allStorageAccessEntriesResult):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Network/NetworkProcessProxy.messages.in:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::getAllStorageAccessEntries):
* UIProcess/WebsiteData/WebsiteDataStore.h:

2018-02-05 Daniel Bates <dabates@apple.com>

Disallow evaluating JavaScript from NPP_Destroy() in WebKit
Expand Down
8 changes: 8 additions & 0 deletions Source/WebKit/NetworkProcess/NetworkProcess.cpp
Expand Up @@ -361,6 +361,14 @@ void NetworkProcess::hasStorageAccessForFrame(PAL::SessionID sessionID, const St
ASSERT_NOT_REACHED();
}

void NetworkProcess::getAllStorageAccessEntries(PAL::SessionID sessionID, uint64_t contextId)
{
if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID))
parentProcessConnection()->send(Messages::NetworkProcessProxy::AllStorageAccessEntriesResult(networkStorageSession->getAllStorageAccessEntries(), contextId), 0);
else
ASSERT_NOT_REACHED();
}

void NetworkProcess::grantStorageAccessForFrame(PAL::SessionID sessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId)
{
bool isStorageGranted = false;
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/NetworkProcess/NetworkProcess.h
Expand Up @@ -137,6 +137,7 @@ class NetworkProcess : public ChildProcess, private DownloadManager::Client {
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
void updatePrevalentDomainsToPartitionOrBlockCookies(PAL::SessionID, const Vector<String>& domainsToPartition, const Vector<String>& domainsToBlock, const Vector<String>& domainsToNeitherPartitionNorBlock, bool shouldClearFirst);
void hasStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId);
void getAllStorageAccessEntries(PAL::SessionID, uint64_t contextId);
void grantStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId);
void removePrevalentDomains(PAL::SessionID, const Vector<String>& domains);
#endif
Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/NetworkProcess/NetworkProcess.messages.in
Expand Up @@ -84,6 +84,7 @@ messages -> NetworkProcess LegacyReceiver {
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
UpdatePrevalentDomainsToPartitionOrBlockCookies(PAL::SessionID sessionID, Vector<String> domainsToPartition, Vector<String> domainsToBlock, Vector<String> domainsToNeitherPartitionNorBlock, bool shouldClearFirst)
HasStorageAccessForFrame(PAL::SessionID sessionID, String resourceDomain, String firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId)
GetAllStorageAccessEntries(PAL::SessionID sessionID, uint64_t contextId)
GrantStorageAccessForFrame(PAL::SessionID sessionID, String resourceDomain, String firstPartyDomain, uint64_t frameID, uint64_t pageID, uint64_t contextId)
RemovePrevalentDomains(PAL::SessionID sessionID, Vector<String> domainsWithInteraction);
#endif
Expand Down
13 changes: 13 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
Expand Up @@ -28,6 +28,7 @@

#if WK_API_ENABLED

#import "APIString.h"
#import "WKHTTPCookieStoreInternal.h"
#import "WKNSArray.h"
#import "WKWebsiteDataRecordInternal.h"
Expand Down Expand Up @@ -656,6 +657,18 @@ + (void)_allowWebsiteDataRecordsForAllOrigins
WebKit::WebsiteDataStore::allowWebsiteDataRecordsForAllOrigins();
}

- (void)_getAllStorageAccessEntries:(void (^)(NSArray<NSString *> *domains))completionHandler
{
_websiteDataStore->websiteDataStore().getAllStorageAccessEntries([completionHandler = makeBlockPtr(completionHandler)](auto domains) {
Vector<RefPtr<API::Object>> apiDomains;
apiDomains.reserveInitialCapacity(domains.size());
for (auto& domain : domains)
apiDomains.uncheckedAppend(API::String::create(domain));

completionHandler(wrapper(API::Array::create(WTFMove(apiDomains))));
});
}

@end

#endif // WK_API_ENABLED
Expand Up @@ -89,6 +89,7 @@ typedef NS_OPTIONS(NSUInteger, _WKWebsiteDataStoreFetchOptions) {
- (void)_resourceLoadStatisticsClearInMemoryAndPersistentStoreModifiedSinceHours:(unsigned)hours completionHandler:(void (^)(void))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
- (void)_resourceLoadStatisticsResetToConsistentState WK_API_AVAILABLE(macosx(10.13), ios(11.0));
- (void)_setResourceLoadStatisticsTestingCallback:(nullable void (^)(WKWebsiteDataStore *, NSString *))callback WK_API_AVAILABLE(macosx(10.13), ios(11.0));
- (void)_getAllStorageAccessEntries:(void (^)(NSArray<NSString *> *domains))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+ (void)_allowWebsiteDataRecordsForAllOrigins WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
@end

Expand Down
14 changes: 14 additions & 0 deletions Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
Expand Up @@ -433,6 +433,20 @@ void NetworkProcessProxy::storageAccessRequestResult(bool wasGranted, uint64_t c
auto callback = m_storageAccessResponseCallbackMap.take(contextId);
callback(wasGranted);
}

void NetworkProcessProxy::getAllStorageAccessEntries(PAL::SessionID sessionID, CompletionHandler<void(Vector<String>&& domains)>&& callback)
{
auto contextId = nextRequestStorageAccessContextId();
auto addResult = m_allStorageAccessEntriesCallbackMap.add(contextId, WTFMove(callback));
ASSERT_UNUSED(addResult, addResult.isNewEntry);
send(Messages::NetworkProcess::GetAllStorageAccessEntries(sessionID, contextId), 0);
}

void NetworkProcessProxy::allStorageAccessEntriesResult(Vector<String>&& domains, uint64_t contextId)
{
auto callback = m_allStorageAccessEntriesCallbackMap.take(contextId);
callback(WTFMove(domains));
}
#endif

void NetworkProcessProxy::sendProcessWillSuspendImminently()
Expand Down
3 changes: 3 additions & 0 deletions Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
Expand Up @@ -80,6 +80,7 @@ class NetworkProcessProxy : public ChildProcessProxy, private ProcessThrottlerCl

#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
void hasStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&& callback);
void getAllStorageAccessEntries(PAL::SessionID, CompletionHandler<void(Vector<String>&& domains)>&&);
void grantStorageAccessForFrame(PAL::SessionID, const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, CompletionHandler<void(bool)>&& callback);
#endif

Expand Down Expand Up @@ -134,6 +135,7 @@ class NetworkProcessProxy : public ChildProcessProxy, private ProcessThrottlerCl
#endif
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
void storageAccessRequestResult(bool wasGranted, uint64_t contextId);
void allStorageAccessEntriesResult(Vector<String>&& domains, uint64_t contextId);
#endif

// ProcessLauncher::Client
Expand All @@ -157,6 +159,7 @@ class NetworkProcessProxy : public ChildProcessProxy, private ProcessThrottlerCl

HashMap<uint64_t, CompletionHandler<void(bool success)>> m_writeBlobToFilePathCallbackMap;
HashMap<uint64_t, WTF::CompletionHandler<void(bool wasGranted)>> m_storageAccessResponseCallbackMap;
HashMap<uint64_t, CompletionHandler<void(Vector<String>&& domains)>> m_allStorageAccessEntriesCallbackMap;
};

} // namespace WebKit
Expand Down
Expand Up @@ -46,4 +46,5 @@ messages -> NetworkProcessProxy LegacyReceiver {
#endif
#if HAVE(CFNETWORK_STORAGE_PARTITIONING)
StorageAccessRequestResult(bool wasGranted, uint64_t contextId)
AllStorageAccessEntriesResult(Vector<String> domains, uint64_t contextId)
}
6 changes: 6 additions & 0 deletions Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Expand Up @@ -1202,6 +1202,12 @@ void WebsiteDataStore::hasStorageAccessForFrameHandler(const String& resourceDom
processPool->networkProcess()->hasStorageAccessForFrame(m_sessionID, resourceDomain, firstPartyDomain, frameID, pageID, WTFMove(callback));
}

void WebsiteDataStore::getAllStorageAccessEntries(CompletionHandler<void(Vector<String>&& domains)>&& callback)
{
for (auto& processPool : processPools())
processPool->networkProcess()->getAllStorageAccessEntries(m_sessionID, WTFMove(callback));
}

void WebsiteDataStore::grantStorageAccessForFrameHandler(const String& resourceDomain, const String& firstPartyDomain, uint64_t frameID, uint64_t pageID, WTF::CompletionHandler<void(bool wasGranted)>&& callback)
{
for (auto& processPool : processPools())
Expand Down

0 comments on commit 3d2a827

Please sign in to comment.