<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[280139] releases/WebKitGTK/webkit-2.32/Source/WebKit</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/280139">280139</a></dd>
<dt>Author</dt> <dd>aperez@igalia.com</dd>
<dt>Date</dt> <dd>2021-07-21 08:31:17 -0700 (Wed, 21 Jul 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/280128">r280128</a> - REGRESSION(<a href="http://trac.webkit.org/projects/webkit/changeset/267763">r267763</a>): [SOUP] After network process crash, all cookies are lost until browser is restarted
https://bugs.webkit.org/show_bug.cgi?id=228128

Reviewed by Adrian Perez de Castro.

Cookies configuration is no longer stored to be sent again to the new network process after a crash.

* NetworkProcess/NetworkSessionCreationParameters.cpp:
(WebKit::NetworkSessionCreationParameters::encode const): Encode cookieAcceptPolicy.
(WebKit::NetworkSessionCreationParameters::decode): Decode cookieAcceptPolicy.
* NetworkProcess/NetworkSessionCreationParameters.h: Add cookieAcceptPolicy.
* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookie accept policy on NetworkStorageSession.
* UIProcess/API/glib/WebKitCookieManager.cpp:
(webkit_cookie_manager_set_persistent_storage): Use WebsiteDataStore API to cache the given values.
(webkit_cookie_manager_set_accept_policy): Ditto.
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebsiteData/WebsiteDataStore.h:
* UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp:
(WebKit::WebsiteDataStore::platformSetNetworkParameters): Set cached cookie settings to network session parameters.
(WebKit::WebsiteDataStore::setCookiePersistentStorage): Cache the given value and notify the cookie manager.
(WebKit::WebsiteDataStore::setHTTPCookieAcceptPolicy): Ditto.
* UIProcess/soup/WebCookieManagerProxySoup.cpp:
(WebKit::WebCookieManagerProxy::getCookiePersistentStorage const): Deleted.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitChangeLog">releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitNetworkProcessNetworkSessionCreationParameterscpp">releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitNetworkProcessNetworkSessionCreationParametersh">releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitNetworkProcesssoupNetworkSessionSoupcpp">releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitUIProcessAPIglibWebKitCookieManagercpp">releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitUIProcessWebCookieManagerProxyh">releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebCookieManagerProxy.h</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitUIProcessWebsiteDataWebsiteDataStoreh">releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitUIProcessWebsiteDatasoupWebsiteDataStoreSoupcpp">releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp</a></li>
<li><a href="#releasesWebKitGTKwebkit232SourceWebKitUIProcesssoupWebCookieManagerProxySoupcpp">releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/soup/WebCookieManagerProxySoup.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="releasesWebKitGTKwebkit232SourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog   2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog      2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2021-07-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        REGRESSION(r267763): [SOUP] After network process crash, all cookies are lost until browser is restarted
+        https://bugs.webkit.org/show_bug.cgi?id=228128
+
+        Reviewed by Adrian Perez de Castro.
+
+        Cookies configuration is no longer stored to be sent again to the new network process after a crash.
+
+        * NetworkProcess/NetworkSessionCreationParameters.cpp:
+        (WebKit::NetworkSessionCreationParameters::encode const): Encode cookieAcceptPolicy.
+        (WebKit::NetworkSessionCreationParameters::decode): Decode cookieAcceptPolicy.
+        * NetworkProcess/NetworkSessionCreationParameters.h: Add cookieAcceptPolicy.
+        * NetworkProcess/soup/NetworkSessionSoup.cpp:
+        (WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookie accept policy on NetworkStorageSession.
+        * UIProcess/API/glib/WebKitCookieManager.cpp:
+        (webkit_cookie_manager_set_persistent_storage): Use WebsiteDataStore API to cache the given values.
+        (webkit_cookie_manager_set_accept_policy): Ditto.
+        * UIProcess/WebCookieManagerProxy.h:
+        * UIProcess/WebsiteData/WebsiteDataStore.h:
+        * UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp:
+        (WebKit::WebsiteDataStore::platformSetNetworkParameters): Set cached cookie settings to network session parameters.
+        (WebKit::WebsiteDataStore::setCookiePersistentStorage): Cache the given value and notify the cookie manager.
+        (WebKit::WebsiteDataStore::setHTTPCookieAcceptPolicy): Ditto.
+        * UIProcess/soup/WebCookieManagerProxySoup.cpp:
+        (WebKit::WebCookieManagerProxy::getCookiePersistentStorage const): Deleted.
+
</ins><span class="cx"> 2021-07-20  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GTK][WPE] Fix compilation when ATK is not used
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitNetworkProcessNetworkSessionCreationParameterscpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp 2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp    2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -64,6 +64,7 @@
</span><span class="cx">     encoder << persistentCredentialStorageEnabled;
</span><span class="cx">     encoder << ignoreTLSErrors;
</span><span class="cx">     encoder << proxySettings;
</span><ins>+    encoder << cookieAcceptPolicy;
</ins><span class="cx"> #endif
</span><span class="cx"> #if USE(CURL)
</span><span class="cx">     encoder << cookiePersistentStorageFile;
</span><span class="lines">@@ -188,6 +189,11 @@
</span><span class="cx">     decoder >> proxySettings;
</span><span class="cx">     if (!proxySettings)
</span><span class="cx">         return WTF::nullopt;
</span><ins>+
+    Optional<WebCore::HTTPCookieAcceptPolicy> cookieAcceptPolicy;
+    decoder >> cookieAcceptPolicy;
+    if (!cookieAcceptPolicy)
+        return WTF::nullopt;
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(CURL)
</span><span class="lines">@@ -312,6 +318,7 @@
</span><span class="cx">         , WTFMove(*persistentCredentialStorageEnabled)
</span><span class="cx">         , WTFMove(*ignoreTLSErrors)
</span><span class="cx">         , WTFMove(*proxySettings)
</span><ins>+        , WTFMove(*cookieAcceptPolicy)
</ins><span class="cx"> #endif
</span><span class="cx"> #if USE(CURL)
</span><span class="cx">         , WTFMove(*cookiePersistentStorageFile)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitNetworkProcessNetworkSessionCreationParametersh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h   2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h      2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span><span class="cx"> #include "SoupCookiePersistentStorageType.h"
</span><ins>+#include <WebCore/HTTPCookieAcceptPolicy.h>
</ins><span class="cx"> #include <WebCore/SoupNetworkProxySettings.h>
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -77,6 +78,7 @@
</span><span class="cx">     bool persistentCredentialStorageEnabled { true };
</span><span class="cx">     bool ignoreTLSErrors { false };
</span><span class="cx">     WebCore::SoupNetworkProxySettings proxySettings;
</span><ins>+    WebCore::HTTPCookieAcceptPolicy cookieAcceptPolicy { WebCore::HTTPCookieAcceptPolicy::ExclusivelyFromMainDocumentDomain };
</ins><span class="cx"> #endif
</span><span class="cx"> #if USE(CURL)
</span><span class="cx">     String cookiePersistentStorageFile;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitNetworkProcesssoupNetworkSessionSoupcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp  2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/NetworkProcess/soup/NetworkSessionSoup.cpp     2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -47,6 +47,8 @@
</span><span class="cx">     auto* storageSession = networkStorageSession();
</span><span class="cx">     ASSERT(storageSession);
</span><span class="cx"> 
</span><ins>+    storageSession->setCookieAcceptPolicy(parameters.cookieAcceptPolicy);
+
</ins><span class="cx">     setIgnoreTLSErrors(parameters.ignoreTLSErrors);
</span><span class="cx"> 
</span><span class="cx">     if (parameters.proxySettings.mode != SoupNetworkProxySettings::Mode::Default)
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitUIProcessAPIglibWebKitCookieManagercpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp  2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/API/glib/WebKitCookieManager.cpp     2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -177,7 +177,8 @@
</span><span class="cx">     if (sessionID.isEphemeral())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    manager->priv->cookieManager().setCookiePersistentStorage(sessionID, String::fromUTF8(filename), toSoupCookiePersistentStorageType(storage));
</del><ins>+    auto& websiteDataStore = webkitWebsiteDataManagerGetDataStore(manager->priv->dataManager);
+    websiteDataStore.setCookiePersistentStorage(String::fromUTF8(filename), toSoupCookiePersistentStorageType(storage));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><span class="lines">@@ -195,7 +196,8 @@
</span><span class="cx"> {
</span><span class="cx">     g_return_if_fail(WEBKIT_IS_COOKIE_MANAGER(manager));
</span><span class="cx"> 
</span><del>-    manager->priv->cookieManager().setHTTPCookieAcceptPolicy(manager->priv->sessionID(), toHTTPCookieAcceptPolicy(policy), []() { });
</del><ins>+    auto& websiteDataStore = webkitWebsiteDataManagerGetDataStore(manager->priv->dataManager);
+    websiteDataStore.setHTTPCookieAcceptPolicy(toHTTPCookieAcceptPolicy(policy));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitUIProcessWebCookieManagerProxyh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebCookieManagerProxy.h (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebCookieManagerProxy.h   2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebCookieManagerProxy.h      2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -91,7 +91,6 @@
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span><span class="cx">     void setCookiePersistentStorage(PAL::SessionID, const String& storagePath, SoupCookiePersistentStorageType);
</span><del>-    void getCookiePersistentStorage(PAL::SessionID, String& storagePath, SoupCookiePersistentStorageType&) const;
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     using API::Object::ref;
</span><span class="lines">@@ -114,11 +113,6 @@
</span><span class="cx"> 
</span><span class="cx">     WeakPtr<NetworkProcessProxy> m_networkProcess;
</span><span class="cx">     WebCookieManagerProxyClient m_client;
</span><del>-
-#if USE(SOUP)
-    using CookiePersistentStorageMap = HashMap<PAL::SessionID, std::pair<String, SoupCookiePersistentStorageType>>;
-    CookiePersistentStorageMap m_cookiePersistentStorageMap;
-#endif
</del><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitUIProcessWebsiteDataWebsiteDataStoreh"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h    2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h       2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -62,6 +62,8 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span><ins>+#include "SoupCookiePersistentStorageType.h"
+#include <WebCore/HTTPCookieAcceptPolicy.h>
</ins><span class="cx"> #include <WebCore/SoupNetworkProxySettings.h>
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="lines">@@ -285,6 +287,8 @@
</span><span class="cx">     bool ignoreTLSErrors() const { return m_ignoreTLSErrors; }
</span><span class="cx">     void setNetworkProxySettings(WebCore::SoupNetworkProxySettings&&);
</span><span class="cx">     const WebCore::SoupNetworkProxySettings& networkProxySettings() const { return m_networkProxySettings; }
</span><ins>+    void setCookiePersistentStorage(const String&, SoupCookiePersistentStorageType);
+    void setHTTPCookieAcceptPolicy(WebCore::HTTPCookieAcceptPolicy);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     static void allowWebsiteDataRecordsForAllOrigins();
</span><span class="lines">@@ -423,6 +427,9 @@
</span><span class="cx">     bool m_persistentCredentialStorageEnabled { true };
</span><span class="cx">     bool m_ignoreTLSErrors { true };
</span><span class="cx">     WebCore::SoupNetworkProxySettings m_networkProxySettings;
</span><ins>+    String m_cookiePersistentStoragePath;
+    SoupCookiePersistentStorageType m_cookiePersistentStorageType { SoupCookiePersistentStorageType::SQLite };
+    WebCore::HTTPCookieAcceptPolicy m_cookieAcceptPolicy { WebCore::HTTPCookieAcceptPolicy::ExclusivelyFromMainDocumentDomain };
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     WeakHashSet<WebProcessProxy> m_processes;
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitUIProcessWebsiteDatasoupWebsiteDataStoreSoupcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp 2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp    2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -41,8 +41,9 @@
</span><span class="cx">     networkSessionParameters.persistentCredentialStorageEnabled = m_persistentCredentialStorageEnabled;
</span><span class="cx">     networkSessionParameters.ignoreTLSErrors = m_ignoreTLSErrors;
</span><span class="cx">     networkSessionParameters.proxySettings = m_networkProxySettings;
</span><del>-
-    networkProcess().cookieManager().getCookiePersistentStorage(m_sessionID, networkSessionParameters.cookiePersistentStoragePath, networkSessionParameters.cookiePersistentStorageType);
</del><ins>+    networkSessionParameters.cookiePersistentStoragePath = m_cookiePersistentStoragePath;
+    networkSessionParameters.cookiePersistentStorageType = m_cookiePersistentStorageType;
+    networkSessionParameters.cookieAcceptPolicy = m_cookieAcceptPolicy;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebsiteDataStore::setPersistentCredentialStorageEnabled(bool enabled)
</span><span class="lines">@@ -72,4 +73,23 @@
</span><span class="cx">     networkProcess().send(Messages::NetworkProcess::SetNetworkProxySettings(m_sessionID, m_networkProxySettings), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebsiteDataStore::setCookiePersistentStorage(const String& storagePath, SoupCookiePersistentStorageType storageType)
+{
+    if (m_cookiePersistentStoragePath == storagePath && m_cookiePersistentStorageType == storageType)
+        return;
+
+    m_cookiePersistentStoragePath = storagePath;
+    m_cookiePersistentStorageType = storageType;
+    networkProcess().cookieManager().setCookiePersistentStorage(m_sessionID, m_cookiePersistentStoragePath, m_cookiePersistentStorageType);
+}
+
+void WebsiteDataStore::setHTTPCookieAcceptPolicy(WebCore::HTTPCookieAcceptPolicy policy)
+{
+    if (m_cookieAcceptPolicy == policy)
+        return;
+
+    m_cookieAcceptPolicy = policy;
+    networkProcess().cookieManager().setHTTPCookieAcceptPolicy(m_sessionID, policy, [] { });
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="releasesWebKitGTKwebkit232SourceWebKitUIProcesssoupWebCookieManagerProxySoupcpp"></a>
<div class="modfile"><h4>Modified: releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/soup/WebCookieManagerProxySoup.cpp (280138 => 280139)</h4>
<pre class="diff"><span>
<span class="info">--- releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/soup/WebCookieManagerProxySoup.cpp        2021-07-21 15:09:35 UTC (rev 280138)
+++ releases/WebKitGTK/webkit-2.32/Source/WebKit/UIProcess/soup/WebCookieManagerProxySoup.cpp   2021-07-21 15:31:17 UTC (rev 280139)
</span><span class="lines">@@ -28,7 +28,6 @@
</span><span class="cx"> 
</span><span class="cx"> #include "NetworkProcessProxy.h"
</span><span class="cx"> #include "WebCookieManagerMessages.h"
</span><del>-#include "WebProcessPool.h"
</del><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="lines">@@ -38,11 +37,4 @@
</span><span class="cx">         m_networkProcess->send(Messages::WebCookieManager::SetCookiePersistentStorage(sessionID, storagePath, storageType), 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebCookieManagerProxy::getCookiePersistentStorage(PAL::SessionID sessionID, String& storagePath, SoupCookiePersistentStorageType& storageType) const
-{
-    auto pair = m_cookiePersistentStorageMap.get(sessionID);
-    storagePath = pair.first;
-    storageType = pair.second;
-}
-
-}
</del><ins>+} // namespace WebKit
</ins></span></pre>
</div>
</div>

</body>
</html>