<!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>[199167] trunk/Source</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/199167">199167</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2016-04-07 12:00:53 -0700 (Thu, 07 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>CookieJar should support adding synthetic cookies for developer tools
https://bugs.webkit.org/show_bug.cgi?id=156091
<rdar://problem/25581340>
Reviewed by Timothy Hatcher.
Source/WebCore:
This patch adds an API that can set an arbitrary cookie in cookie storage
in order to support developer tools and automated testing. It delegates storing
the cookie to a platform implementation.
No new tests because the code isn't used by any clients yet.
* loader/CookieJar.cpp:
(WebCore::addCookie): Added.
* loader/CookieJar.h:
* platform/Cookie.h:
Remove an outdated comment. This struct is used in many places.
* platform/CookiesStrategy.h: Add new method.
* platform/network/PlatformCookieJar.h: Add new method.
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::addCookie): Add a stub.
* platform/network/curl/CookieJarCurl.cpp:
(WebCore::addCookie): Add a stub.
* platform/network/mac/CookieJarMac.mm:
(WebCore::addCookie): Add an implementation that turns the WebCore::Cookie into
an NSHTTPCookie and converts it again to CFHTTPCookie if necessary.
* platform/network/soup/CookieJarSoup.cpp:
(WebCore::addCookie): Add a stub.
* platform/spi/cf/CFNetworkSPI.h:
Add -[NSHTTPCookie _CFHTTPCookie] SPI.
Source/WebKit/mac:
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::addCookie):
Add new method override.
Source/WebKit/win:
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.cpp:
Add new method override.
Source/WebKit2:
Plumb the new method through the strategy and out to the network process.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::addCookie):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::addCookie):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderCookieJarcpp">trunk/Source/WebCore/loader/CookieJar.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderCookieJarh">trunk/Source/WebCore/loader/CookieJar.h</a></li>
<li><a href="#trunkSourceWebCoreplatformCookieh">trunk/Source/WebCore/platform/Cookie.h</a></li>
<li><a href="#trunkSourceWebCoreplatformCookiesStrategyh">trunk/Source/WebCore/platform/CookiesStrategy.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkPlatformCookieJarh">trunk/Source/WebCore/platform/network/PlatformCookieJar.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcfCookieJarCFNetcpp">trunk/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkcurlCookieJarCurlcpp">trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkmacCookieJarMacmm">trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworksoupCookieJarSoupcpp">trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformspicfCFNetworkSPIh">trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesmm">trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin">trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/ChangeLog        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2016-04-07 Brian Burg <bburg@apple.com>
+
+ CookieJar should support adding synthetic cookies for developer tools
+ https://bugs.webkit.org/show_bug.cgi?id=156091
+ <rdar://problem/25581340>
+
+ Reviewed by Timothy Hatcher.
+
+ This patch adds an API that can set an arbitrary cookie in cookie storage
+ in order to support developer tools and automated testing. It delegates storing
+ the cookie to a platform implementation.
+
+ No new tests because the code isn't used by any clients yet.
+
+ * loader/CookieJar.cpp:
+ (WebCore::addCookie): Added.
+ * loader/CookieJar.h:
+
+ * platform/Cookie.h:
+ Remove an outdated comment. This struct is used in many places.
+
+ * platform/CookiesStrategy.h: Add new method.
+ * platform/network/PlatformCookieJar.h: Add new method.
+ * platform/network/cf/CookieJarCFNet.cpp:
+ (WebCore::addCookie): Add a stub.
+ * platform/network/curl/CookieJarCurl.cpp:
+ (WebCore::addCookie): Add a stub.
+ * platform/network/mac/CookieJarMac.mm:
+ (WebCore::addCookie): Add an implementation that turns the WebCore::Cookie into
+ an NSHTTPCookie and converts it again to CFHTTPCookie if necessary.
+
+ * platform/network/soup/CookieJarSoup.cpp:
+ (WebCore::addCookie): Add a stub.
+
+ * platform/spi/cf/CFNetworkSPI.h:
+ Add -[NSHTTPCookie _CFHTTPCookie] SPI.
+
</ins><span class="cx"> 2016-04-07 Commit Queue <commit-queue@webkit.org>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r199128 and r199141.
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderCookieJarcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/CookieJar.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/CookieJar.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/loader/CookieJar.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2012, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -84,4 +84,9 @@
</span><span class="cx"> platformStrategies()->cookiesStrategy()->deleteCookie(storageSession(document), url, cookieName);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void addCookie(const Document* document, const URL& url, const Cookie& cookie)
+{
+ platformStrategies()->cookiesStrategy()->addCookie(storageSession(document), url, cookie);
</ins><span class="cx"> }
</span><ins>+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreloaderCookieJarh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/CookieJar.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/CookieJar.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/loader/CookieJar.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2003, 2006, 2008, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2003, 2006, 2008, 2012, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx"> WEBCORE_EXPORT String cookieRequestHeaderFieldValue(const Document*, const URL&);
</span><span class="cx"> WEBCORE_EXPORT bool getRawCookies(const Document*, const URL&, Vector<Cookie>&);
</span><span class="cx"> WEBCORE_EXPORT void deleteCookie(const Document*, const URL&, const String& cookieName);
</span><ins>+WEBCORE_EXPORT void addCookie(const Document*, const URL&, const Cookie&);
</ins><span class="cx">
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCookieh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Cookie.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Cookie.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/Cookie.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -31,9 +31,6 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>- // This struct is currently only used to provide more cookies information
- // to the Web Inspector.
-
</del><span class="cx"> struct Cookie {
</span><span class="cx"> Cookie() { }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformCookiesStrategyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/CookiesStrategy.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/CookiesStrategy.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/CookiesStrategy.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> virtual String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const URL&) = 0;
</span><span class="cx"> virtual bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const URL&, Vector<Cookie>&) = 0;
</span><span class="cx"> virtual void deleteCookie(const NetworkStorageSession&, const URL&, const String& cookieName) = 0;
</span><ins>+ virtual void addCookie(const NetworkStorageSession&, const URL&, const Cookie&) = 0;
</ins><span class="cx">
</span><span class="cx"> protected:
</span><span class="cx"> virtual ~CookiesStrategy() { }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkPlatformCookieJarh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/PlatformCookieJar.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/PlatformCookieJar.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/network/PlatformCookieJar.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2003, 2006, 2008, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2003, 2006, 2008, 2012, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> WEBCORE_EXPORT String cookieRequestHeaderFieldValue(const NetworkStorageSession&, const URL& firstParty, const URL&);
</span><span class="cx"> WEBCORE_EXPORT bool getRawCookies(const NetworkStorageSession&, const URL& firstParty, const URL&, Vector<Cookie>&);
</span><span class="cx"> WEBCORE_EXPORT void deleteCookie(const NetworkStorageSession&, const URL&, const String&);
</span><ins>+WEBCORE_EXPORT void addCookie(const NetworkStorageSession&, const URL&, const Cookie&);
</ins><span class="cx"> WEBCORE_EXPORT void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames);
</span><span class="cx"> WEBCORE_EXPORT void deleteCookiesForHostnames(const NetworkStorageSession&, const Vector<String>& cookieHostNames);
</span><span class="cx"> WEBCORE_EXPORT void deleteAllCookies(const NetworkStorageSession&);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcfCookieJarCFNetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/network/cf/CookieJarCFNet.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2006, 2007, 2008, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2006, 2007, 2008, 2012, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include "Cookie.h"
</span><span class="cx"> #include "URL.h"
</span><span class="cx"> #include "NetworkStorageSession.h"
</span><ins>+#include "NotImplemented.h"
</ins><span class="cx"> #include "SoftLinking.h"
</span><span class="cx"> #include <CFNetwork/CFHTTPCookiesPriv.h>
</span><span class="cx"> #include <CoreFoundation/CoreFoundation.h>
</span><span class="lines">@@ -216,6 +217,12 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void addCookie(const NetworkStorageSession&, const URL&, const Cookie&)
+{
+ // FIXME: implement this command. <https://webkit.org/b/156298>
+ notImplemented();
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession& session, HashSet<String>& hostnames)
</span><span class="cx"> {
</span><span class="cx"> RetainPtr<CFArrayRef> cookiesCF = adoptCF(CFHTTPCookieStorageCopyCookies(session.cookieStorage().get()));
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkcurlCookieJarCurlcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/network/curl/CookieJarCurl.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -20,6 +20,7 @@
</span><span class="cx"> #if USE(CURL)
</span><span class="cx">
</span><span class="cx"> #include "Cookie.h"
</span><ins>+#include "NotImplemented.h"
</ins><span class="cx"> #include "URL.h"
</span><span class="cx"> #include "ResourceHandleManager.h"
</span><span class="cx">
</span><span class="lines">@@ -325,6 +326,12 @@
</span><span class="cx"> // FIXME: Not yet implemented
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void addCookie(const NetworkStorageSession&, const URL&, const Cookie&)
+{
+ // FIXME: implement this command. <https://webkit.org/b/156296>
+ notImplemented();
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession&, HashSet<String>& hostnames)
</span><span class="cx"> {
</span><span class="cx"> // FIXME: Not yet implemented
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkmacCookieJarMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/network/mac/CookieJarMac.mm        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -31,6 +31,10 @@
</span><span class="cx"> #import "NetworkStorageSession.h"
</span><span class="cx"> #import "WebCoreSystemInterface.h"
</span><span class="cx">
</span><ins>+namespace WebCore {
+static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession&);
+}
+
</ins><span class="cx"> #if !USE(CFNETWORK)
</span><span class="cx">
</span><span class="cx"> #import "Cookie.h"
</span><span class="lines">@@ -242,6 +246,38 @@
</span><span class="cx"> END_BLOCK_OBJC_EXCEPTIONS;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void addCookie(const NetworkStorageSession& session, const URL& url, const Cookie& cookie)
+{
+ BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+ RetainPtr<CFHTTPCookieStorageRef> cookieStorage = session.cookieStorage();
+
+ // FIXME: existing APIs do not provide a way to set httpOnly without parsing headers from scratch.
+
+ NSURL *originURL = url;
+ NSHTTPCookie *httpCookie = [NSHTTPCookie cookieWithProperties:@{
+ NSHTTPCookieName: cookie.name,
+ NSHTTPCookieValue: cookie.value,
+ NSHTTPCookieDomain: cookie.domain,
+ NSHTTPCookiePath: cookie.path,
+ NSHTTPCookieOriginURL: originURL,
+ NSHTTPCookieSecure: @(cookie.secure),
+ NSHTTPCookieDiscard: @(cookie.session),
+ NSHTTPCookieExpires: [NSDate dateWithTimeIntervalSince1970:cookie.expires / 1000.0],
+ }];
+
+#if !USE(CFNETWORK)
+ if (!cookieStorage) {
+ [WebCore::cookieStorage(session) setCookie:httpCookie];
+ return;
+ }
+#endif // !USE(CFNETWORK)
+
+ CFHTTPCookieStorageSetCookie(cookieStorage.get(), [httpCookie _CFHTTPCookie]);
+
+ END_BLOCK_OBJC_EXCEPTIONS;
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession& session, HashSet<String>& hostnames)
</span><span class="cx"> {
</span><span class="cx"> BEGIN_BLOCK_OBJC_EXCEPTIONS;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworksoupCookieJarSoupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/network/soup/CookieJarSoup.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> #include "GUniquePtrSoup.h"
</span><span class="cx"> #include "URL.h"
</span><span class="cx"> #include "NetworkingContext.h"
</span><ins>+#include "NotImplemented.h"
</ins><span class="cx"> #include "PlatformCookieJar.h"
</span><span class="cx"> #include "SoupNetworkSession.h"
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><span class="lines">@@ -191,6 +192,12 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void addCookie(const NetworkStorageSession&, const URL&, const Cookie&)
+{
+ // FIXME: implement this command. <https://webkit.org/b/156295>
+ notImplemented();
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession& session, HashSet<String>& hostnames)
</span><span class="cx"> {
</span><span class="cx"> SoupCookieJar* cookieJar = cookieJarForSession(session);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformspicfCFNetworkSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif // defined(__OBJC__) && PLATFORM(COCOA)
</span><span class="cx">
</span><del>-#else // PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
</del><ins>+#else // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
</ins><span class="cx">
</span><span class="cx"> typedef CF_ENUM(int64_t, _TimingDataOptions)
</span><span class="cx"> {
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx"> typedef const struct _CFURLRequest* CFURLRequestRef;
</span><span class="cx"> typedef const struct __CFURLStorageSession* CFURLStorageSessionRef;
</span><span class="cx"> typedef const struct __CFData* CFDataRef;
</span><ins>+typedef const struct OpaqueCFHTTPCookie* CFHTTPCookieRef;
</ins><span class="cx"> typedef struct _CFURLConnection* CFURLConnectionRef;
</span><span class="cx"> typedef struct _CFURLCredentialStorage* CFURLCredentialStorageRef;
</span><span class="cx"> typedef struct _CFURLProtectionSpace* CFURLProtectionSpaceRef;
</span><span class="lines">@@ -97,6 +98,10 @@
</span><span class="cx"> - (NSDictionary *)_timingData;
</span><span class="cx"> @end
</span><span class="cx">
</span><ins>+@interface NSHTTPCookie ()
+- (CFHTTPCookieRef)_CFHTTPCookie;
+@end
+
</ins><span class="cx"> #if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101100) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000)
</span><span class="cx"> @interface NSURLSessionConfiguration ()
</span><span class="cx"> @property (assign) _TimingDataOptions _timingDataOptions;
</span><span class="lines">@@ -122,7 +127,7 @@
</span><span class="cx">
</span><span class="cx"> #endif // defined(__OBJC__)
</span><span class="cx">
</span><del>-#endif // PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
</del><ins>+#endif // !PLATFORM(WIN) && !USE(APPLE_INTERNAL_SDK)
</ins><span class="cx">
</span><span class="cx"> EXTERN_C void CFURLRequestSetShouldStartSynchronously(CFURLRequestRef, Boolean);
</span><span class="cx">
</span><span class="lines">@@ -152,6 +157,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> EXTERN_C CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef);
</span><ins>+EXTERN_C void CFHTTPCookieStorageSetCookie(CFHTTPCookieStorageRef, CFHTTPCookieRef);
</ins><span class="cx"> EXTERN_C void CFHTTPCookieStorageSetCookieAcceptPolicy(CFHTTPCookieStorageRef, CFHTTPCookieStorageAcceptPolicy);
</span><span class="cx"> EXTERN_C void _CFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
</span><span class="cx"> EXTERN_C CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-04-07 Brian Burg <bburg@apple.com>
+
+ CookieJar should support adding synthetic cookies for developer tools
+ https://bugs.webkit.org/show_bug.cgi?id=156091
+ <rdar://problem/25581340>
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.mm:
+ (WebPlatformStrategies::addCookie):
+ Add new method override.
+
</ins><span class="cx"> 2016-04-06 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Fix CMake DumpRenderTree
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -56,8 +56,8 @@
</span><span class="cx"> String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) override;
</span><span class="cx"> bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&) override;
</span><span class="cx"> void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&) override;
</span><ins>+ void addCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const WebCore::Cookie&) override;
</ins><span class="cx">
</span><del>-
</del><span class="cx"> // WebCore::PluginStrategy
</span><span class="cx"> void refreshPlugins() override;
</span><span class="cx"> void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&) override;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebPlatformStrategiesmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -112,6 +112,11 @@
</span><span class="cx"> WebCore::deleteCookie(session, url, cookieName);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPlatformStrategies::addCookie(const NetworkStorageSession& session, const URL& url, const Cookie& cookie)
+{
+ WebCore::addCookie(session, url, cookie);
+}
+
</ins><span class="cx"> void WebPlatformStrategies::refreshPlugins()
</span><span class="cx"> {
</span><span class="cx"> [[WebPluginDatabase sharedDatabaseIfExists] refresh];
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit/win/ChangeLog        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-04-07 Brian Burg <bburg@apple.com>
+
+ CookieJar should support adding synthetic cookies for developer tools
+ https://bugs.webkit.org/show_bug.cgi?id=156091
+ <rdar://problem/25581340>
+
+ Reviewed by Timothy Hatcher.
+
+ * WebCoreSupport/WebPlatformStrategies.h:
+ * WebCoreSupport/WebPlatformStrategies.cpp:
+ Add new method override.
+
</ins><span class="cx"> 2016-03-24 Said Abou-Hallawa <sabouhallawa@apple,com>
</span><span class="cx">
</span><span class="cx"> Change NativeImagePtr for CG to be RetainPtr<CGImageRef>
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2011, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -104,6 +104,11 @@
</span><span class="cx"> WebCore::deleteCookie(session, url, cookieName);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPlatformStrategies::addCookie(const NetworkStorageSession& session, const URL& url, const Cookie& cookie)
+{
+ WebCore::addCookie(session, url, cookie);
+}
+
</ins><span class="cx"> void WebPlatformStrategies::refreshPlugins()
</span><span class="cx"> {
</span><span class="cx"> PluginDatabase::installedPlugins()->refresh();
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2011 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2011, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&);
</span><span class="cx"> virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
</span><span class="cx"> virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&);
</span><ins>+ virtual void addCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const WebCore::Cookie&);
</ins><span class="cx">
</span><span class="cx"> // WebCore::PluginStrategy
</span><span class="cx"> virtual void refreshPlugins();
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-04-07 Brian Burg <bburg@apple.com>
+
+ CookieJar should support adding synthetic cookies for developer tools
+ https://bugs.webkit.org/show_bug.cgi?id=156091
+ <rdar://problem/25581340>
+
+ Reviewed by Timothy Hatcher.
+
+ Plumb the new method through the strategy and out to the network process.
+
+ * NetworkProcess/NetworkConnectionToWebProcess.cpp:
+ (WebKit::NetworkConnectionToWebProcess::addCookie):
+ * NetworkProcess/NetworkConnectionToWebProcess.h:
+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in:
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+ (WebKit::WebPlatformStrategies::addCookie):
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+
</ins><span class="cx"> 2016-04-06 Alex Christensen <achristensen@webkit.org>
</span><span class="cx">
</span><span class="cx"> Compile WebKitTestRunner with CMake on Mac
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -249,6 +249,11 @@
</span><span class="cx"> WebCore::deleteCookie(storageSession(sessionID), url, cookieName);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void NetworkConnectionToWebProcess::addCookie(SessionID sessionID, const URL& url, const Cookie& cookie)
+{
+ WebCore::addCookie(storageSession(sessionID), url, cookie);
+}
+
</ins><span class="cx"> void NetworkConnectionToWebProcess::registerFileBlobURL(const URL& url, const String& path, const SandboxExtension::Handle& extensionHandle, const String& contentType)
</span><span class="cx"> {
</span><span class="cx"> RefPtr<SandboxExtension> extension = SandboxExtension::create(extensionHandle);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> void cookieRequestHeaderFieldValue(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, String& result);
</span><span class="cx"> void getRawCookies(WebCore::SessionID, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&);
</span><span class="cx"> void deleteCookie(WebCore::SessionID, const WebCore::URL&, const String& cookieName);
</span><ins>+ void addCookie(WebCore::SessionID, const WebCore::URL&, const WebCore::Cookie&);
</ins><span class="cx">
</span><span class="cx"> void registerFileBlobURL(const WebCore::URL&, const String& path, const SandboxExtension::Handle&, const String& contentType);
</span><span class="cx"> void registerBlobURL(const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType);
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkConnectionToWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkConnectionToWebProcess.messages.in        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> CookieRequestHeaderFieldValue(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (String result)
</span><span class="cx"> GetRawCookies(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -> (Vector<WebCore::Cookie> cookies)
</span><span class="cx"> DeleteCookie(WebCore::SessionID sessionID, WebCore::URL url, String cookieName)
</span><ins>+ AddCookie(WebCore::SessionID sessionID, WebCore::URL url, struct WebCore::Cookie cookie)
</ins><span class="cx">
</span><span class="cx"> RegisterFileBlobURL(WebCore::URL url, String path, WebKit::SandboxExtension::Handle extensionHandle, String contentType)
</span><span class="cx"> RegisterBlobURL(WebCore::URL url, Vector<WebCore::BlobPart> blobParts, String contentType)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2011, 2012, 2015 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2011, 2012, 2015, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -155,6 +155,11 @@
</span><span class="cx"> WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie(SessionTracker::sessionID(session), url, cookieName), 0);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void WebPlatformStrategies::addCookie(const NetworkStorageSession& session, const URL& url, const Cookie& cookie)
+{
+ WebProcess::singleton().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::AddCookie(SessionTracker::sessionID(session), url, cookie), 0);
+}
+
</ins><span class="cx"> // PluginStrategy
</span><span class="cx">
</span><span class="cx"> void WebPlatformStrategies::refreshPlugins()
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebPlatformStrategiesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h (199166 => 199167)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h        2016-04-07 18:38:15 UTC (rev 199166)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h        2016-04-07 19:00:53 UTC (rev 199167)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2010, 2012 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2010, 2012, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -58,6 +58,7 @@
</span><span class="cx"> String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&) override;
</span><span class="cx"> bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::URL& firstParty, const WebCore::URL&, Vector<WebCore::Cookie>&) override;
</span><span class="cx"> void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const String&) override;
</span><ins>+ void addCookie(const WebCore::NetworkStorageSession&, const WebCore::URL&, const WebCore::Cookie&) override;
</ins><span class="cx">
</span><span class="cx"> // WebCore::PluginStrategy
</span><span class="cx"> void refreshPlugins() override;
</span></span></pre>
</div>
</div>
</body>
</html>