<!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>[213947] trunk</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/213947">213947</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2017-03-14 15:36:52 -0700 (Tue, 14 Mar 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Rename WKHTTPCookieStorage to WKHTTPCookieStore.
https://bugs.webkit.org/show_bug.cgi?id=169630
Reviewed by Tim Horton.
Source/WebKit2:
* CMakeLists.txt:
* Shared/API/APIObject.h:
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/APIHTTPCookieStore.cpp: Renamed from Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp.
(API::HTTPCookieStore::HTTPCookieStore):
(API::HTTPCookieStore::~HTTPCookieStore):
(API::HTTPCookieStore::cookies):
(API::HTTPCookieStore::setCookie):
(API::HTTPCookieStore::setCookies):
(API::HTTPCookieStore::deleteCookie):
(API::HTTPCookieStore::removeCookiesSinceDate):
(API::HTTPCookieStore::setHTTPCookieAcceptPolicy):
(API::HTTPCookieStore::getHTTPCookieAcceptPolicy):
* UIProcess/API/APIHTTPCookieStore.h: Renamed from Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h.
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::httpCookieStore):
(API::WebsiteDataStore::httpCookieStorage): Deleted.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/WKHTTPCookieStore.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h.
* UIProcess/API/Cocoa/WKHTTPCookieStore.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm.
(coreCookiesToNSCookies):
(-[WKHTTPCookieStore dealloc]):
(-[WKHTTPCookieStore fetchCookies:]):
(-[WKHTTPCookieStore fetchCookiesForURL:completionHandler:]):
(-[WKHTTPCookieStore setCookie:completionHandler:]):
(-[WKHTTPCookieStore deleteCookie:completionHandler:]):
(-[WKHTTPCookieStore setCookies:forURL:mainDocumentURL:completionHandler:]):
(-[WKHTTPCookieStore removeCookiesSinceDate:completionHandler:]):
(-[WKHTTPCookieStore setCookieAcceptPolicy:completionHandler:]):
(kitCookiePolicyToNSCookiePolicy):
(-[WKHTTPCookieStore fetchCookieAcceptPolicy:]):
(-[WKHTTPCookieStore _apiObject]):
* UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h.
(WebKit::wrapper):
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _httpCookieStore]):
(-[WKWebsiteDataStore _httpCookieStorage]): Deleted.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/WebProcessPool.cpp:
* UIProcess/WebProcessPool.h:
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):
* WebKit2.xcodeproj/project.pbxproj:
Tools:
* TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm:
(TEST):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedAPIAPIObjecth">trunk/Source/WebKit2/Shared/API/APIObject.h</a></li>
<li><a href="#trunkSourceWebKit2SharedCocoaAPIObjectmm">trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIWebsiteDataStorecpp">trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIWebsiteDataStoreh">trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebsiteDataStoremm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebsiteDataStorePrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolcpp">trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessPoolh">trunk/Source/WebKit2/UIProcess/WebProcessPool.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp">trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKit2CocoaWKHTTPCookieStoragemm">trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStorecpp">trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStoreh">trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoreh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoremm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoreInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStoragecpp">trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStorageh">trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorageh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoragemm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorageInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/CMakeLists.txt        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -333,7 +333,7 @@
</span><span class="cx"> UIProcess/API/APIContentExtensionStore.cpp
</span><span class="cx"> UIProcess/API/APIExperimentalFeature.cpp
</span><span class="cx"> UIProcess/API/APIFrameInfo.cpp
</span><del>- UIProcess/API/APIHTTPCookieStorage.cpp
</del><ins>+ UIProcess/API/APIHTTPCookieStore.cpp
</ins><span class="cx"> UIProcess/API/APIHitTestResult.cpp
</span><span class="cx"> UIProcess/API/APINavigation.cpp
</span><span class="cx"> UIProcess/API/APINavigationData.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,3 +1,63 @@
</span><ins>+2017-03-14 Brady Eidson <beidson@apple.com>
+
+ Rename WKHTTPCookieStorage to WKHTTPCookieStore.
+ https://bugs.webkit.org/show_bug.cgi?id=169630
+
+ Reviewed by Tim Horton.
+
+ * CMakeLists.txt:
+
+ * Shared/API/APIObject.h:
+ * Shared/Cocoa/APIObject.mm:
+ (API::Object::newObject):
+
+ * UIProcess/API/APIHTTPCookieStore.cpp: Renamed from Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp.
+ (API::HTTPCookieStore::HTTPCookieStore):
+ (API::HTTPCookieStore::~HTTPCookieStore):
+ (API::HTTPCookieStore::cookies):
+ (API::HTTPCookieStore::setCookie):
+ (API::HTTPCookieStore::setCookies):
+ (API::HTTPCookieStore::deleteCookie):
+ (API::HTTPCookieStore::removeCookiesSinceDate):
+ (API::HTTPCookieStore::setHTTPCookieAcceptPolicy):
+ (API::HTTPCookieStore::getHTTPCookieAcceptPolicy):
+ * UIProcess/API/APIHTTPCookieStore.h: Renamed from Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h.
+
+ * UIProcess/API/APIWebsiteDataStore.cpp:
+ (API::WebsiteDataStore::httpCookieStore):
+ (API::WebsiteDataStore::httpCookieStorage): Deleted.
+ * UIProcess/API/APIWebsiteDataStore.h:
+
+ * UIProcess/API/Cocoa/WKHTTPCookieStore.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h.
+ * UIProcess/API/Cocoa/WKHTTPCookieStore.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm.
+ (coreCookiesToNSCookies):
+ (-[WKHTTPCookieStore dealloc]):
+ (-[WKHTTPCookieStore fetchCookies:]):
+ (-[WKHTTPCookieStore fetchCookiesForURL:completionHandler:]):
+ (-[WKHTTPCookieStore setCookie:completionHandler:]):
+ (-[WKHTTPCookieStore deleteCookie:completionHandler:]):
+ (-[WKHTTPCookieStore setCookies:forURL:mainDocumentURL:completionHandler:]):
+ (-[WKHTTPCookieStore removeCookiesSinceDate:completionHandler:]):
+ (-[WKHTTPCookieStore setCookieAcceptPolicy:completionHandler:]):
+ (kitCookiePolicyToNSCookiePolicy):
+ (-[WKHTTPCookieStore fetchCookieAcceptPolicy:]):
+ (-[WKHTTPCookieStore _apiObject]):
+ * UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h.
+ (WebKit::wrapper):
+
+ * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
+ (-[WKWebsiteDataStore _httpCookieStore]):
+ (-[WKWebsiteDataStore _httpCookieStorage]): Deleted.
+ * UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
+
+ * UIProcess/WebProcessPool.cpp:
+ * UIProcess/WebProcessPool.h:
+
+ * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+ (WebKit::WebsiteDataStore::processPoolForCookieStorageOperations):
+
+ * WebKit2.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2017-03-14 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Propagate PassKit errors
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPIAPIObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/API/APIObject.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/APIObject.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/Shared/API/APIObject.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> FullScreenManager,
</span><span class="cx"> GeolocationManager,
</span><span class="cx"> GeolocationPermissionRequest,
</span><del>- HTTPCookieStorage,
</del><ins>+ HTTPCookieStore,
</ins><span class="cx"> HitTestResult,
</span><span class="cx"> GeolocationPosition,
</span><span class="cx"> GrammarDetail,
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedCocoaAPIObjectmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/Shared/Cocoa/APIObject.mm        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> #import "WKContentExtensionInternal.h"
</span><span class="cx"> #import "WKContentExtensionStoreInternal.h"
</span><span class="cx"> #import "WKFrameInfoInternal.h"
</span><del>-#import "WKHTTPCookieStorageInternal.h"
</del><ins>+#import "WKHTTPCookieStoreInternal.h"
</ins><span class="cx"> #import "WKNSArray.h"
</span><span class="cx"> #import "WKNSData.h"
</span><span class="cx"> #import "WKNSDictionary.h"
</span><span class="lines">@@ -179,8 +179,8 @@
</span><span class="cx"> wrapper = [WKFrameInfo alloc];
</span><span class="cx"> break;
</span><span class="cx">
</span><del>- case Type::HTTPCookieStorage:
- wrapper = [WKHTTPCookieStorage alloc];
</del><ins>+ case Type::HTTPCookieStore:
+ wrapper = [WKHTTPCookieStore alloc];
</ins><span class="cx"> break;
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStoragecpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,138 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * 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 "APIHTTPCookieStorage.h"
-
-#include "APIWebsiteDataStore.h"
-#include "WebCookieManagerProxy.h"
-#include "WebProcessPool.h"
-#include <WebCore/Cookie.h>
-
-using namespace WebKit;
-
-namespace API {
-
-HTTPCookieStorage::HTTPCookieStorage(WebsiteDataStore& websiteDataStore)
- : m_owningDataStore(websiteDataStore)
-{
-}
-
-HTTPCookieStorage::~HTTPCookieStorage()
-{
-}
-
-void HTTPCookieStorage::cookies(Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->getAllCookies(dataStore.sessionID(), [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](const Vector<WebCore::Cookie>& cookies, CallbackBase::Error error) {
- completionHandler(cookies);
- });
-}
-
-void HTTPCookieStorage::cookies(const WebCore::URL& url, Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->getCookies(dataStore.sessionID(), url, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](const Vector<WebCore::Cookie>& cookies, CallbackBase::Error error) {
- completionHandler(cookies);
- });
-}
-
-void HTTPCookieStorage::setCookie(const WebCore::Cookie& cookie, Function<void ()>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->setCookie(dataStore.sessionID(), cookie, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
- completionHandler();
- });
-}
-
-void HTTPCookieStorage::setCookies(const Vector<WebCore::Cookie>& cookies, const WebCore::URL& url, const WebCore::URL& mainDocumentURL, Function<void ()>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->setCookies(dataStore.sessionID(), cookies, url, mainDocumentURL, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
- completionHandler();
- });
-}
-
-void HTTPCookieStorage::deleteCookie(const WebCore::Cookie& cookie, Function<void ()>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->deleteCookie(dataStore.sessionID(), cookie, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
- completionHandler();
- });
-}
-
-void HTTPCookieStorage::removeCookiesSinceDate(std::chrono::system_clock::time_point date, Function<void ()>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->deleteAllCookiesModifiedSince(dataStore.sessionID(), date, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
- completionHandler();
- });
-}
-
-void HTTPCookieStorage::setHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy, Function<void ()>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->setHTTPCookieAcceptPolicy(dataStore.sessionID(), policy, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
- completionHandler();
- });
-}
-
-void HTTPCookieStorage::getHTTPCookieAcceptPolicy(Function<void (HTTPCookieAcceptPolicy)>&& completionHandler)
-{
- auto& dataStore = m_owningDataStore.websiteDataStore();
- auto pool = dataStore.processPoolForCookieStorageOperations();
- auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
-
- cookieManager->getHTTPCookieAcceptPolicy(dataStore.sessionID(), [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](HTTPCookieAcceptPolicy policy, CallbackBase::Error error) {
- if (error != CallbackBase::Error::None)
- policy = HTTPCookieAcceptPolicyNever;
-
- completionHandler(policy);
- });
-}
-
-} // namespace API
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStorageh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,69 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * 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 "APIObject.h"
-#include "HTTPCookieAcceptPolicy.h"
-#include <wtf/Function.h>
-#include <wtf/Vector.h>
-
-namespace WebCore {
-class URL;
-struct Cookie;
-}
-
-namespace API {
-
-class WebsiteDataStore;
-
-class HTTPCookieStorage final : public ObjectImpl<Object::Type::HTTPCookieStorage> {
-public:
- static Ref<HTTPCookieStorage> create(WebsiteDataStore& websiteDataStore)
- {
- return adoptRef(*new HTTPCookieStorage(websiteDataStore));
- }
-
- virtual ~HTTPCookieStorage();
-
- void cookies(Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler);
- void cookies(const WebCore::URL&, Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler);
-
- void setCookie(const WebCore::Cookie&, Function<void ()>&& completionHandler);
- void setCookies(const Vector<WebCore::Cookie>&, const WebCore::URL&, const WebCore::URL& mainDocumentURL, Function<void ()>&& completionHandler);
- void deleteCookie(const WebCore::Cookie&, Function<void ()>&& completionHandler);
-
- void removeCookiesSinceDate(std::chrono::system_clock::time_point, Function<void ()>&& completionHandler);
-
- void setHTTPCookieAcceptPolicy(WebKit::HTTPCookieAcceptPolicy, Function<void ()>&& completionHandler);
- void getHTTPCookieAcceptPolicy(Function<void (WebKit::HTTPCookieAcceptPolicy)>&& completionHandler);
-
-private:
- HTTPCookieStorage(WebsiteDataStore&);
-
- WebsiteDataStore& m_owningDataStore;
-};
-
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStorecppfromrev213946trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStoragecpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.cpp (from rev 213946, trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.cpp) (0 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.cpp         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.cpp        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -0,0 +1,138 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * 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 "APIHTTPCookieStore.h"
+
+#include "APIWebsiteDataStore.h"
+#include "WebCookieManagerProxy.h"
+#include "WebProcessPool.h"
+#include <WebCore/Cookie.h>
+
+using namespace WebKit;
+
+namespace API {
+
+HTTPCookieStore::HTTPCookieStore(WebsiteDataStore& websiteDataStore)
+ : m_owningDataStore(websiteDataStore)
+{
+}
+
+HTTPCookieStore::~HTTPCookieStore()
+{
+}
+
+void HTTPCookieStore::cookies(Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->getAllCookies(dataStore.sessionID(), [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](const Vector<WebCore::Cookie>& cookies, CallbackBase::Error error) {
+ completionHandler(cookies);
+ });
+}
+
+void HTTPCookieStore::cookies(const WebCore::URL& url, Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->getCookies(dataStore.sessionID(), url, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](const Vector<WebCore::Cookie>& cookies, CallbackBase::Error error) {
+ completionHandler(cookies);
+ });
+}
+
+void HTTPCookieStore::setCookie(const WebCore::Cookie& cookie, Function<void ()>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->setCookie(dataStore.sessionID(), cookie, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
+ completionHandler();
+ });
+}
+
+void HTTPCookieStore::setCookies(const Vector<WebCore::Cookie>& cookies, const WebCore::URL& url, const WebCore::URL& mainDocumentURL, Function<void ()>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->setCookies(dataStore.sessionID(), cookies, url, mainDocumentURL, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
+ completionHandler();
+ });
+}
+
+void HTTPCookieStore::deleteCookie(const WebCore::Cookie& cookie, Function<void ()>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->deleteCookie(dataStore.sessionID(), cookie, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
+ completionHandler();
+ });
+}
+
+void HTTPCookieStore::removeCookiesSinceDate(std::chrono::system_clock::time_point date, Function<void ()>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->deleteAllCookiesModifiedSince(dataStore.sessionID(), date, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
+ completionHandler();
+ });
+}
+
+void HTTPCookieStore::setHTTPCookieAcceptPolicy(HTTPCookieAcceptPolicy policy, Function<void ()>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->setHTTPCookieAcceptPolicy(dataStore.sessionID(), policy, [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](CallbackBase::Error error) {
+ completionHandler();
+ });
+}
+
+void HTTPCookieStore::getHTTPCookieAcceptPolicy(Function<void (HTTPCookieAcceptPolicy)>&& completionHandler)
+{
+ auto& dataStore = m_owningDataStore.websiteDataStore();
+ auto pool = dataStore.processPoolForCookieStorageOperations();
+ auto* cookieManager = pool->supplement<WebKit::WebCookieManagerProxy>();
+
+ cookieManager->getHTTPCookieAcceptPolicy(dataStore.sessionID(), [pool = WTFMove(pool), completionHandler = WTFMove(completionHandler)](HTTPCookieAcceptPolicy policy, CallbackBase::Error error) {
+ if (error != CallbackBase::Error::None)
+ policy = HTTPCookieAcceptPolicyNever;
+
+ completionHandler(policy);
+ });
+}
+
+} // namespace API
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStorehfromrev213946trunkSourceWebKit2UIProcessAPIAPIHTTPCookieStorageh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.h (from rev 213946, trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStorage.h) (0 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/APIHTTPCookieStore.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * 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 "APIObject.h"
+#include "HTTPCookieAcceptPolicy.h"
+#include <wtf/Function.h>
+#include <wtf/Vector.h>
+
+namespace WebCore {
+class URL;
+struct Cookie;
+}
+
+namespace API {
+
+class WebsiteDataStore;
+
+class HTTPCookieStore final : public ObjectImpl<Object::Type::HTTPCookieStore> {
+public:
+ static Ref<HTTPCookieStore> create(WebsiteDataStore& websiteDataStore)
+ {
+ return adoptRef(*new HTTPCookieStore(websiteDataStore));
+ }
+
+ virtual ~HTTPCookieStore();
+
+ void cookies(Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler);
+ void cookies(const WebCore::URL&, Function<void (const Vector<WebCore::Cookie>&)>&& completionHandler);
+
+ void setCookie(const WebCore::Cookie&, Function<void ()>&& completionHandler);
+ void setCookies(const Vector<WebCore::Cookie>&, const WebCore::URL&, const WebCore::URL& mainDocumentURL, Function<void ()>&& completionHandler);
+ void deleteCookie(const WebCore::Cookie&, Function<void ()>&& completionHandler);
+
+ void removeCookiesSinceDate(std::chrono::system_clock::time_point, Function<void ()>&& completionHandler);
+
+ void setHTTPCookieAcceptPolicy(WebKit::HTTPCookieAcceptPolicy, Function<void ()>&& completionHandler);
+ void getHTTPCookieAcceptPolicy(Function<void (WebKit::HTTPCookieAcceptPolicy)>&& completionHandler);
+
+private:
+ HTTPCookieStore(WebsiteDataStore&);
+
+ WebsiteDataStore& m_owningDataStore;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIWebsiteDataStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.cpp        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -64,12 +64,12 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-HTTPCookieStorage& WebsiteDataStore::httpCookieStorage()
</del><ins>+HTTPCookieStore& WebsiteDataStore::httpCookieStore()
</ins><span class="cx"> {
</span><del>- if (!m_apiHTTPCookieStorage)
- m_apiHTTPCookieStorage = HTTPCookieStorage::create(*this);
</del><ins>+ if (!m_apiHTTPCookieStore)
+ m_apiHTTPCookieStore = HTTPCookieStore::create(*this);
</ins><span class="cx">
</span><del>- return *m_apiHTTPCookieStorage;
</del><ins>+ return *m_apiHTTPCookieStore;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool WebsiteDataStore::isPersistent()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIWebsiteDataStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataStore.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx"> #ifndef APIWebsiteDataStore_h
</span><span class="cx"> #define APIWebsiteDataStore_h
</span><span class="cx">
</span><del>-#include "APIHTTPCookieStorage.h"
</del><ins>+#include "APIHTTPCookieStore.h"
</ins><span class="cx"> #include "WebsiteDataStore.h"
</span><span class="cx"> #include <WebCore/SessionID.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> void registerSharedResourceLoadObserver();
</span><span class="cx">
</span><span class="cx"> WebKit::WebsiteDataStore& websiteDataStore() { return *m_websiteDataStore; }
</span><del>- HTTPCookieStorage& httpCookieStorage();
</del><ins>+ HTTPCookieStore& httpCookieStore();
</ins><span class="cx">
</span><span class="cx"> static String defaultApplicationCacheDirectory();
</span><span class="cx"> static String defaultNetworkCacheDirectory();
</span><span class="lines">@@ -75,7 +75,7 @@
</span><span class="cx"> static String websiteDataDirectoryFileSystemRepresentation(const String& directoryName);
</span><span class="cx">
</span><span class="cx"> RefPtr<WebKit::WebsiteDataStore> m_websiteDataStore;
</span><del>- RefPtr<HTTPCookieStorage> m_apiHTTPCookieStorage;
</del><ins>+ RefPtr<HTTPCookieStore> m_apiHTTPCookieStore;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorageh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,92 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * 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.
- */
-
-#import <WebKit/WKFoundation.h>
-
-#if WK_API_ENABLED
-
-#import <Foundation/Foundation.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-/*!
- A WKHTTPCookieStorage object allows managing the HTTP cookies associated with a particular WKWebsiteDataStore.
- */
-WK_CLASS_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA))
-@interface WKHTTPCookieStorage : NSObject
-
-- (instancetype)init NS_UNAVAILABLE;
-
-/*! @abstract Fetches all stored cookies.
- @param completionHandler A block to invoke with the fetched cookies.
- */
-- (void)fetchCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler;
-
-/*! @abstract Fetches all of the stored cookies for the given URL.
- @param completionHandler A block to invoke with the fetched cookies.
- */
-- (void)fetchCookiesForURL:(NSURL *)url completionHandler:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler;
-
-/*! @abstract Set a cookie.
- @param cookie The cookie to set.
- @param completionHandler A block to invoke once the cookie has been stored.
- */
-- (void)setCookie:(NSHTTPCookie *)cookie completionHandler:(nullable void (^)())completionHandler;
-
-/*! @abstract Adds an array cookies to the cookie store, following the cookie accept policy.
- @param cookies The cookies to set.
- @param URL The URL from which the cookies were sent.
- @param mainDocumentURL The main document URL to be used as a base for the "same domain as main document" policy.
- @param completionHandler A block to invoke once the cookies have been stored.
- */
-- (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(NSURL *)url mainDocumentURL:(nullable NSURL *)mainDocumentURL completionHandler:(nullable void (^)())completionHandler;
-
-/*! @abstract Delete the specified cookie.
- @param completionHandler A block to invoke once the cookie has been deleted.
- */
-- (void)deleteCookie:(NSHTTPCookie *)cookie completionHandler:(nullable void (^)())completionHandler;
-
-/*! @abstract Delete all cookies from the cookie storage since the provided date.
- @param date The date after which set cookies should be removed.
- @param completionHandler A block to invoke once the cookies have been deleted.
- */
-- (void)removeCookiesSinceDate:(NSDate *)date completionHandler:(nullable void (^)())completionHandler;
-
-/*! @abstract Sets the cookie accept policy preference of the receiver.
- @param policy The cookie accept policy to set.
- @param completionHandler A block to invoke once the policy has been set.
- */
-- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy completionHandler:(nullable void (^)())completionHandler;
-
-/*! @abstract Fetches the cookie accept policy preference of the receiver.
- @param completionHandler A block to invoke with the fetched policy.
- */
-- (void)fetchCookieAcceptPolicy:(void (^)(NSHTTPCookieAcceptPolicy))completionHandler;
-
-@end
-
-NS_ASSUME_NONNULL_END
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoragemm"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,161 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * 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.
- */
-
-#import "config.h"
-#import "WKHTTPCookieStorageInternal.h"
-
-#if WK_API_ENABLED
-
-#include "HTTPCookieAcceptPolicy.h"
-#include <WebCore/CFNetworkSPI.h>
-#include <WebCore/Cookie.h>
-#include <WebCore/URL.h>
-#include <wtf/RetainPtr.h>
-
-static NSArray<NSHTTPCookie *> *coreCookiesToNSCookies(const Vector<WebCore::Cookie>& coreCookies)
-{
- NSMutableArray<NSHTTPCookie *> *nsCookies = [NSMutableArray arrayWithCapacity:coreCookies.size()];
-
- for (auto& cookie : coreCookies)
- [nsCookies addObject:(NSHTTPCookie *)cookie];
-
- return nsCookies;
-}
-
-@implementation WKHTTPCookieStorage
-
-- (void)dealloc
-{
- _cookieStorage->API::HTTPCookieStorage::~HTTPCookieStorage();
-
- [super dealloc];
-}
-
-- (void)fetchCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler
-{
- _cookieStorage->cookies([handler = adoptNS([completionHandler copy])](const Vector<WebCore::Cookie>& cookies) {
- auto rawHandler = (void (^)(NSArray<NSHTTPCookie *> *))handler.get();
- rawHandler(coreCookiesToNSCookies(cookies));
- });
-}
-
-- (void)fetchCookiesForURL:(NSURL *)url completionHandler:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler
-{
- _cookieStorage->cookies(url, [handler = adoptNS([completionHandler copy])](const Vector<WebCore::Cookie>& cookies) {
- auto rawHandler = (void (^)(NSArray<NSHTTPCookie *> *))handler.get();
- rawHandler(coreCookiesToNSCookies(cookies));
- });
-}
-
-- (void)setCookie:(NSHTTPCookie *)cookie completionHandler:(void (^)())completionHandler
-{
- _cookieStorage->setCookie(cookie, [handler = adoptNS([completionHandler copy])]() {
- auto rawHandler = (void (^)())handler.get();
- if (rawHandler)
- rawHandler();
- });
-
-}
-
-- (void)deleteCookie:(NSHTTPCookie *)cookie completionHandler:(void (^)())completionHandler
-{
- _cookieStorage->deleteCookie(cookie, [handler = adoptNS([completionHandler copy])]() {
- auto rawHandler = (void (^)())handler.get();
- if (rawHandler)
- rawHandler();
- });
-}
-
-- (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(NSURL *)URL mainDocumentURL:(NSURL *)mainDocumentURL completionHandler:(void (^)())completionHandler
-{
- Vector<WebCore::Cookie> coreCookies;
- coreCookies.reserveInitialCapacity(cookies.count);
- for (NSHTTPCookie *cookie : cookies)
- coreCookies.uncheckedAppend(cookie);
-
- _cookieStorage->setCookies(coreCookies, URL, mainDocumentURL, [handler = adoptNS([completionHandler copy])]() {
- auto rawHandler = (void (^)())handler.get();
- if (rawHandler)
- rawHandler();
- });
-}
-
-- (void)removeCookiesSinceDate:(NSDate *)date completionHandler:(void (^)())completionHandler
-{
- auto systemClockTime = std::chrono::system_clock::time_point(std::chrono::duration_cast<std::chrono::system_clock::duration>(std::chrono::duration<double>(date.timeIntervalSince1970)));
-
- _cookieStorage->removeCookiesSinceDate(systemClockTime, [handler = adoptNS([completionHandler copy])]() {
- auto rawHandler = (void (^)())handler.get();
- if (rawHandler)
- rawHandler();
- });
-}
-
-- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy completionHandler:(void (^)())completionHandler
-{
- _cookieStorage->setHTTPCookieAcceptPolicy(policy, [handler = adoptNS([completionHandler copy])]() {
- auto rawHandler = (void (^)())handler.get();
- if (rawHandler)
- rawHandler();
- });
-}
-
-static NSHTTPCookieAcceptPolicy kitCookiePolicyToNSCookiePolicy(WebKit::HTTPCookieAcceptPolicy kitPolicy)
-{
- switch (kitPolicy) {
- case WebKit::HTTPCookieAcceptPolicyAlways:
- return NSHTTPCookieAcceptPolicyAlways;
- case WebKit::HTTPCookieAcceptPolicyNever:
- return NSHTTPCookieAcceptPolicyNever;
- case WebKit::HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain:
- return NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain;
- case WebKit::HTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain:
- // Cast required because of CFNetworkSPI.
- return static_cast<NSHTTPCookieAcceptPolicy>(NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain);
- default:
- ASSERT_NOT_REACHED();
- }
-
- return NSHTTPCookieAcceptPolicyNever;
-}
-
-- (void)fetchCookieAcceptPolicy:(void (^)(NSHTTPCookieAcceptPolicy))completionHandler
-{
- _cookieStorage->getHTTPCookieAcceptPolicy([handler = adoptNS([completionHandler copy])](WebKit::HTTPCookieAcceptPolicy policy) {
- auto rawHandler = (void (^)(NSHTTPCookieAcceptPolicy))handler.get();
- rawHandler(kitCookiePolicyToNSCookiePolicy(policy));
- });
-}
-
-#pragma mark WKObject protocol implementation
-
-- (API::Object&)_apiObject
-{
- return *_cookieStorage;
-}
-
-@end
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorageInternalh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,49 +0,0 @@
</span><del>-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * 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.
- */
-
-#import "WKHTTPCookieStorage.h"
-
-#if WK_API_ENABLED
-
-#import "APIHTTPCookieStorage.h"
-#import "WKObject.h"
-
-namespace WebKit {
-
-inline WKHTTPCookieStorage *wrapper(API::HTTPCookieStorage& cookieStorage)
-{
- ASSERT([cookieStorage.wrapper() isKindOfClass:[WKHTTPCookieStorage class]]);
- return (WKHTTPCookieStorage *)cookieStorage.wrapper();
-}
-
-}
-
-@interface WKHTTPCookieStorage () <WKObject> {
-@package
- API::ObjectStorage<API::HTTPCookieStorage> _cookieStorage;
-}
-@end
-
-#endif
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorehfromrev213946trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorageh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h (from rev 213946, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.h) (0 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * 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.
+ */
+
+#import <WebKit/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*!
+ A WKHTTPCookieStore object allows managing the HTTP cookies associated with a particular WKWebsiteDataStore.
+ */
+WK_CLASS_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA))
+@interface WKHTTPCookieStore : NSObject
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/*! @abstract Fetches all stored cookies.
+ @param completionHandler A block to invoke with the fetched cookies.
+ */
+- (void)fetchCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler;
+
+/*! @abstract Fetches all of the stored cookies for the given URL.
+ @param completionHandler A block to invoke with the fetched cookies.
+ */
+- (void)fetchCookiesForURL:(NSURL *)url completionHandler:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler;
+
+/*! @abstract Set a cookie.
+ @param cookie The cookie to set.
+ @param completionHandler A block to invoke once the cookie has been stored.
+ */
+- (void)setCookie:(NSHTTPCookie *)cookie completionHandler:(nullable void (^)())completionHandler;
+
+/*! @abstract Adds an array cookies to the cookie store, following the cookie accept policy.
+ @param cookies The cookies to set.
+ @param URL The URL from which the cookies were sent.
+ @param mainDocumentURL The main document URL to be used as a base for the "same domain as main document" policy.
+ @param completionHandler A block to invoke once the cookies have been stored.
+ */
+- (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(NSURL *)url mainDocumentURL:(nullable NSURL *)mainDocumentURL completionHandler:(nullable void (^)())completionHandler;
+
+/*! @abstract Delete the specified cookie.
+ @param completionHandler A block to invoke once the cookie has been deleted.
+ */
+- (void)deleteCookie:(NSHTTPCookie *)cookie completionHandler:(nullable void (^)())completionHandler;
+
+/*! @abstract Delete all cookies from the cookie storage since the provided date.
+ @param date The date after which set cookies should be removed.
+ @param completionHandler A block to invoke once the cookies have been deleted.
+ */
+- (void)removeCookiesSinceDate:(NSDate *)date completionHandler:(nullable void (^)())completionHandler;
+
+/*! @abstract Sets the cookie accept policy preference of the receiver.
+ @param policy The cookie accept policy to set.
+ @param completionHandler A block to invoke once the policy has been set.
+ */
+- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy completionHandler:(nullable void (^)())completionHandler;
+
+/*! @abstract Fetches the cookie accept policy preference of the receiver.
+ @param completionHandler A block to invoke with the fetched policy.
+ */
+- (void)fetchCookieAcceptPolicy:(void (^)(NSHTTPCookieAcceptPolicy))completionHandler;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoremmfromrev213946trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoragemm"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm (from rev 213946, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorage.mm) (0 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStore.mm        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -0,0 +1,161 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * 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.
+ */
+
+#import "config.h"
+#import "WKHTTPCookieStoreInternal.h"
+
+#if WK_API_ENABLED
+
+#include "HTTPCookieAcceptPolicy.h"
+#include <WebCore/CFNetworkSPI.h>
+#include <WebCore/Cookie.h>
+#include <WebCore/URL.h>
+#include <wtf/RetainPtr.h>
+
+static NSArray<NSHTTPCookie *> *coreCookiesToNSCookies(const Vector<WebCore::Cookie>& coreCookies)
+{
+ NSMutableArray<NSHTTPCookie *> *nsCookies = [NSMutableArray arrayWithCapacity:coreCookies.size()];
+
+ for (auto& cookie : coreCookies)
+ [nsCookies addObject:(NSHTTPCookie *)cookie];
+
+ return nsCookies;
+}
+
+@implementation WKHTTPCookieStore
+
+- (void)dealloc
+{
+ _cookieStore->API::HTTPCookieStore::~HTTPCookieStore();
+
+ [super dealloc];
+}
+
+- (void)fetchCookies:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler
+{
+ _cookieStore->cookies([handler = adoptNS([completionHandler copy])](const Vector<WebCore::Cookie>& cookies) {
+ auto rawHandler = (void (^)(NSArray<NSHTTPCookie *> *))handler.get();
+ rawHandler(coreCookiesToNSCookies(cookies));
+ });
+}
+
+- (void)fetchCookiesForURL:(NSURL *)url completionHandler:(void (^)(NSArray<NSHTTPCookie *> *))completionHandler
+{
+ _cookieStore->cookies(url, [handler = adoptNS([completionHandler copy])](const Vector<WebCore::Cookie>& cookies) {
+ auto rawHandler = (void (^)(NSArray<NSHTTPCookie *> *))handler.get();
+ rawHandler(coreCookiesToNSCookies(cookies));
+ });
+}
+
+- (void)setCookie:(NSHTTPCookie *)cookie completionHandler:(void (^)())completionHandler
+{
+ _cookieStore->setCookie(cookie, [handler = adoptNS([completionHandler copy])]() {
+ auto rawHandler = (void (^)())handler.get();
+ if (rawHandler)
+ rawHandler();
+ });
+
+}
+
+- (void)deleteCookie:(NSHTTPCookie *)cookie completionHandler:(void (^)())completionHandler
+{
+ _cookieStore->deleteCookie(cookie, [handler = adoptNS([completionHandler copy])]() {
+ auto rawHandler = (void (^)())handler.get();
+ if (rawHandler)
+ rawHandler();
+ });
+}
+
+- (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(NSURL *)URL mainDocumentURL:(NSURL *)mainDocumentURL completionHandler:(void (^)())completionHandler
+{
+ Vector<WebCore::Cookie> coreCookies;
+ coreCookies.reserveInitialCapacity(cookies.count);
+ for (NSHTTPCookie *cookie : cookies)
+ coreCookies.uncheckedAppend(cookie);
+
+ _cookieStore->setCookies(coreCookies, URL, mainDocumentURL, [handler = adoptNS([completionHandler copy])]() {
+ auto rawHandler = (void (^)())handler.get();
+ if (rawHandler)
+ rawHandler();
+ });
+}
+
+- (void)removeCookiesSinceDate:(NSDate *)date completionHandler:(void (^)())completionHandler
+{
+ auto systemClockTime = std::chrono::system_clock::time_point(std::chrono::duration_cast<std::chrono::system_clock::duration>(std::chrono::duration<double>(date.timeIntervalSince1970)));
+
+ _cookieStore->removeCookiesSinceDate(systemClockTime, [handler = adoptNS([completionHandler copy])]() {
+ auto rawHandler = (void (^)())handler.get();
+ if (rawHandler)
+ rawHandler();
+ });
+}
+
+- (void)setCookieAcceptPolicy:(NSHTTPCookieAcceptPolicy)policy completionHandler:(void (^)())completionHandler
+{
+ _cookieStore->setHTTPCookieAcceptPolicy(policy, [handler = adoptNS([completionHandler copy])]() {
+ auto rawHandler = (void (^)())handler.get();
+ if (rawHandler)
+ rawHandler();
+ });
+}
+
+static NSHTTPCookieAcceptPolicy kitCookiePolicyToNSCookiePolicy(WebKit::HTTPCookieAcceptPolicy kitPolicy)
+{
+ switch (kitPolicy) {
+ case WebKit::HTTPCookieAcceptPolicyAlways:
+ return NSHTTPCookieAcceptPolicyAlways;
+ case WebKit::HTTPCookieAcceptPolicyNever:
+ return NSHTTPCookieAcceptPolicyNever;
+ case WebKit::HTTPCookieAcceptPolicyOnlyFromMainDocumentDomain:
+ return NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain;
+ case WebKit::HTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain:
+ // Cast required because of CFNetworkSPI.
+ return static_cast<NSHTTPCookieAcceptPolicy>(NSHTTPCookieAcceptPolicyExclusivelyFromMainDocumentDomain);
+ default:
+ ASSERT_NOT_REACHED();
+ }
+
+ return NSHTTPCookieAcceptPolicyNever;
+}
+
+- (void)fetchCookieAcceptPolicy:(void (^)(NSHTTPCookieAcceptPolicy))completionHandler
+{
+ _cookieStore->getHTTPCookieAcceptPolicy([handler = adoptNS([completionHandler copy])](WebKit::HTTPCookieAcceptPolicy policy) {
+ auto rawHandler = (void (^)(NSHTTPCookieAcceptPolicy))handler.get();
+ rawHandler(kitCookiePolicyToNSCookiePolicy(policy));
+ });
+}
+
+#pragma mark WKObject protocol implementation
+
+- (API::Object&)_apiObject
+{
+ return *_cookieStore;
+}
+
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStoreInternalhfromrev213946trunkSourceWebKit2UIProcessAPICocoaWKHTTPCookieStorageInternalh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h (from rev 213946, trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStorageInternal.h) (0 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h         (rev 0)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * 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.
+ */
+
+#import "WKHTTPCookieStore.h"
+
+#if WK_API_ENABLED
+
+#import "APIHTTPCookieStore.h"
+#import "WKObject.h"
+
+namespace WebKit {
+
+inline WKHTTPCookieStore *wrapper(API::HTTPCookieStore& cookieStore)
+{
+ ASSERT([cookieStore.wrapper() isKindOfClass:[WKHTTPCookieStore class]]);
+ return (WKHTTPCookieStore *)cookieStore.wrapper();
+}
+
+}
+
+@interface WKHTTPCookieStore () <WKObject> {
+@package
+ API::ObjectStorage<API::HTTPCookieStore> _cookieStore;
+}
+@end
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebsiteDataStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStore.mm        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -28,7 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx">
</span><del>-#import "WKHTTPCookieStorageInternal.h"
</del><ins>+#import "WKHTTPCookieStoreInternal.h"
</ins><span class="cx"> #import "WKNSArray.h"
</span><span class="cx"> #import "WKWebsiteDataRecordInternal.h"
</span><span class="cx"> #import "WebsiteDataFetchOption.h"
</span><span class="lines">@@ -195,9 +195,9 @@
</span><span class="cx"> _websiteDataStore->websiteDataStore().setResourceLoadStatisticsEnabled(enabled);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (WKHTTPCookieStorage *)_httpCookieStorage
</del><ins>+- (WKHTTPCookieStore *)_httpCookieStore
</ins><span class="cx"> {
</span><del>- return WebKit::wrapper(_websiteDataStore->httpCookieStorage());
</del><ins>+ return WebKit::wrapper(_websiteDataStore->httpCookieStore());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebsiteDataStorePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx">
</span><span class="cx"> NS_ASSUME_NONNULL_BEGIN
</span><span class="cx">
</span><del>-@class WKHTTPCookieStorage;
</del><ins>+@class WKHTTPCookieStore;
</ins><span class="cx"> @class _WKWebsiteDataStoreConfiguration;
</span><span class="cx">
</span><span class="cx"> typedef NS_OPTIONS(NSUInteger, _WKWebsiteDataStoreFetchOptions) {
</span><span class="lines">@@ -44,8 +44,8 @@
</span><span class="cx">
</span><span class="cx"> @property (nonatomic, setter=_setResourceLoadStatisticsEnabled:) BOOL _resourceLoadStatisticsEnabled WK_API_AVAILABLE(macosx(10.12), ios(10.0));
</span><span class="cx">
</span><del>-/*! @abstract Returns the cookie storage representing HTTP cookies in this website data store. */
-@property (nonatomic, readonly) WKHTTPCookieStorage *_httpCookieStorage WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</del><ins>+/*! @abstract Returns the cookie store representing HTTP cookies in this website data store. */
+@property (nonatomic, readonly) WKHTTPCookieStore *_httpCookieStore WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</ins><span class="cx">
</span><span class="cx"> @end
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> #include "APIAutomationClient.h"
</span><span class="cx"> #include "APICustomProtocolManagerClient.h"
</span><span class="cx"> #include "APIDownloadClient.h"
</span><del>-#include "APIHTTPCookieStorage.h"
</del><ins>+#include "APIHTTPCookieStore.h"
</ins><span class="cx"> #include "APILegacyContextHistoryClient.h"
</span><span class="cx"> #include "APIPageConfiguration.h"
</span><span class="cx"> #include "APIProcessPoolConfiguration.h"
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessPoolh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessPool.h (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/WebProcessPool.h        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx"> class AutomationClient;
</span><span class="cx"> class CustomProtocolManagerClient;
</span><span class="cx"> class DownloadClient;
</span><del>-class HTTPCookieStorage;
</del><ins>+class HTTPCookieStore;
</ins><span class="cx"> class LegacyContextHistoryClient;
</span><span class="cx"> class PageConfiguration;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> // This means that multiple NetworkProcesses can be using the same session, which means that multiple
</span><span class="cx"> // NetworkProcesses can be referring to the same platform cookie storage.
</span><span class="cx"> //
</span><del>- // While this may cause complications with future APIs it is actually fine for implementing the WKHTTPCookieStorage API
</del><ins>+ // While this may cause complications with future APIs it is actually fine for implementing the WKHTTPCookieStore API
</ins><span class="cx"> // because we only need one NetworkProcess to successfully make a requested platform cookie storage change.
</span><span class="cx"> //
</span><span class="cx"> // FIXME: We need to start to unravel this mess going forward.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1063,9 +1063,9 @@
</span><span class="cx">                 51D124351E6DF652002B2820 /* WKURLSchemeHandlerTask.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D1242F1E6DDDD7002B2820 /* WKURLSchemeHandlerTask.h */; settings = {ATTRIBUTES = (Public, ); }; };
</span><span class="cx">                 51D124361E6DFB39002B2820 /* WKURLSchemeHandlerTask.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D124301E6DDDD7002B2820 /* WKURLSchemeHandlerTask.mm */; };
</span><span class="cx">                 51D1243A1E6E0AAB002B2820 /* APIURLSchemeHandlerTask.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D124381E6DFDB9002B2820 /* APIURLSchemeHandlerTask.cpp */; };
</span><del>-                51D124911E74BF3C002B2820 /* APIHTTPCookieStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D124821E734AC8002B2820 /* APIHTTPCookieStorage.cpp */; };
-                51D124921E74BF48002B2820 /* WKHTTPCookieStorage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D124851E734AE3002B2820 /* WKHTTPCookieStorage.mm */; };
-                51D124991E763C01002B2820 /* WKHTTPCookieStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D124841E734AE3002B2820 /* WKHTTPCookieStorage.h */; settings = {ATTRIBUTES = (Private, ); }; };
</del><ins>+                51D124911E74BF3C002B2820 /* APIHTTPCookieStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D124821E734AC8002B2820 /* APIHTTPCookieStore.cpp */; };
+                51D124921E74BF48002B2820 /* WKHTTPCookieStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51D124851E734AE3002B2820 /* WKHTTPCookieStore.mm */; };
+                51D124991E763C01002B2820 /* WKHTTPCookieStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D124841E734AE3002B2820 /* WKHTTPCookieStore.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 51D130531382EAC000351EDD /* SecItemRequestData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D1304F1382EAC000351EDD /* SecItemRequestData.cpp */; };
</span><span class="cx">                 51D130541382EAC000351EDD /* SecItemRequestData.h in Headers */ = {isa = PBXBuildFile; fileRef = 51D130501382EAC000351EDD /* SecItemRequestData.h */; };
</span><span class="cx">                 51D130551382EAC000351EDD /* SecItemResponseData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51D130511382EAC000351EDD /* SecItemResponseData.cpp */; };
</span><span class="lines">@@ -3293,11 +3293,11 @@
</span><span class="cx">                 51D124371E6DFD2A002B2820 /* WKURLSchemeHandlerTaskInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKURLSchemeHandlerTaskInternal.h; sourceTree = "<group>"; };
</span><span class="cx">                 51D124381E6DFDB9002B2820 /* APIURLSchemeHandlerTask.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIURLSchemeHandlerTask.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 51D124391E6DFDB9002B2820 /* APIURLSchemeHandlerTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIURLSchemeHandlerTask.h; sourceTree = "<group>"; };
</span><del>-                51D124821E734AC8002B2820 /* APIHTTPCookieStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIHTTPCookieStorage.cpp; sourceTree = "<group>"; };
-                51D124831E734AC8002B2820 /* APIHTTPCookieStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIHTTPCookieStorage.h; sourceTree = "<group>"; };
-                51D124841E734AE3002B2820 /* WKHTTPCookieStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStorage.h; sourceTree = "<group>"; };
-                51D124851E734AE3002B2820 /* WKHTTPCookieStorage.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKHTTPCookieStorage.mm; sourceTree = "<group>"; };
-                51D124861E734AE3002B2820 /* WKHTTPCookieStorageInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStorageInternal.h; sourceTree = "<group>"; };
</del><ins>+                51D124821E734AC8002B2820 /* APIHTTPCookieStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIHTTPCookieStore.cpp; sourceTree = "<group>"; };
+                51D124831E734AC8002B2820 /* APIHTTPCookieStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIHTTPCookieStore.h; sourceTree = "<group>"; };
+                51D124841E734AE3002B2820 /* WKHTTPCookieStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStore.h; sourceTree = "<group>"; };
+                51D124851E734AE3002B2820 /* WKHTTPCookieStore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKHTTPCookieStore.mm; sourceTree = "<group>"; };
+                51D124861E734AE3002B2820 /* WKHTTPCookieStoreInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKHTTPCookieStoreInternal.h; sourceTree = "<group>"; };
</ins><span class="cx">                 51D1304F1382EAC000351EDD /* SecItemRequestData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecItemRequestData.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 51D130501382EAC000351EDD /* SecItemRequestData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecItemRequestData.h; sourceTree = "<group>"; };
</span><span class="cx">                 51D130511382EAC000351EDD /* SecItemResponseData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SecItemResponseData.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -5562,9 +5562,9 @@
</span><span class="cx">                                 1A4D664918A3030E00D82E21 /* WKFrameInfo.mm */,
</span><span class="cx">                                 2DF9EEE71A78245500B6CFBE /* WKFrameInfoInternal.h */,
</span><span class="cx">                                 1A6FA21D1BD0435B00AAA650 /* WKFrameInfoPrivate.h */,
</span><del>-                                51D124841E734AE3002B2820 /* WKHTTPCookieStorage.h */,
-                                51D124851E734AE3002B2820 /* WKHTTPCookieStorage.mm */,
-                                51D124861E734AE3002B2820 /* WKHTTPCookieStorageInternal.h */,
</del><ins>+                                51D124841E734AE3002B2820 /* WKHTTPCookieStore.h */,
+                                51D124851E734AE3002B2820 /* WKHTTPCookieStore.mm */,
+                                51D124861E734AE3002B2820 /* WKHTTPCookieStoreInternal.h */,
</ins><span class="cx">                                 1A422F8A18B29B5400D8CD96 /* WKHistoryDelegatePrivate.h */,
</span><span class="cx">                                 1AB40EE31BF677E300BA81BE /* WKMenuItemIdentifiers.mm */,
</span><span class="cx">                                 1AB40EE41BF677E300BA81BE /* WKMenuItemIdentifiersPrivate.h */,
</span><span class="lines">@@ -6758,8 +6758,8 @@
</span><span class="cx">                                 2DABA7751A82B42100EF0F1A /* APIHistoryClient.h */,
</span><span class="cx">                                 93A88B421BC8828C00ABA5C2 /* APIHitTestResult.cpp */,
</span><span class="cx">                                 93A88B431BC8828C00ABA5C2 /* APIHitTestResult.h */,
</span><del>-                                51D124821E734AC8002B2820 /* APIHTTPCookieStorage.cpp */,
-                                51D124831E734AC8002B2820 /* APIHTTPCookieStorage.h */,
</del><ins>+                                51D124821E734AC8002B2820 /* APIHTTPCookieStore.cpp */,
+                                51D124831E734AC8002B2820 /* APIHTTPCookieStore.h */,
</ins><span class="cx">                                 5143B2611DDD0DA00014FAC6 /* APIIconLoadingClient.h */,
</span><span class="cx">                                 7CE4D2061A46775700C7F152 /* APILegacyContextHistoryClient.h */,
</span><span class="cx">                                 1A2464F21891E45100234C5B /* APILoaderClient.h */,
</span><span class="lines">@@ -8552,7 +8552,7 @@
</span><span class="cx">                                 514129941C6428BB0059E714 /* WebIDBConnectionToServer.h in Headers */,
</span><span class="cx">                                 510523741C73D38B007993CB /* WebIDBConnectionToServerMessages.h in Headers */,
</span><span class="cx">                                 BCCF6ABD12C91EF9008F9C35 /* WebImage.h in Headers */,
</span><del>-                                51D124991E763C01002B2820 /* WKHTTPCookieStorage.h in Headers */,
</del><ins>+                                51D124991E763C01002B2820 /* WKHTTPCookieStore.h in Headers */,
</ins><span class="cx">                                 1C8E28201275D15400BC7BD0 /* WebInspector.h in Headers */,
</span><span class="cx">                                 BC032D8210F4378D0058C15A /* WebInspectorClient.h in Headers */,
</span><span class="cx">                                 A55BA8351BA3E70A007CD33D /* WebInspectorFrontendAPIDispatcher.h in Headers */,
</span><span class="lines">@@ -9806,7 +9806,7 @@
</span><span class="cx">                                 1A6FBA2B11E6862700DB1371 /* NetscapeBrowserFuncs.cpp in Sources */,
</span><span class="cx">                                 1A6FBD2911E69BC200DB1371 /* NetscapePlugin.cpp in Sources */,
</span><span class="cx">                                 1AE5B7FB11E7AED200BA6767 /* NetscapePluginMac.mm in Sources */,
</span><del>-                                51D124921E74BF48002B2820 /* WKHTTPCookieStorage.mm in Sources */,
</del><ins>+                                51D124921E74BF48002B2820 /* WKHTTPCookieStore.mm in Sources */,
</ins><span class="cx">                                 1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */,
</span><span class="cx">                                 839A2F311E2067450039057E /* HighPerformanceGraphicsUsageSampler.cpp in Sources */,
</span><span class="cx">                                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */,
</span><span class="lines">@@ -9825,7 +9825,7 @@
</span><span class="cx">                                 831EEBBE1BD85C4300BB64C3 /* NetworkCacheSpeculativeLoad.cpp in Sources */,
</span><span class="cx">                                 832AE2531BE2E8CD00FAAE10 /* NetworkCacheSpeculativeLoadManager.cpp in Sources */,
</span><span class="cx">                                 83BDCCB91AC5FDB6003F6441 /* NetworkCacheStatistics.cpp in Sources */,
</span><del>-                                51D124911E74BF3C002B2820 /* APIHTTPCookieStorage.cpp in Sources */,
</del><ins>+                                51D124911E74BF3C002B2820 /* APIHTTPCookieStore.cpp in Sources */,
</ins><span class="cx">                                 E4436ED01A0D040B00EAD204 /* NetworkCacheStorage.cpp in Sources */,
</span><span class="cx">                                 8310428C1BD6B66F00A715E4 /* NetworkCacheSubresourcesEntry.cpp in Sources */,
</span><span class="cx">                                 5302583D1DCBBD2200DA89C2 /* NetworkCaptureEvent.cpp in Sources */,
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Tools/ChangeLog        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2017-03-14 Brady Eidson <beidson@apple.com>
+
+ Rename WKHTTPCookieStorage to WKHTTPCookieStore.
+ https://bugs.webkit.org/show_bug.cgi?id=169630
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm:
+ (TEST):
+
</ins><span class="cx"> 2017-03-14 Jonathan Bedard <jbedard@apple.com>
</span><span class="cx">
</span><span class="cx"> webkitpy: Efficient app installation for device testing
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKit2CocoaWKHTTPCookieStoragemm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm (213946 => 213947)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm        2017-03-14 22:32:10 UTC (rev 213946)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/WKHTTPCookieStorage.mm        2017-03-14 22:36:52 UTC (rev 213947)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx">
</span><span class="cx"> #import "PlatformUtilities.h"
</span><span class="cx"> #import <WebKit/WKFoundation.h>
</span><del>-#import <WebKit/WKHTTPCookieStorage.h>
</del><ins>+#import <WebKit/WKHTTPCookieStore.h>
</ins><span class="cx"> #import <WebKit/WKWebsiteDataStorePrivate.h>
</span><span class="cx"> #import <wtf/RetainPtr.h>
</span><span class="cx">
</span><span class="lines">@@ -40,10 +40,10 @@
</span><span class="cx"> auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
</span><span class="cx"> [webView loadHTMLString:@"Oh hello" baseURL:[NSURL URLWithString:@"http://webkit.org"]];
</span><span class="cx">
</span><del>- RetainPtr<WKHTTPCookieStorage> cookieStorage = [WKWebsiteDataStore defaultDataStore]._httpCookieStorage;
</del><ins>+ RetainPtr<WKHTTPCookieStore> cookieStore = [WKWebsiteDataStore defaultDataStore]._httpCookieStore;
</ins><span class="cx">
</span><span class="cx"> NSArray<NSHTTPCookie *> *cookies = nil;
</span><del>- [cookieStorage fetchCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
</del><ins>+ [cookieStore fetchCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
</ins><span class="cx"> *cookiesPtr = [nsCookies retain];
</span><span class="cx"> gotFlag = true;
</span><span class="cx"> }];
</span><span class="lines">@@ -73,7 +73,7 @@
</span><span class="cx"> NSHTTPCookieMaximumAge: @"10000",
</span><span class="cx"> }];
</span><span class="cx">
</span><del>- [cookieStorage setCookie:cookie1.get() completionHandler:[](){
</del><ins>+ [cookieStore setCookie:cookie1.get() completionHandler:[](){
</ins><span class="cx"> gotFlag = true;
</span><span class="cx"> }];
</span><span class="cx">
</span><span class="lines">@@ -80,7 +80,7 @@
</span><span class="cx"> TestWebKitAPI::Util::run(&gotFlag);
</span><span class="cx"> gotFlag = false;
</span><span class="cx">
</span><del>- [cookieStorage setCookie:cookie2.get() completionHandler:[](){
</del><ins>+ [cookieStore setCookie:cookie2.get() completionHandler:[](){
</ins><span class="cx"> gotFlag = true;
</span><span class="cx"> }];
</span><span class="cx">
</span><span class="lines">@@ -87,7 +87,7 @@
</span><span class="cx"> TestWebKitAPI::Util::run(&gotFlag);
</span><span class="cx"> gotFlag = false;
</span><span class="cx">
</span><del>- [cookieStorage fetchCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
</del><ins>+ [cookieStore fetchCookies:[cookiesPtr = &cookies](NSArray<NSHTTPCookie *> *nsCookies) {
</ins><span class="cx"> *cookiesPtr = [nsCookies retain];
</span><span class="cx"> gotFlag = true;
</span><span class="cx"> }];
</span></span></pre>
</div>
</div>
</body>
</html>