<!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>[180575] 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/180575">180575</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-02-24 10:55:10 -0800 (Tue, 24 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Implement more of the data fetching API
https://bugs.webkit.org/show_bug.cgi?id=141975

Reviewed by Andreas Kling.

Source/WebCore:

Add API for getting origins in a given session that has cached data.

* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::originsWithCache):

Source/WebKit2:

* Shared/WebsiteData/WebsiteData.cpp: Added.
(WebKit::WebsiteData::Entry::encode):
(WebKit::WebsiteData::Entry::decode):
(WebKit::WebsiteData::encode):
(WebKit::WebsiteData::decode):
* Shared/WebsiteData/WebsiteData.h: Added.
Add a new WebsiteData class that will store website data. Currently it only stores
origin + website data type, but in the future it is going to store more things, like
host names that have cookies associated.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::~WebProcessProxy):
Assert that we don't have any pending fetch data callbacks.

(WebKit::WebProcessProxy::connectionDidClose):
Invoke any pending fetch website data callbacks.

(WebKit::WebProcessProxy::didFetchWebsiteData):
Grab the callback and invoke it.

(WebKit::WebProcessProxy::fetchWebsiteData):
Set up a pending callback and send a FetchWebsiteData message to the web process.

* UIProcess/WebProcessProxy.h:
Add new member.

* UIProcess/WebProcessProxy.messages.in:
Add a DidFetchWebsiteData message.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::computeWebProcessAccessTypeForDataFetch):
Return the web process access type for the given set of data types.

(WebKit::WebsiteDataStore::fetchData):
Set up a callback aggregator that will assemble the needed website data into a vector of website data records.

(WebKit::computeNetworkProcessAccessTypeForDataRemoval):
(WebKit::computeWebProcessAccessTypeForDataRemoval):
Rename these functions to indicate that they are about data removal.

(WebKit::WebsiteDataStore::removeData):
Append &quot;ForDataRemoval&quot; to function calls.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
Tighten types.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::fetchWebsiteData):
For now, just fetch memory cache data.

* WebProcess/WebProcess.h:
Add new members.

