Diff
Modified: trunk/Source/WebCore/ChangeLog (238175 => 238176)
--- trunk/Source/WebCore/ChangeLog 2018-11-14 16:13:06 UTC (rev 238175)
+++ trunk/Source/WebCore/ChangeLog 2018-11-14 16:14:17 UTC (rev 238176)
@@ -1,3 +1,22 @@
+2018-11-14 Fujii Hironori <hironori.fu...@sony.com>
+
+ [curl] Unify CookieJarCurlDatabase and the abstract class CookieJarCurl
+ https://bugs.webkit.org/show_bug.cgi?id=191620
+
+ Reviewed by Alex Christensen.
+
+ Remove a abstract class CookieJarCurl which is not needed anymore.
+ And, rename CookieJarCurlDatabase to CookieJarCurl.
+
+ No new tests because there's no behaviour change in WebCore.
+
+ * platform/Curl.cmake: Replaced CookieJarCurlDatabase.cpp with CookieJarCurl.cpp.
+ * platform/network/curl/CookieJarCurl.cpp: Renamed from Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp.
+ * platform/network/curl/CookieJarCurl.h: Merged CookieJarCurl.h and CookieJarCurlDatabase.h.
+ * platform/network/curl/CookieJarCurlDatabase.h: Removed.
+ * platform/network/curl/NetworkStorageSessionCurl.cpp:
+ (WebCore::NetworkStorageSession::NetworkStorageSession): Replaced CookieJarCurlDatabase with CookieJarCurl.
+
2018-11-14 Christopher Reid <chris.r...@sony.com>
[WPE] Remove glib usage in PlatformKeyboardEventWPE.cpp
Modified: trunk/Source/WebCore/platform/Curl.cmake (238175 => 238176)
--- trunk/Source/WebCore/platform/Curl.cmake 2018-11-14 16:13:06 UTC (rev 238175)
+++ trunk/Source/WebCore/platform/Curl.cmake 2018-11-14 16:14:17 UTC (rev 238176)
@@ -5,7 +5,7 @@
list(APPEND WebCore_SOURCES
platform/network/curl/AuthenticationChallengeCurl.cpp
platform/network/curl/CertificateInfoCurl.cpp
- platform/network/curl/CookieJarCurlDatabase.cpp
+ platform/network/curl/CookieJarCurl.cpp
platform/network/curl/CookieJarDB.cpp
platform/network/curl/CookieStorageCurl.cpp
platform/network/curl/CookieUtil.cpp
Copied: trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp (from rev 238175, trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp) (0 => 238176)
--- trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp (rev 0)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp 2018-11-14 16:14:17 UTC (rev 238176)
@@ -0,0 +1,148 @@
+/*
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "CookieJarCurl.h"
+
+#if USE(CURL)
+#include "Cookie.h"
+#include "CookieJarDB.h"
+#include "CookieRequestHeaderFieldProxy.h"
+#include "NetworkStorageSession.h"
+#include "NotImplemented.h"
+#include "URL.h"
+
+#include <wtf/Optional.h>
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebCore {
+
+static String cookiesForSession(const NetworkStorageSession& session, const URL&, const URL& url, bool forHTTPHeader)
+{
+ StringBuilder cookies;
+
+ CookieJarDB& cookieJarDB = session.cookieDatabase();
+ auto searchHTTPOnly = (forHTTPHeader ? std::nullopt : std::optional<bool> {false});
+ auto secure = url.protocolIs("https") ? std::nullopt : std::optional<bool> {false};
+
+ if (auto result = cookieJarDB.searchCookies(url.string(), searchHTTPOnly, secure, std::nullopt)) {
+ for (auto& cookie : *result) {
+ if (!cookies.isEmpty())
+ cookies.append("; ");
+ cookies.append(cookie.name);
+ cookies.append("=");
+ cookies.append(cookie.value);
+ }
+ }
+ return cookies.toString();
+}
+
+void CookieJarCurl::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, const String& value) const
+{
+ UNUSED_PARAM(frameID);
+ UNUSED_PARAM(pageID);
+ UNUSED_PARAM(firstParty);
+
+ CookieJarDB& cookieJarDB = session.cookieDatabase();
+ cookieJarDB.setCookie(url.string(), value, CookieJarDB::Source::Script);
+}
+
+void CookieJarCurl::setCookiesFromHTTPResponse(const NetworkStorageSession& session, const URL& url, const String& value) const
+{
+ CookieJarDB& cookieJarDB = session.cookieDatabase();
+ cookieJarDB.setCookie(url.string(), value, CookieJarDB::Source::Network);
+}
+
+std::pair<String, bool> CookieJarCurl::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const
+{
+ UNUSED_PARAM(frameID);
+ UNUSED_PARAM(pageID);
+
+ // FIXME: This should filter secure cookies out if the caller requests it.
+ return { cookiesForSession(session, firstParty, url, false), false };
+}
+
+std::pair<String, bool> CookieJarCurl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const
+{
+ UNUSED_PARAM(frameID);
+ UNUSED_PARAM(pageID);
+
+ // FIXME: This should filter secure cookies out if the caller requests it.
+ return { cookiesForSession(session, firstParty, url, true), false };
+}
+
+std::pair<String, bool> CookieJarCurl::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const CookieRequestHeaderFieldProxy& headerFieldProxy) const
+{
+ return cookieRequestHeaderFieldValue(session, headerFieldProxy.firstParty, headerFieldProxy.sameSiteInfo, headerFieldProxy.url, headerFieldProxy.frameID, headerFieldProxy.pageID, headerFieldProxy.includeSecureCookies);
+}
+
+bool CookieJarCurl::cookiesEnabled(const NetworkStorageSession& session) const
+{
+ return session.cookieDatabase().isEnabled();
+}
+
+bool CookieJarCurl::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, Vector<Cookie>& rawCookies) const
+{
+ UNUSED_PARAM(frameID);
+ UNUSED_PARAM(pageID);
+
+ CookieJarDB& cookieJarDB = session.cookieDatabase();
+ if (auto cookies = cookieJarDB.searchCookies(firstParty.string(), std::nullopt, std::nullopt, std::nullopt)) {
+ rawCookies = WTFMove(*cookies);
+ return true;
+ }
+ return false;
+}
+
+void CookieJarCurl::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& name) const
+{
+ CookieJarDB& cookieJarDB = session.cookieDatabase();
+ cookieJarDB.deleteCookie(url, name);
+}
+
+void CookieJarCurl::getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>&) const
+{
+ // FIXME: Not yet implemented
+}
+
+void CookieJarCurl::deleteCookiesForHostnames(const NetworkStorageSession&, const Vector<String>&) const
+{
+ // FIXME: Not yet implemented
+}
+
+void CookieJarCurl::deleteAllCookies(const NetworkStorageSession& session) const
+{
+ CookieJarDB& cookieJarDB = session.cookieDatabase();
+ cookieJarDB.deleteAllCookies();
+}
+
+void CookieJarCurl::deleteAllCookiesModifiedSince(const NetworkStorageSession&, WallTime) const
+{
+ // FIXME: Not yet implemented
+}
+
+} // namespace WebCore
+
+#endif // USE(CURL)
Modified: trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h (238175 => 238176)
--- trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h 2018-11-14 16:13:06 UTC (rev 238175)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurl.h 2018-11-14 16:14:17 UTC (rev 238176)
@@ -1,19 +1,25 @@
/*
- * Copyright (C) 2017 Sony Interactive Entertainment Inc.
+ * Copyright (C) 2018 Sony Interactive Entertainment Inc.
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
@@ -25,29 +31,27 @@
namespace WebCore {
+class NetworkStorageSession;
class URL;
-class NetworkStorageSession;
-
+enum class IncludeSecureCookies : bool;
struct Cookie;
struct CookieRequestHeaderFieldProxy;
struct SameSiteInfo;
-enum class IncludeSecureCookies : bool;
-
class CookieJarCurl {
public:
- virtual std::pair<String, bool> cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const = 0;
- virtual void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, const String&) const = 0;
- virtual void setCookiesFromHTTPResponse(const NetworkStorageSession&, const URL&, const String&) const = 0;
- virtual bool cookiesEnabled(const NetworkStorageSession&) const = 0;
- virtual std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const = 0;
- virtual std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const CookieRequestHeaderFieldProxy&) const = 0;
- virtual bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, Vector<Cookie>&) const = 0;
- virtual void deleteCookie(const NetworkStorageSession&, const URL&, const String&) const = 0;
- virtual void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames) const = 0;
- virtual void deleteCookiesForHostnames(const NetworkStorageSession&, const Vector<String>& cookieHostNames) const = 0;
- virtual void deleteAllCookies(const NetworkStorageSession&) const = 0;
- virtual void deleteAllCookiesModifiedSince(const NetworkStorageSession&, WallTime) const = 0;
+ std::pair<String, bool> cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const;
+ void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, const String&) const;
+ void setCookiesFromHTTPResponse(const NetworkStorageSession&, const URL&, const String&) const;
+ bool cookiesEnabled(const NetworkStorageSession&) const;
+ std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const;
+ std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const CookieRequestHeaderFieldProxy&) const;
+ bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, Vector<Cookie>&) const;
+ void deleteCookie(const NetworkStorageSession&, const URL&, const String&) const;
+ void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames) const;
+ void deleteCookiesForHostnames(const NetworkStorageSession&, const Vector<String>& cookieHostNames) const;
+ void deleteAllCookies(const NetworkStorageSession&) const;
+ void deleteAllCookiesModifiedSince(const NetworkStorageSession&, WallTime) const;
};
} // namespace WebCore
Deleted: trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp (238175 => 238176)
--- trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp 2018-11-14 16:13:06 UTC (rev 238175)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.cpp 2018-11-14 16:14:17 UTC (rev 238176)
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2018 Sony Interactive Entertainment Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "CookieJarCurlDatabase.h"
-
-#if USE(CURL)
-#include "Cookie.h"
-#include "CookieJarDB.h"
-#include "CookieRequestHeaderFieldProxy.h"
-#include "NetworkStorageSession.h"
-#include "NotImplemented.h"
-#include "URL.h"
-
-#include <wtf/Optional.h>
-#include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-static String cookiesForSession(const NetworkStorageSession& session, const URL&, const URL& url, bool forHTTPHeader)
-{
- StringBuilder cookies;
-
- CookieJarDB& cookieJarDB = session.cookieDatabase();
- auto searchHTTPOnly = (forHTTPHeader ? std::nullopt : std::optional<bool> {false});
- auto secure = url.protocolIs("https") ? std::nullopt : std::optional<bool> {false};
-
- if (auto result = cookieJarDB.searchCookies(url.string(), searchHTTPOnly, secure, std::nullopt)) {
- for (auto& cookie : *result) {
- if (!cookies.isEmpty())
- cookies.append("; ");
- cookies.append(cookie.name);
- cookies.append("=");
- cookies.append(cookie.value);
- }
- }
- return cookies.toString();
-}
-
-void CookieJarCurlDatabase::setCookiesFromDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, const String& value) const
-{
- UNUSED_PARAM(frameID);
- UNUSED_PARAM(pageID);
- UNUSED_PARAM(firstParty);
-
- CookieJarDB& cookieJarDB = session.cookieDatabase();
- cookieJarDB.setCookie(url.string(), value, CookieJarDB::Source::Script);
-}
-
-void CookieJarCurlDatabase::setCookiesFromHTTPResponse(const NetworkStorageSession& session, const URL& url, const String& value) const
-{
- CookieJarDB& cookieJarDB = session.cookieDatabase();
- cookieJarDB.setCookie(url.string(), value, CookieJarDB::Source::Network);
-}
-
-std::pair<String, bool> CookieJarCurlDatabase::cookiesForDOM(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const
-{
- UNUSED_PARAM(frameID);
- UNUSED_PARAM(pageID);
-
- // FIXME: This should filter secure cookies out if the caller requests it.
- return { cookiesForSession(session, firstParty, url, false), false };
-}
-
-std::pair<String, bool> CookieJarCurlDatabase::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL& url, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const
-{
- UNUSED_PARAM(frameID);
- UNUSED_PARAM(pageID);
-
- // FIXME: This should filter secure cookies out if the caller requests it.
- return { cookiesForSession(session, firstParty, url, true), false };
-}
-
-std::pair<String, bool> CookieJarCurlDatabase::cookieRequestHeaderFieldValue(const NetworkStorageSession& session, const CookieRequestHeaderFieldProxy& headerFieldProxy) const
-{
- return cookieRequestHeaderFieldValue(session, headerFieldProxy.firstParty, headerFieldProxy.sameSiteInfo, headerFieldProxy.url, headerFieldProxy.frameID, headerFieldProxy.pageID, headerFieldProxy.includeSecureCookies);
-}
-
-bool CookieJarCurlDatabase::cookiesEnabled(const NetworkStorageSession& session) const
-{
- return session.cookieDatabase().isEnabled();
-}
-
-bool CookieJarCurlDatabase::getRawCookies(const NetworkStorageSession& session, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, Vector<Cookie>& rawCookies) const
-{
- UNUSED_PARAM(frameID);
- UNUSED_PARAM(pageID);
-
- CookieJarDB& cookieJarDB = session.cookieDatabase();
- if (auto cookies = cookieJarDB.searchCookies(firstParty.string(), std::nullopt, std::nullopt, std::nullopt)) {
- rawCookies = WTFMove(*cookies);
- return true;
- }
- return false;
-}
-
-void CookieJarCurlDatabase::deleteCookie(const NetworkStorageSession& session, const URL& url, const String& name) const
-{
- CookieJarDB& cookieJarDB = session.cookieDatabase();
- cookieJarDB.deleteCookie(url, name);
-}
-
-void CookieJarCurlDatabase::getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>&) const
-{
- // FIXME: Not yet implemented
-}
-
-void CookieJarCurlDatabase::deleteCookiesForHostnames(const NetworkStorageSession&, const Vector<String>&) const
-{
- // FIXME: Not yet implemented
-}
-
-void CookieJarCurlDatabase::deleteAllCookies(const NetworkStorageSession& session) const
-{
- CookieJarDB& cookieJarDB = session.cookieDatabase();
- cookieJarDB.deleteAllCookies();
-}
-
-void CookieJarCurlDatabase::deleteAllCookiesModifiedSince(const NetworkStorageSession&, WallTime) const
-{
- // FIXME: Not yet implemented
-}
-
-} // namespace WebCore
-
-#endif // USE(CURL)
Deleted: trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.h (238175 => 238176)
--- trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.h 2018-11-14 16:13:06 UTC (rev 238175)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurlDatabase.h 2018-11-14 16:14:17 UTC (rev 238176)
@@ -1,46 +0,0 @@
-/*
- * Copyright (C) 2018 Sony Interactive Entertainment Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "CookieJarCurl.h"
-
-namespace WebCore {
-
-class CookieJarCurlDatabase : public CookieJarCurl {
- std::pair<String, bool> cookiesForDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const override;
- void setCookiesFromDOM(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, const String&) const override;
- void setCookiesFromHTTPResponse(const NetworkStorageSession&, const URL&, const String&) const override;
- bool cookiesEnabled(const NetworkStorageSession&) const override;
- std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, IncludeSecureCookies) const override;
- std::pair<String, bool> cookieRequestHeaderFieldValue(const NetworkStorageSession&, const CookieRequestHeaderFieldProxy&) const override;
- bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const SameSiteInfo&, const URL&, std::optional<uint64_t> frameID, std::optional<uint64_t> pageID, Vector<Cookie>&) const override;
- void deleteCookie(const NetworkStorageSession&, const URL&, const String&) const override;
- void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames) const override;
- void deleteCookiesForHostnames(const NetworkStorageSession&, const Vector<String>& cookieHostNames) const override;
- void deleteAllCookies(const NetworkStorageSession&) const override;
- void deleteAllCookiesModifiedSince(const NetworkStorageSession&, WallTime) const override;
-};
-
-} // namespace WebCore
Modified: trunk/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp (238175 => 238176)
--- trunk/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp 2018-11-14 16:13:06 UTC (rev 238175)
+++ trunk/Source/WebCore/platform/network/curl/NetworkStorageSessionCurl.cpp 2018-11-14 16:14:17 UTC (rev 238176)
@@ -29,7 +29,7 @@
#if USE(CURL)
#include "Cookie.h"
-#include "CookieJarCurlDatabase.h"
+#include "CookieJarCurl.h"
#include "CookieJarDB.h"
#include "CookieRequestHeaderFieldProxy.h"
#include "CurlContext.h"
@@ -57,7 +57,7 @@
NetworkStorageSession::NetworkStorageSession(PAL::SessionID sessionID, NetworkingContext* context)
: m_sessionID(sessionID)
, m_context(context)
- , m_cookieStorage(makeUniqueRef<CookieJarCurlDatabase>())
+ , m_cookieStorage(makeUniqueRef<CookieJarCurl>())
, m_cookieDatabase(makeUniqueRef<CookieJarDB>(defaultCookieJarPath()))
{
}