Only cap lifetime of persistent cookies created client-side through document.cookie...
[WebKit-https.git] / Source / WebCore / platform / network / cf / NetworkStorageSessionCFNet.cpp
index fa04c8b..ffd6a61 100644 (file)
@@ -273,13 +273,14 @@ std::optional<Seconds> NetworkStorageSession::maxAgeCacheCap(const ResourceReque
     return std::nullopt;
 }
 
-void NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor(const Vector<String>& domains, bool clearFirst)
+void NetworkStorageSession::setShouldCapLifetimeForClientSideCookies(bool value)
 {
-    if (clearFirst) {
-        m_topPrivatelyControlledDomainsToBlock.clear();
-        m_framesGrantedStorageAccess.clear();
-    }
+    m_shouldCapLifetimeForClientSideCookies = value;
+}
 
+void NetworkStorageSession::setPrevalentDomainsToBlockCookiesFor(const Vector<String>& domains)
+{
+    m_topPrivatelyControlledDomainsToBlock.clear();
     m_topPrivatelyControlledDomainsToBlock.add(domains.begin(), domains.end());
 }