* WebProcess/WebProcess.messages.in:
Add FetchWebsiteData message.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCachecpp">trunk/Source/WebCore/loader/cache/MemoryCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreloadercacheMemoryCacheh">trunk/Source/WebCore/loader/cache/MemoryCache.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxycpp">trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxyh">trunk/Source/WebKit2/UIProcess/WebProcessProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebProcessProxymessagesin">trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in</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="#trunkSourceWebKit2WebProcessStorageStorageAreaMapcpp">trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcesscpp">trunk/Source/WebKit2/WebProcess/WebProcess.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessh">trunk/Source/WebKit2/WebProcess/WebProcess.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebProcessmessagesin">trunk/Source/WebKit2/WebProcess/WebProcess.messages.in</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2SharedWebsiteDataWebsiteDatacpp">trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedWebsiteDataWebsiteDatah">trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebCore/ChangeLog        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-02-24  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Implement more of the data fetching API
+        https://bugs.webkit.org/show_bug.cgi?id=141975
+
+        Reviewed by Andreas Kling.
+
+        Add API for getting origins in a given session that has cached data.
+
+        * loader/cache/MemoryCache.cpp:
+        (WebCore::MemoryCache::originsWithCache):
+
</ins><span class="cx"> 2015-02-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Use nullptr in more places in FrameView, RenderView, RenderObject
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.cpp (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.cpp        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -562,6 +562,28 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+HashSet&lt;RefPtr&lt;SecurityOrigin&gt;&gt; MemoryCache::originsWithCache(SessionID sessionID) const
+{
+    HashSet&lt;RefPtr&lt;SecurityOrigin&gt;&gt; origins;
+
+    auto it = m_sessionResources.find(sessionID);
+    if (it != m_sessionResources.end()) {
+
+        for (auto&amp; keyValue : *it-&gt;value) {
+            auto&amp; resource = *keyValue.value;
+#if ENABLE(CACHE_PARTITIONING)
+            auto&amp; partitionName = keyValue.key.second;
+            if (!partitionName.isEmpty())
+                origins.add(SecurityOrigin::create(&quot;http&quot;, partitionName, 0));
+            else
+#endif
+            origins.add(SecurityOrigin::create(resource.url()));
+        }
+    }
+
+    return origins;
+}
+
</ins><span class="cx"> void MemoryCache::removeFromLiveDecodedResourcesList(CachedResource&amp; resource)
</span><span class="cx"> {
</span><span class="cx">     m_liveDecodedResources.remove(&amp;resource);
</span></span></pre></div>
<a id="trunkSourceWebCoreloadercacheMemoryCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/cache/MemoryCache.h (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/cache/MemoryCache.h        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebCore/loader/cache/MemoryCache.h        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -148,6 +148,7 @@
</span><span class="cx">     typedef HashSet&lt;RefPtr&lt;SecurityOrigin&gt;&gt; SecurityOriginSet;
</span><span class="cx">     WEBCORE_EXPORT void removeResourcesWithOrigin(SecurityOrigin&amp;);
</span><span class="cx">     WEBCORE_EXPORT void getOriginsWithCache(SecurityOriginSet&amp; origins);
</span><ins>+    WEBCORE_EXPORT HashSet&lt;RefPtr&lt;SecurityOrigin&gt;&gt; originsWithCache(SessionID) const;
</ins><span class="cx"> 
</span><span class="cx"> #if USE(CG)
</span><span class="cx">     // FIXME: Remove the USE(CG) once we either make NativeImagePtr a smart pointer on all platforms or
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -1,3 +1,70 @@
</span><ins>+2015-02-24  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Implement more of the data fetching API
+        https://bugs.webkit.org/show_bug.cgi?id=141975
+
+        Reviewed by Andreas Kling.
+
+        * Shared/WebsiteData/WebsiteData.cpp: Added.
+        (WebKit::WebsiteData::Entry::encode):
+        (WebKit::WebsiteData::Entry::decode):
+        (WebKit::WebsiteData::encode):
+        (WebKit::WebsiteData::decode):
+        * Shared/WebsiteData/WebsiteData.h: Added.
+        Add a new WebsiteData class that will store website data. Currently it only stores
+        origin + website data type, but in the future it is going to store more things, like 
+        host names that have cookies associated.
+
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::~WebProcessProxy):
+        Assert that we don't have any pending fetch data callbacks.
+
+        (WebKit::WebProcessProxy::connectionDidClose):
+        Invoke any pending fetch website data callbacks.
+
+        (WebKit::WebProcessProxy::didFetchWebsiteData):
+        Grab the callback and invoke it.
+
+        (WebKit::WebProcessProxy::fetchWebsiteData):
+        Set up a pending callback and send a FetchWebsiteData message to the web process.
+
+        * UIProcess/WebProcessProxy.h:
+        Add new member.
+
+        * UIProcess/WebProcessProxy.messages.in:
+        Add a DidFetchWebsiteData message.
+
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::computeWebProcessAccessTypeForDataFetch):
+        Return the web process access type for the given set of data types.
+
+        (WebKit::WebsiteDataStore::fetchData):
+        Set up a callback aggregator that will assemble the needed website data into a vector of website data records.
+
+        (WebKit::computeNetworkProcessAccessTypeForDataRemoval):
+        (WebKit::computeWebProcessAccessTypeForDataRemoval):
+        Rename these functions to indicate that they are about data removal.
+
+        (WebKit::WebsiteDataStore::removeData):
+        Append &quot;ForDataRemoval&quot; to function calls.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new files.
+
+        * WebProcess/Storage/StorageAreaMap.cpp:
+        (WebKit::StorageAreaMap::StorageAreaMap):
+        Tighten types.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::fetchWebsiteData):
+        For now, just fetch memory cache data.
+
+        * WebProcess/WebProcess.h:
+        Add new members.
+
+        * WebProcess/WebProcess.messages.in:
+        Add FetchWebsiteData message.
+
</ins><span class="cx"> 2015-02-24  Yusuke Suzuki  &lt;utatane.tea@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r179429): Can't type comments in Facebook
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebsiteDataWebsiteDatacpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.cpp (0 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.cpp                                (rev 0)
+++ trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.cpp        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -0,0 +1,66 @@
</span><ins>+/*
+ * Copyright (C) 2015 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 &quot;config.h&quot;
+#include &quot;WebsiteData.h&quot;
+
+#include &quot;ArgumentCoders.h&quot;
+#include &quot;SecurityOriginData.h&quot;
+
+namespace WebKit {
+
+void WebsiteData::Entry::encode(IPC::ArgumentEncoder&amp; encoder) const
+{
+    encoder &lt;&lt; SecurityOriginData::fromSecurityOrigin(*origin);
+    encoder.encodeEnum(type);
+}
+
+bool WebsiteData::Entry::decode(IPC::ArgumentDecoder&amp; decoder, WebsiteData::Entry&amp; result)
+{
+    SecurityOriginData securityOriginData;
+    if (!decoder.decode(securityOriginData))
+        return false;
+
+    if (!decoder.decodeEnum(result.type))
+        return false;
+
+    result.origin = securityOriginData.securityOrigin();
+    return true;
+}
+
+void WebsiteData::encode(IPC::ArgumentEncoder&amp; encoder) const
+{
+    encoder &lt;&lt; entries;
+}
+
+bool WebsiteData::decode(IPC::ArgumentDecoder&amp; decoder, WebsiteData&amp; result)
+{
+    if (!decoder.decode(result.entries))
+        return false;
+
+    return true;
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedWebsiteDataWebsiteDatah"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.h (0 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/WebsiteData/WebsiteData.h        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+/*
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef WebsiteData_h
+#define WebsiteData_h
+
+#include &quot;WebsiteDataTypes.h&quot;
+#include &lt;WebCore/SecurityOrigin.h&gt;
+#include &lt;wtf/Vector.h&gt;
+
+namespace IPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
+
+namespace WebKit {
+
+struct WebsiteData {
+    struct Entry {
+        RefPtr&lt;WebCore::SecurityOrigin&gt; origin;
+        WebsiteDataTypes type;
+
+        void encode(IPC::ArgumentEncoder&amp;) const;
+        static bool decode(IPC::ArgumentDecoder&amp;, WebsiteData::Entry&amp;);
+    };
+
+    Vector&lt;Entry&gt; entries;
+
+    void encode(IPC::ArgumentEncoder&amp;) const;
+    static bool decode(IPC::ArgumentDecoder&amp;, WebsiteData&amp;);
+};
+
+}
+
+#endif // WebsiteData_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.cpp        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><span class="cx"> #include &quot;WebProcessProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebUserContentControllerProxy.h&quot;
</span><ins>+#include &quot;WebsiteData.h&quot;
</ins><span class="cx"> #include &lt;WebCore/SuddenTermination.h&gt;
</span><span class="cx"> #include &lt;WebCore/URL.h&gt;
</span><span class="cx"> #include &lt;stdio.h&gt;
</span><span class="lines">@@ -113,6 +114,7 @@
</span><span class="cx"> 
</span><span class="cx"> WebProcessProxy::~WebProcessProxy()
</span><span class="cx"> {
</span><ins>+    ASSERT(m_pendingFetchWebsiteDataCallbacks.isEmpty());
</ins><span class="cx">     ASSERT(m_pendingDeleteWebsiteDataCallbacks.isEmpty());
</span><span class="cx"> 
</span><span class="cx">     if (m_webConnection)
</span><span class="lines">@@ -146,6 +148,10 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(this-&gt;connection() == &amp;connection);
</span><span class="cx"> 
</span><ins>+    for (const auto&amp; callback : m_pendingFetchWebsiteDataCallbacks.values())
+        callback({ });
+    m_pendingFetchWebsiteDataCallbacks.clear();
+
</ins><span class="cx">     for (const auto&amp; callback : m_pendingDeleteWebsiteDataCallbacks.values())
</span><span class="cx">         callback();
</span><span class="cx">     m_pendingDeleteWebsiteDataCallbacks.clear();
</span><span class="lines">@@ -597,6 +603,12 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessProxy::didFetchWebsiteData(uint64_t callbackID, const WebsiteData&amp; websiteData)
+{
+    auto callback = m_pendingFetchWebsiteDataCallbacks.take(callbackID);
+    callback(websiteData);
+}
+
</ins><span class="cx"> void WebProcessProxy::didDeleteWebsiteData(uint64_t callbackID)
</span><span class="cx"> {
</span><span class="cx">     auto callback = m_pendingDeleteWebsiteDataCallbacks.take(callbackID);
</span><span class="lines">@@ -638,6 +650,16 @@
</span><span class="cx">         page-&gt;viewStateDidChange(ViewState::IsVisuallyIdle);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcessProxy::fetchWebsiteData(SessionID sessionID, WebsiteDataTypes dataTypes, std::function&lt;void (WebsiteData)&gt; completionHandler)
+{
+    ASSERT(canSendMessage());
+
+    uint64_t callbackID = generateCallbackID();
+    m_pendingFetchWebsiteDataCallbacks.add(callbackID, WTF::move(completionHandler));
+
+    send(Messages::WebProcess::FetchWebsiteData(sessionID, dataTypes, callbackID), 0);
+}
+
</ins><span class="cx"> void WebProcessProxy::deleteWebsiteData(SessionID sessionID, WebsiteDataTypes dataTypes, std::chrono::system_clock::time_point modifiedSince, std::function&lt;void ()&gt; completionHandler)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(canSendMessage());
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.h (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.h        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -122,6 +122,7 @@
</span><span class="cx">     void didSaveToPageCache();
</span><span class="cx">     void releasePageCache();
</span><span class="cx"> 
</span><ins>+    void fetchWebsiteData(WebCore::SessionID, WebsiteDataTypes, std::function&lt;void (WebsiteData)&gt; completionHandler);
</ins><span class="cx">     void deleteWebsiteData(WebCore::SessionID, WebsiteDataTypes, std::chrono::system_clock::time_point modifiedSince, std::function&lt;void ()&gt; completionHandler);
</span><span class="cx"> 
</span><span class="cx">     void enableSuddenTermination();
</span><span class="lines">@@ -168,6 +169,7 @@
</span><span class="cx">     
</span><span class="cx">     void shouldTerminate(bool&amp; shouldTerminate);
</span><span class="cx"> 
</span><ins>+    void didFetchWebsiteData(uint64_t callbackID, const WebsiteData&amp;);
</ins><span class="cx">     void didDeleteWebsiteData(uint64_t callbackID);
</span><span class="cx"> 
</span><span class="cx">     // Plugins
</span><span class="lines">@@ -225,6 +227,7 @@
</span><span class="cx">     std::unique_ptr&lt;DownloadProxyMap&gt; m_downloadProxyMap;
</span><span class="cx">     CustomProtocolManagerProxy m_customProtocolManagerProxy;
</span><span class="cx"> 
</span><ins>+    HashMap&lt;uint64_t, std::function&lt;void (WebsiteData)&gt;&gt; m_pendingFetchWebsiteDataCallbacks;
</ins><span class="cx">     HashMap&lt;uint64_t, std::function&lt;void ()&gt;&gt; m_pendingDeleteWebsiteDataCallbacks;
</span><span class="cx"> 
</span><span class="cx">     int m_numberOfTimesSuddenTerminationWasDisabled;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebProcessProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/UIProcess/WebProcessProxy.messages.in        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx">     EnableSuddenTermination()
</span><span class="cx">     DisableSuddenTermination()
</span><span class="cx"> 
</span><ins>+    DidFetchWebsiteData(uint64_t callbackID, struct WebKit::WebsiteData websiteData)
</ins><span class="cx">     DidDeleteWebsiteData(uint64_t callbackID)
</span><span class="cx"> 
</span><span class="cx">     # Plugin messages.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;APIWebsiteDataRecord.h&quot;
</span><span class="cx"> #include &quot;StorageManager.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><ins>+#include &quot;WebsiteData.h&quot;
</ins><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span><span class="lines">@@ -99,10 +100,93 @@
</span><span class="cx">     Launch,
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-static ProcessAccessType computeNetworkProcessAccessType(WebsiteDataTypes dataTypes, bool isNonPersistentStore)
</del><ins>+static ProcessAccessType computeWebProcessAccessTypeForDataFetch(WebsiteDataTypes dataTypes, bool isNonPersistentStore)
</ins><span class="cx"> {
</span><span class="cx">     ProcessAccessType processAccessType = ProcessAccessType::None;
</span><span class="cx"> 
</span><ins>+    if (dataTypes &amp; WebsiteDataTypeMemoryCache)
+        return ProcessAccessType::OnlyIfLaunched;
+
+    return processAccessType;
+}
+
+void WebsiteDataStore::fetchData(WebsiteDataTypes dataTypes, std::function&lt;void (Vector&lt;WebsiteDataRecord&gt;)&gt; completionHandler)
+{
+    struct CallbackAggregator final : public RefCounted&lt;CallbackAggregator&gt; {
+        explicit CallbackAggregator(std::function&lt;void (Vector&lt;WebsiteDataRecord&gt;)&gt; completionHandler)
+            : completionHandler(WTF::move(completionHandler))
+        {
+        }
+
+        ~CallbackAggregator()
+        {
+            ASSERT(!pendingCallbacks);
+        }
+
+        void addPendingCallback()
+        {
+            pendingCallbacks++;
+        }
+
+        void removePendingCallback(WebsiteData websiteData)
+        {
+            ASSERT(pendingCallbacks);
+            --pendingCallbacks;
+
+            // FIXME: Do something with the website data.
+            callIfNeeded();
+        }
+
+        void callIfNeeded()
+        {
+            if (pendingCallbacks)
+                return;
+
+            RefPtr&lt;CallbackAggregator&gt; callbackAggregator(this);
+            RunLoop::main().dispatch([callbackAggregator] {
+                // FIXME: Pass data records to the completion handler.
+                callbackAggregator-&gt;completionHandler({ });
+            });
+        }
+
+        unsigned pendingCallbacks = 0;
+        std::function&lt;void (Vector&lt;WebsiteDataRecord&gt;)&gt; completionHandler;
+    };
+
+    RefPtr&lt;CallbackAggregator&gt; callbackAggregator = adoptRef(new CallbackAggregator(WTF::move(completionHandler)));
+
+    auto webProcessAccessType = computeWebProcessAccessTypeForDataFetch(dataTypes, isNonPersistent());
+    if (webProcessAccessType != ProcessAccessType::None) {
+        for (auto&amp; process : processes()) {
+            switch (webProcessAccessType) {
+            case ProcessAccessType::OnlyIfLaunched:
+                if (!process-&gt;canSendMessage())
+                    continue;
+                break;
+
+            case ProcessAccessType::Launch:
+                // FIXME: Handle this.
+                ASSERT_NOT_REACHED();
+                break;
+
+            case ProcessAccessType::None:
+                ASSERT_NOT_REACHED();
+            }
+
+            callbackAggregator-&gt;addPendingCallback();
+            process-&gt;fetchWebsiteData(m_sessionID, dataTypes, [callbackAggregator](WebsiteData websiteData) {
+                callbackAggregator-&gt;removePendingCallback(WTF::move(websiteData));
+            });
+        }
+    }
+
+    callbackAggregator-&gt;callIfNeeded();
+}
+
+static ProcessAccessType computeNetworkProcessAccessTypeForDataRemoval(WebsiteDataTypes dataTypes, bool isNonPersistentStore)
+{
+    ProcessAccessType processAccessType = ProcessAccessType::None;
+
</ins><span class="cx">     if (dataTypes &amp; WebsiteDataTypeCookies) {
</span><span class="cx">         if (isNonPersistentStore)
</span><span class="cx">             processAccessType = std::max(processAccessType, ProcessAccessType::OnlyIfLaunched);
</span><span class="lines">@@ -116,7 +200,7 @@
</span><span class="cx">     return processAccessType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static ProcessAccessType computeWebProcessAccessType(WebsiteDataTypes dataTypes, bool isNonPersistentStore)
</del><ins>+static ProcessAccessType computeWebProcessAccessTypeForDataRemoval(WebsiteDataTypes dataTypes, bool isNonPersistentStore)
</ins><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(isNonPersistentStore);
</span><span class="cx"> 
</span><span class="lines">@@ -128,13 +212,6 @@
</span><span class="cx">     return processAccessType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebsiteDataStore::fetchData(WebsiteDataTypes, std::function&lt;void (Vector&lt;WebsiteDataRecord&gt;)&gt; completionHandler)
-{
-    // FIXME: Actually fetch data.
-    RunLoop::main().dispatch([completionHandler] {
-        completionHandler({ });
-    });
-}
</del><span class="cx"> 
</span><span class="cx"> void WebsiteDataStore::removeData(WebsiteDataTypes dataTypes, std::chrono::system_clock::time_point modifiedSince, std::function&lt;void ()&gt; completionHandler)
</span><span class="cx"> {
</span><span class="lines">@@ -169,7 +246,7 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;CallbackAggregator&gt; callbackAggregator = adoptRef(new CallbackAggregator(WTF::move(completionHandler)));
</span><span class="cx"> 
</span><del>-    auto networkProcessAccessType = computeNetworkProcessAccessType(dataTypes, isNonPersistent());
</del><ins>+    auto networkProcessAccessType = computeNetworkProcessAccessTypeForDataRemoval(dataTypes, isNonPersistent());
</ins><span class="cx">     if (networkProcessAccessType != ProcessAccessType::None) {
</span><span class="cx">         HashSet&lt;WebProcessPool*&gt; processPools;
</span><span class="cx">         for (auto&amp; process : processes())
</span><span class="lines">@@ -197,7 +274,7 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto webProcessAccessType = computeWebProcessAccessType(dataTypes, isNonPersistent());
</del><ins>+    auto webProcessAccessType = computeWebProcessAccessTypeForDataRemoval(dataTypes, isNonPersistent());
</ins><span class="cx">     if (webProcessAccessType != ProcessAccessType::None) {
</span><span class="cx">         for (auto&amp; process : processes()) {
</span><span class="cx">             switch (webProcessAccessType) {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -254,6 +254,8 @@
</span><span class="cx">                 1A4832CC1A9BC465008B4DFE /* _WKWebsiteDataRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4832CA1A9BC465008B4DFE /* _WKWebsiteDataRecord.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1A4832CE1A9BC484008B4DFE /* _WKWebsiteDataRecordInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4832CD1A9BC484008B4DFE /* _WKWebsiteDataRecordInternal.h */; };
</span><span class="cx">                 1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4832CF1A9BD821008B4DFE /* WebsiteDataRecord.h */; };
</span><ins>+                1A4832D61A9CDF96008B4DFE /* WebsiteData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4832D41A9CDF96008B4DFE /* WebsiteData.cpp */; };
+                1A4832D71A9CDF96008B4DFE /* WebsiteData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4832D51A9CDF96008B4DFE /* WebsiteData.h */; };
</ins><span class="cx">                 1A4A9C5512B816CF008FE984 /* NetscapePluginModule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A9C5312B816CF008FE984 /* NetscapePluginModule.cpp */; };
</span><span class="cx">                 1A4A9C5612B816CF008FE984 /* NetscapePluginModule.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4A9C5412B816CF008FE984 /* NetscapePluginModule.h */; };
</span><span class="cx">                 1A4A9C9A12B821CD008FE984 /* NetscapePluginModuleMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4A9C9912B821CD008FE984 /* NetscapePluginModuleMac.mm */; };
</span><span class="lines">@@ -2332,6 +2334,8 @@
</span><span class="cx">                 1A4832CA1A9BC465008B4DFE /* _WKWebsiteDataRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKWebsiteDataRecord.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A4832CD1A9BC484008B4DFE /* _WKWebsiteDataRecordInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKWebsiteDataRecordInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A4832CF1A9BD821008B4DFE /* WebsiteDataRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteDataRecord.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1A4832D41A9CDF96008B4DFE /* WebsiteData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebsiteData.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1A4832D51A9CDF96008B4DFE /* WebsiteData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1A4A9C5312B816CF008FE984 /* NetscapePluginModule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetscapePluginModule.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A4A9C5412B816CF008FE984 /* NetscapePluginModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetscapePluginModule.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1A4A9C9912B821CD008FE984 /* NetscapePluginModuleMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = NetscapePluginModuleMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -4877,6 +4881,8 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1ABF43791A368050003FB0E6 /* WebsiteDataTypes.h */,
</span><ins>+                                1A4832D41A9CDF96008B4DFE /* WebsiteData.cpp */,
+                                1A4832D51A9CDF96008B4DFE /* WebsiteData.h */,
</ins><span class="cx">                         );
</span><span class="cx">                         path = WebsiteData;
</span><span class="cx">                         sourceTree = &quot;&lt;group&gt;&quot;;
</span><span class="lines">@@ -7458,6 +7464,7 @@
</span><span class="cx">                         files = (
</span><span class="cx">                                 2D7F13101A702FBA009A6FBD /* ProcessType.h in Headers */,
</span><span class="cx">                                 37A5E01418BBF93F000A081E /* _WKActivatedElementInfo.h in Headers */,
</span><ins>+                                1A4832D71A9CDF96008B4DFE /* WebsiteData.h in Headers */,
</ins><span class="cx">                                 379A873618BBFA4300588AF2 /* _WKActivatedElementInfoInternal.h in Headers */,
</span><span class="cx">                                 A1A4FE5A18DCE9FA00B5EA8A /* _WKDownload.h in Headers */,
</span><span class="cx">                                 A1A4FE6118DD54A400B5EA8A /* _WKDownloadDelegate.h in Headers */,
</span><span class="lines">@@ -9486,6 +9493,7 @@
</span><span class="cx">                                 31A67E0C165B2A99006CBA66 /* PlugInAutoStartProvider.cpp in Sources */,
</span><span class="cx">                                 1A8EF4CC1252403700F7067F /* PluginControllerProxy.cpp in Sources */,
</span><span class="cx">                                 1A2D91A61281D739001EB962 /* PluginControllerProxyMac.mm in Sources */,
</span><ins>+                                1A4832D61A9CDF96008B4DFE /* WebsiteData.cpp in Sources */,
</ins><span class="cx">                                 1A8EF96E1252AF6B00F7067F /* PluginControllerProxyMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 1A17977F137EE82C00F97D45 /* PluginCreationParameters.cpp in Sources */,
</span><span class="cx">                                 7C3F8C90173AF52D007B7F39 /* PluginInformation.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessStorageStorageAreaMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/WebProcess/Storage/StorageAreaMap.cpp        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -71,14 +71,14 @@
</span><span class="cx">     switch (m_storageType) {
</span><span class="cx">     case WebCore::LocalStorage:
</span><span class="cx">         if (SecurityOrigin* topLevelOrigin = storageNamespace-&gt;topLevelOrigin())
</span><del>-            WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::StorageManager::CreateTransientLocalStorageMap(m_storageMapID, storageNamespace-&gt;storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(*topLevelOrigin), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
</del><ins>+            WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::StorageManager::CreateTransientLocalStorageMap(m_storageMapID, storageNamespace-&gt;storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(*topLevelOrigin), SecurityOriginData::fromSecurityOrigin(m_securityOrigin)), 0);
</ins><span class="cx">         else
</span><del>-            WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::StorageManager::CreateLocalStorageMap(m_storageMapID, storageNamespace-&gt;storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
</del><ins>+            WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::StorageManager::CreateLocalStorageMap(m_storageMapID, storageNamespace-&gt;storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin)), 0);
</ins><span class="cx"> 
</span><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case WebCore::SessionStorage:
</span><del>-        WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::StorageManager::CreateSessionStorageMap(m_storageMapID, storageNamespace-&gt;storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin.get())), 0);
</del><ins>+        WebProcess::singleton().parentProcessConnection()-&gt;send(Messages::StorageManager::CreateSessionStorageMap(m_storageMapID, storageNamespace-&gt;storageNamespaceID(), SecurityOriginData::fromSecurityOrigin(m_securityOrigin)), 0);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcesscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx"> #include &quot;WebProcessPoolMessages.h&quot;
</span><span class="cx"> #include &quot;WebProcessProxyMessages.h&quot;
</span><span class="cx"> #include &quot;WebResourceCacheManager.h&quot;
</span><ins>+#include &quot;WebsiteData.h&quot;
</ins><span class="cx"> #include &quot;WebsiteDataTypes.h&quot;
</span><span class="cx"> #include &lt;JavaScriptCore/JSLock.h&gt;
</span><span class="cx"> #include &lt;JavaScriptCore/MemoryStatistics.h&gt;
</span><span class="lines">@@ -1133,6 +1134,18 @@
</span><span class="cx">     PageCache::singleton().pruneToSizeNow(0, PruningReason::MemoryPressure);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebProcess::fetchWebsiteData(WebCore::SessionID sessionID, uint64_t websiteDataTypes, uint64_t callbackID)
+{
+    WebsiteData websiteData;
+
+    if (websiteDataTypes &amp; WebsiteDataTypeMemoryCache) {
+        for (auto&amp; origin : MemoryCache::singleton().originsWithCache(sessionID))
+            websiteData.entries.append(WebsiteData::Entry { origin, WebsiteDataTypeMemoryCache });
+    }
+
+    parentProcessConnection()-&gt;send(Messages::WebProcessProxy::DidFetchWebsiteData(callbackID, websiteData), 0);
+}
+
</ins><span class="cx"> void WebProcess::deleteWebsiteData(SessionID sessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(modifiedSince);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.h (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.h        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.h        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -259,6 +259,7 @@
</span><span class="cx"> 
</span><span class="cx">     void releasePageCache();
</span><span class="cx"> 
</span><ins>+    void fetchWebsiteData(WebCore::SessionID, uint64_t websiteDataTypes, uint64_t callbackID);
</ins><span class="cx">     void deleteWebsiteData(WebCore::SessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID);
</span><span class="cx"> 
</span><span class="cx"> #if USE(SOUP)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebProcessmessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebProcess.messages.in (180574 => 180575)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebProcess.messages.in        2015-02-24 18:47:54 UTC (rev 180574)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.messages.in        2015-02-24 18:55:10 UTC (rev 180575)
</span><span class="lines">@@ -79,6 +79,7 @@
</span><span class="cx"> 
</span><span class="cx">     ReleasePageCache()
</span><span class="cx"> 
</span><ins>+    FetchWebsiteData(WebCore::SessionID sessionID, uint64_t websiteDataTypes, uint64_t callbackID)
</ins><span class="cx">     DeleteWebsiteData(WebCore::SessionID sessionID, uint64_t websiteDataTypes, std::chrono::system_clock::time_point modifiedSince, uint64_t callbackID)
</span><span class="cx"> 
</span><span class="cx">     SetProcessSuppressionEnabled(bool flag)
</span></span></pre>
</div>
</div>

</body>
</html>