<!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
&lt;rdar://problem/25581340&gt;

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  &lt;bburg@apple.com&gt;
+
+        CookieJar should support adding synthetic cookies for developer tools
+        https://bugs.webkit.org/show_bug.cgi?id=156091
+        &lt;rdar://problem/25581340&gt;
+
+        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  &lt;commit-queue@webkit.org&gt;
</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()-&gt;cookiesStrategy()-&gt;deleteCookie(storageSession(document), url, cookieName);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void addCookie(const Document* document, const URL&amp; url, const Cookie&amp; cookie)
+{
+    platformStrategies()-&gt;cookiesStrategy()-&gt;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&amp;);
</span><span class="cx"> WEBCORE_EXPORT bool getRawCookies(const Document*, const URL&amp;, Vector&lt;Cookie&gt;&amp;);
</span><span class="cx"> WEBCORE_EXPORT void deleteCookie(const Document*, const URL&amp;, const String&amp; cookieName);
</span><ins>+WEBCORE_EXPORT void addCookie(const Document*, const URL&amp;, const Cookie&amp;);
</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&amp;, const URL&amp; firstParty, const URL&amp;) = 0;
</span><span class="cx">     virtual bool getRawCookies(const NetworkStorageSession&amp;, const URL&amp; firstParty, const URL&amp;, Vector&lt;Cookie&gt;&amp;) = 0;
</span><span class="cx">     virtual void deleteCookie(const NetworkStorageSession&amp;, const URL&amp;, const String&amp; cookieName) = 0;
</span><ins>+    virtual void addCookie(const NetworkStorageSession&amp;, const URL&amp;, const Cookie&amp;) = 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&amp;, const URL&amp; firstParty, const URL&amp;);
</span><span class="cx"> WEBCORE_EXPORT bool getRawCookies(const NetworkStorageSession&amp;, const URL&amp; firstParty, const URL&amp;, Vector&lt;Cookie&gt;&amp;);
</span><span class="cx"> WEBCORE_EXPORT void deleteCookie(const NetworkStorageSession&amp;, const URL&amp;, const String&amp;);
</span><ins>+WEBCORE_EXPORT void addCookie(const NetworkStorageSession&amp;, const URL&amp;, const Cookie&amp;);
</ins><span class="cx"> WEBCORE_EXPORT void getHostnamesWithCookies(const NetworkStorageSession&amp;, HashSet&lt;String&gt;&amp; hostnames);
</span><span class="cx"> WEBCORE_EXPORT void deleteCookiesForHostnames(const NetworkStorageSession&amp;, const Vector&lt;String&gt;&amp; cookieHostNames);
</span><span class="cx"> WEBCORE_EXPORT void deleteAllCookies(const NetworkStorageSession&amp;);
</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 &quot;Cookie.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;NetworkStorageSession.h&quot;
</span><ins>+#include &quot;NotImplemented.h&quot;
</ins><span class="cx"> #include &quot;SoftLinking.h&quot;
</span><span class="cx"> #include &lt;CFNetwork/CFHTTPCookiesPriv.h&gt;
</span><span class="cx"> #include &lt;CoreFoundation/CoreFoundation.h&gt;
</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&amp;, const URL&amp;, const Cookie&amp;)
+{
+    // FIXME: implement this command. &lt;https://webkit.org/b/156298&gt;
+    notImplemented();
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession&amp; session, HashSet&lt;String&gt;&amp; hostnames)
</span><span class="cx"> {
</span><span class="cx">     RetainPtr&lt;CFArrayRef&gt; 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 &quot;Cookie.h&quot;
</span><ins>+#include &quot;NotImplemented.h&quot;
</ins><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;ResourceHandleManager.h&quot;
</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&amp;, const URL&amp;, const Cookie&amp;)
+{
+    // FIXME: implement this command. &lt;https://webkit.org/b/156296&gt;
+    notImplemented();
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession&amp;, HashSet&lt;String&gt;&amp; 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 &quot;NetworkStorageSession.h&quot;
</span><span class="cx"> #import &quot;WebCoreSystemInterface.h&quot;
</span><span class="cx"> 
</span><ins>+namespace WebCore {
+static NSHTTPCookieStorage *cookieStorage(const NetworkStorageSession&amp;);
+}
+
</ins><span class="cx"> #if !USE(CFNETWORK)
</span><span class="cx"> 
</span><span class="cx"> #import &quot;Cookie.h&quot;
</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&amp; session, const URL&amp; url, const Cookie&amp; cookie)
+{
+    BEGIN_BLOCK_OBJC_EXCEPTIONS;
+
+    RetainPtr&lt;CFHTTPCookieStorageRef&gt; 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&amp; session, HashSet&lt;String&gt;&amp; 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 &quot;GUniquePtrSoup.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;NetworkingContext.h&quot;
</span><ins>+#include &quot;NotImplemented.h&quot;
</ins><span class="cx"> #include &quot;PlatformCookieJar.h&quot;
</span><span class="cx"> #include &quot;SoupNetworkSession.h&quot;
</span><span class="cx"> #include &lt;wtf/glib/GRefPtr.h&gt;
</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&amp;, const URL&amp;, const Cookie&amp;)
+{
+    // FIXME: implement this command. &lt;https://webkit.org/b/156295&gt;
+    notImplemented();
+}
+
</ins><span class="cx"> void getHostnamesWithCookies(const NetworkStorageSession&amp; session, HashSet&lt;String&gt;&amp; 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__) &amp;&amp; PLATFORM(COCOA)
</span><span class="cx"> 
</span><del>-#else // PLATFORM(WIN) || USE(APPLE_INTERNAL_SDK)
</del><ins>+#else // !PLATFORM(WIN) &amp;&amp; !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) &amp;&amp; __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101100) || (PLATFORM(IOS) &amp;&amp; __IPHONE_OS_VERSION_MIN_REQUIRED &gt;= 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) &amp;&amp; !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  &lt;bburg@apple.com&gt;
+
+        CookieJar should support adding synthetic cookies for developer tools
+        https://bugs.webkit.org/show_bug.cgi?id=156091
+        &lt;rdar://problem/25581340&gt;
+
+        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  &lt;achristensen@webkit.org&gt;
</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&amp;, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;) override;
</span><span class="cx">     bool getRawCookies(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, Vector&lt;WebCore::Cookie&gt;&amp;) override;
</span><span class="cx">     void deleteCookie(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp;, const String&amp;) override;
</span><ins>+    void addCookie(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp;, const WebCore::Cookie&amp;) 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&lt;WebCore::PluginInfo&gt;&amp;) 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&amp; session, const URL&amp; url, const Cookie&amp; 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  &lt;bburg@apple.com&gt;
+
+        CookieJar should support adding synthetic cookies for developer tools
+        https://bugs.webkit.org/show_bug.cgi?id=156091
+        &lt;rdar://problem/25581340&gt;
+
+        Reviewed by Timothy Hatcher.
+
+        * WebCoreSupport/WebPlatformStrategies.h:
+        * WebCoreSupport/WebPlatformStrategies.cpp:
+        Add new method override.
+
</ins><span class="cx"> 2016-03-24  Said Abou-Hallawa  &lt;sabouhallawa@apple,com&gt;
</span><span class="cx"> 
</span><span class="cx">         Change NativeImagePtr for CG to be RetainPtr&lt;CGImageRef&gt;
</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&amp; session, const URL&amp; url, const Cookie&amp; cookie)
+{
+    WebCore::addCookie(session, url, cookie);
+}
+
</ins><span class="cx"> void WebPlatformStrategies::refreshPlugins()
</span><span class="cx"> {
</span><span class="cx">     PluginDatabase::installedPlugins()-&gt;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&amp;, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;);
</span><span class="cx">     virtual bool getRawCookies(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, Vector&lt;WebCore::Cookie&gt;&amp;);
</span><span class="cx">     virtual void deleteCookie(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp;, const String&amp;);
</span><ins>+    virtual void addCookie(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp;, const WebCore::Cookie&amp;);
</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  &lt;bburg@apple.com&gt;
+
+        CookieJar should support adding synthetic cookies for developer tools
+        https://bugs.webkit.org/show_bug.cgi?id=156091
+        &lt;rdar://problem/25581340&gt;
+
+        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  &lt;achristensen@webkit.org&gt;
</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&amp; url, const Cookie&amp; cookie)
+{
+    WebCore::addCookie(storageSession(sessionID), url, cookie);
+}
+
</ins><span class="cx"> void NetworkConnectionToWebProcess::registerFileBlobURL(const URL&amp; url, const String&amp; path, const SandboxExtension::Handle&amp; extensionHandle, const String&amp; contentType)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;SandboxExtension&gt; 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&amp; firstParty, const WebCore::URL&amp;, String&amp; result);
</span><span class="cx">     void getRawCookies(WebCore::SessionID, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, Vector&lt;WebCore::Cookie&gt;&amp;);
</span><span class="cx">     void deleteCookie(WebCore::SessionID, const WebCore::URL&amp;, const String&amp; cookieName);
</span><ins>+    void addCookie(WebCore::SessionID, const WebCore::URL&amp;, const WebCore::Cookie&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void registerFileBlobURL(const WebCore::URL&amp;, const String&amp; path, const SandboxExtension::Handle&amp;, const String&amp; contentType);
</span><span class="cx">     void registerBlobURL(const WebCore::URL&amp;, Vector&lt;WebCore::BlobPart&gt;, const String&amp; 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) -&gt; (String result)
</span><span class="cx">     GetRawCookies(WebCore::SessionID sessionID, WebCore::URL firstParty, WebCore::URL url) -&gt; (Vector&lt;WebCore::Cookie&gt; 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&lt;WebCore::BlobPart&gt; 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()-&gt;connection()-&gt;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&amp; session, const URL&amp; url, const Cookie&amp; cookie)
+{
+    WebProcess::singleton().networkConnection()-&gt;connection()-&gt;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&amp;, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;) override;
</span><span class="cx">     bool getRawCookies(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp; firstParty, const WebCore::URL&amp;, Vector&lt;WebCore::Cookie&gt;&amp;) override;
</span><span class="cx">     void deleteCookie(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp;, const String&amp;) override;
</span><ins>+    void addCookie(const WebCore::NetworkStorageSession&amp;, const WebCore::URL&amp;, const WebCore::Cookie&amp;) 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>