ResourceLoadStatistics logic does not understand custom WebsiteData stores
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2017 02:54:31 +0000 (02:54 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Aug 2017 02:54:31 +0000 (02:54 +0000)
commitbf6785b4cb58268e719f98791240ede3d64cf0ad
tree4e500eb2c0f06382d728f57dd1ba4393dae39a65
parent6ff711a856571067d2da89599beb103da9deb640
ResourceLoadStatistics logic does not understand custom WebsiteData stores
https://bugs.webkit.org/show_bug.cgi?id=176037
<rdar://problem/33338238>

Reviewed by Alex Christensen.

Source/WebKit:

The NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains always notifies the default website
data store about observations it has made. This should be revised so that WebKit clients that register
custom data stores through the WKWebsiteDataStores API can be assured that observations made in one session
do not manipulate data from another session.

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::updateCookiePartitioningForTopPrivatelyOwnedDomains): Use the passed sessionID to locate
the correct NetworkStorageSession to notify about the new partitioning data.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in: Accept new argument.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::updateCookiePartitioningForTopPrivatelyOwnedDomains): Include the WebsiteDataStore's
session ID in the message to update cookie partition data.

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST): Update for ResourceLoadStatistics directories.

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