Title: [280575] trunk/Source/WebKit
Revision
280575
Author
[email protected]
Date
2021-08-02 17:55:12 -0700 (Mon, 02 Aug 2021)

Log Message

[App Privacy Report] Domains are deleted for ephemeral website data stores
https://bugs.webkit.org/show_bug.cgi?id=228708
<rdar://problem/81282432>

Reviewed by Alex Christensen.

No new tests. Since this data is not stored in WebKit, we have no
way to test when it gets deleted or not. I tested manually and requested
an automated test at the correct networking layer.

Only clear Privacy Report data if the website data store is
persistent. Safari calls the SPI to remove website data for ephemeral
data stores in some cases that are unrelated to a user clearing
website data or history and thus should not clear App Privacy Report
data. Additionally, it is unexpected that clearing an ephemeral data
store would clear disk data, as website data is only stored in memory
in this case.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSessionCocoa::removeNetworkWebsiteData):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (280574 => 280575)


--- trunk/Source/WebKit/ChangeLog	2021-08-03 00:55:06 UTC (rev 280574)
+++ trunk/Source/WebKit/ChangeLog	2021-08-03 00:55:12 UTC (rev 280575)
@@ -1,3 +1,26 @@
+2021-08-02  Kate Cheney  <[email protected]>
+
+        [App Privacy Report] Domains are deleted for ephemeral website data stores
+        https://bugs.webkit.org/show_bug.cgi?id=228708
+        <rdar://problem/81282432>
+
+        Reviewed by Alex Christensen.
+
+        No new tests. Since this data is not stored in WebKit, we have no
+        way to test when it gets deleted or not. I tested manually and requested
+        an automated test at the correct networking layer.
+
+        Only clear Privacy Report data if the website data store is
+        persistent. Safari calls the SPI to remove website data for ephemeral
+        data stores in some cases that are unrelated to a user clearing
+        website data or history and thus should not clear App Privacy Report
+        data. Additionally, it is unexpected that clearing an ephemeral data
+        store would clear disk data, as website data is only stored in memory
+        in this case.
+
+        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
+        (WebKit::NetworkSessionCocoa::removeNetworkWebsiteData):
+
 2021-08-02  Jean-Yves Avenard  <[email protected]>
 
         [WebAudio] Add webm/vorbis container support

Modified: trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm (280574 => 280575)


--- trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2021-08-03 00:55:06 UTC (rev 280574)
+++ trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm	2021-08-03 00:55:12 UTC (rev 280575)
@@ -1831,6 +1831,12 @@
 void NetworkSessionCocoa::removeNetworkWebsiteData(std::optional<WallTime> modifiedSince, std::optional<HashSet<WebCore::RegistrableDomain>>&& domains, CompletionHandler<void()>&& completionHandler)
 {
 #if ENABLE(APP_PRIVACY_REPORT) && HAVE(SYMPTOMS_FRAMEWORK)
+    // FIXME: Add automated test for this once rdar://81420753 is resolved.
+    if (sessionID().isEphemeral()) {
+        completionHandler();
+        return;
+    }
+
     auto bundleID = WebCore::applicationBundleIdentifier();
     if (!isParentProcessAFullWebBrowser(networkProcess()) && !isActingOnBehalfOfAFullWebBrowser(bundleID))
         return completionHandler();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to