<!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>[180519] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/180519">180519</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-02-23 14:29:37 -0800 (Mon, 23 Feb 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add API for fetching website data records to _WKWebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=141926

Reviewed by Beth Dakin.

Source/WebKit2:

* UIProcess/API/APIWebsiteDataRecord.cpp:
(API::WebsiteDataRecord::create):
(API::WebsiteDataRecord::WebsiteDataRecord):
* UIProcess/API/APIWebsiteDataRecord.h:
Update to take a WebsiteDataRecord parameter.

* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
(-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
Call down to the WebsiteDataStore.

* UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
This will be the data-container part of WebsiteDataRecord, but it's currently empty.

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::fetchData):
Just dispatch the completion handler for now.

* UIProcess/WebsiteData/WebsiteDataStore.h:
Add new member.

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

Tools:

* MiniBrowser/mac/MainMenu.xib:
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController fetchWebsiteData:]):
Add menu item to fetch and dump website data.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIWebsiteDataRecordcpp">trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPIWebsiteDataRecordh">trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKWebsiteDataStoreh">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoa_WKWebsiteDataStoremm">trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp">trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStoreh">trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsMiniBrowsermacMainMenuxib">trunk/Tools/MiniBrowser/mac/MainMenu.xib</a></li>
<li><a href="#trunkToolsMiniBrowsermacWK2BrowserWindowControllerm">trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataRecordh">trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/ChangeLog        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -1,3 +1,34 @@
</span><ins>+2015-02-23  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Add API for fetching website data records to _WKWebsiteDataStore
+        https://bugs.webkit.org/show_bug.cgi?id=141926
+
+        Reviewed by Beth Dakin.
+
+        * UIProcess/API/APIWebsiteDataRecord.cpp:
+        (API::WebsiteDataRecord::create):
+        (API::WebsiteDataRecord::WebsiteDataRecord):
+        * UIProcess/API/APIWebsiteDataRecord.h:
+        Update to take a WebsiteDataRecord parameter.
+
+        * UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
+        * UIProcess/API/Cocoa/_WKWebsiteDataStore.mm:
+        (-[_WKWebsiteDataStore fetchDataRecordsOfTypes:completionHandler:]):
+        Call down to the WebsiteDataStore.
+
+        * UIProcess/WebsiteData/WebsiteDataRecord.h: Added.
+        This will be the data-container part of WebsiteDataRecord, but it's currently empty.
+
+        * UIProcess/WebsiteData/WebsiteDataStore.cpp:
+        (WebKit::WebsiteDataStore::fetchData):
+        Just dispatch the completion handler for now.
+
+        * UIProcess/WebsiteData/WebsiteDataStore.h:
+        Add new member.
+
+        * WebKit2.xcodeproj/project.pbxproj:
+        Add new files.
+
</ins><span class="cx"> 2015-02-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for diagnostic logging messages sampling
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIWebsiteDataRecordcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.cpp (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.cpp        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.cpp        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -28,12 +28,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace API {
</span><span class="cx"> 
</span><del>-Ref&lt;WebsiteDataRecord&gt; WebsiteDataRecord::create()
</del><ins>+Ref&lt;WebsiteDataRecord&gt; WebsiteDataRecord::create(WebKit::WebsiteDataRecord&amp;&amp; websiteDataRecord)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new WebsiteDataRecord);
</del><ins>+    return adoptRef(*new WebsiteDataRecord(WTF::move(websiteDataRecord)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebsiteDataRecord::WebsiteDataRecord()
</del><ins>+WebsiteDataRecord::WebsiteDataRecord(WebKit::WebsiteDataRecord&amp;&amp; websiteDataRecord)
+    : m_websiteDataRecord(WTF::move(websiteDataRecord))
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPIWebsiteDataRecordh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.h (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.h        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.h        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -27,17 +27,19 @@
</span><span class="cx"> #define APIWebsiteDataRecord_h
</span><span class="cx"> 
</span><span class="cx"> #include &quot;APIObject.h&quot;
</span><ins>+#include &quot;WebsiteDataRecord.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace API {
</span><span class="cx"> 
</span><span class="cx"> class WebsiteDataRecord final : public ObjectImpl&lt;Object::Type::WebsiteDataRecord&gt; {
</span><span class="cx"> public:
</span><del>-    static Ref&lt;WebsiteDataRecord&gt; create();
</del><ins>+    static Ref&lt;WebsiteDataRecord&gt; create(WebKit::WebsiteDataRecord&amp;&amp;);
</ins><span class="cx">     virtual ~WebsiteDataRecord();
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    WebsiteDataRecord();
</del><ins>+    explicit WebsiteDataRecord(WebKit::WebsiteDataRecord&amp;&amp;);
</ins><span class="cx"> 
</span><ins>+    const WebKit::WebsiteDataRecord m_websiteDataRecord;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKWebsiteDataStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.h        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> @property (readonly, getter=isNonPersistent) BOOL nonPersistent;
</span><span class="cx"> 
</span><ins>+- (void)fetchDataRecordsOfTypes:(WKWebsiteDataTypes)websiteDataTypes completionHandler:(void (^)(NSArray *))completionHandler;
</ins><span class="cx"> - (void)removeDataOfTypes:(WKWebsiteDataTypes)websiteDataTypes modifiedSince:(NSDate *)date completionHandler:(void (^)())completionHandler WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
</span><span class="cx"> 
</span><span class="cx"> @end
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoa_WKWebsiteDataStoremm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/_WKWebsiteDataStore.mm        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -28,6 +28,10 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &quot;APIArray.h&quot;
+#import &quot;APIWebsiteDataRecord.h&quot;
+#import &quot;WKNSArray.h&quot;
+
</ins><span class="cx"> @implementation _WKWebsiteDataStore
</span><span class="cx"> 
</span><span class="cx"> + (instancetype)defaultDataStore
</span><span class="lines">@@ -78,6 +82,23 @@
</span><span class="cx">     return system_clock::time_point(duration_cast&lt;system_clock::duration&gt;(duration&lt;double&gt;(date.timeIntervalSince1970)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)fetchDataRecordsOfTypes:(WKWebsiteDataTypes)websiteDataTypes completionHandler:(void (^)(NSArray *))completionHandler
+{
+    auto completionHandlerCopy = Block_copy(completionHandler);
+
+    _websiteDataStore-&gt;websiteDataStore().fetchData(toWebsiteDataTypes(websiteDataTypes), [completionHandlerCopy](Vector&lt;WebKit::WebsiteDataRecord&gt; websiteDataRecords) {
+        Vector&lt;RefPtr&lt;API::Object&gt;&gt; elements;
+        elements.reserveInitialCapacity(websiteDataRecords.size());
+
+        for (auto&amp; websiteDataRecord : websiteDataRecords)
+            elements.uncheckedAppend(API::WebsiteDataRecord::create(WTF::move(websiteDataRecord)));
+
+        completionHandlerCopy(wrapper(*API::Array::create(WTF::move(elements))));
+
+        Block_release(completionHandlerCopy);
+    });
+}
+
</ins><span class="cx"> - (void)removeDataOfTypes:(WKWebsiteDataTypes)websiteDataTypes modifiedSince:(NSDate *)date completionHandler:(void (^)())completionHandler
</span><span class="cx"> {
</span><span class="cx">     auto completionHandlerCopy = Block_copy(completionHandler);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataRecordhfromrev180518trunkSourceWebKit2UIProcessAPIAPIWebsiteDataRecordcpp"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.h (from rev 180518, trunk/Source/WebKit2/UIProcess/API/APIWebsiteDataRecord.cpp) (0 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.h                                (rev 0)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataRecord.h        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -0,0 +1,37 @@
</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 WebsiteDataRecord_h
+#define WebsiteDataRecord_h
+
+namespace WebKit {
+
+struct WebsiteDataRecord {
+    // FIXME: Fill this in.
+};
+
+}
+
+#endif // WebsiteDataRecord_h
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include &quot;config.h&quot;
</span><span class="cx"> #include &quot;WebsiteDataStore.h&quot;
</span><span class="cx"> 
</span><ins>+#include &quot;APIWebsiteDataRecord.h&quot;
</ins><span class="cx"> #include &quot;StorageManager.h&quot;
</span><span class="cx"> #include &quot;WebProcessPool.h&quot;
</span><span class="cx"> #include &lt;wtf/RunLoop.h&gt;
</span><span class="lines">@@ -127,6 +128,14 @@
</span><span class="cx">     return processAccessType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebsiteDataStore::fetchData(WebsiteDataTypes, std::function&lt;void (Vector&lt;WebsiteDataRecord&gt;)&gt; completionHandler)
+{
+    // FIXME: Actually fetch data.
+    RunLoop::main().dispatch([completionHandler] {
+        completionHandler({ });
+    });
+}
+
</ins><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="cx">     struct CallbackAggregator : public RefCounted&lt;CallbackAggregator&gt; {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebsiteDataWebsiteDataStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.h        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> class StorageManager;
</span><span class="cx"> class WebPageProxy;
</span><ins>+struct WebsiteDataRecord;
</ins><span class="cx"> 
</span><span class="cx"> class WebsiteDataStore : public RefCounted&lt;WebsiteDataStore&gt;, public WebProcessLifetimeObserver {
</span><span class="cx"> public:
</span><span class="lines">@@ -56,6 +57,7 @@
</span><span class="cx"> 
</span><span class="cx">     static void cloneSessionData(WebPageProxy&amp; sourcePage, WebPageProxy&amp; newPage);
</span><span class="cx"> 
</span><ins>+    void fetchData(WebsiteDataTypes, std::function&lt;void (Vector&lt;WebsiteDataRecord&gt;)&gt; completionHandler);
</ins><span class="cx">     void removeData(WebsiteDataTypes, std::chrono::system_clock::time_point modifiedSince, std::function&lt;void ()&gt; completionHandler);
</span><span class="cx"> 
</span><span class="cx">     StorageManager* storageManager() { return m_storageManager.get(); }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -253,6 +253,7 @@
</span><span class="cx">                 1A4832CB1A9BC465008B4DFE /* _WKWebsiteDataRecord.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A4832C91A9BC465008B4DFE /* _WKWebsiteDataRecord.mm */; };
</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><ins>+                1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4832CF1A9BD821008B4DFE /* WebsiteDataRecord.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">@@ -2330,6 +2331,7 @@
</span><span class="cx">                 1A4832C91A9BC465008B4DFE /* _WKWebsiteDataRecord.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _WKWebsiteDataRecord.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</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><ins>+                1A4832CF1A9BD821008B4DFE /* WebsiteDataRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebsiteDataRecord.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">@@ -4475,6 +4477,7 @@
</span><span class="cx">                         isa = PBXGroup;
</span><span class="cx">                         children = (
</span><span class="cx">                                 1A4832C01A965A33008B4DFE /* Cocoa */,
</span><ins>+                                1A4832CF1A9BD821008B4DFE /* WebsiteDataRecord.h */,
</ins><span class="cx">                                 1A53C2A41A32569F004E8C70 /* WebsiteDataStore.cpp */,
</span><span class="cx">                                 1A53C2A51A32569F004E8C70 /* WebsiteDataStore.h */,
</span><span class="cx">                         );
</span><span class="lines">@@ -7926,6 +7929,7 @@
</span><span class="cx">                                 1C8E2A361277852400BC7BD0 /* WebInspectorMessages.h in Headers */,
</span><span class="cx">                                 1C8E28341275D73800BC7BD0 /* WebInspectorProxy.h in Headers */,
</span><span class="cx">                                 1CA8B946127C882A00576C2B /* WebInspectorProxyMessages.h in Headers */,
</span><ins>+                                1A4832D11A9BDC2F008B4DFE /* WebsiteDataRecord.h in Headers */,
</ins><span class="cx">                                 1C891D6619B124FF00BA79DD /* WebInspectorUI.h in Headers */,
</span><span class="cx">                                 1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */,
</span><span class="cx">                                 2DA944A01884E4F000ED86DB /* WebIOSEventFactory.h in Headers */,
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Tools/ChangeLog        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2015-02-23  Anders Carlsson  &lt;andersca@apple.com&gt;
+
+        Add API for fetching website data records to _WKWebsiteDataStore
+        https://bugs.webkit.org/show_bug.cgi?id=141926
+
+        Reviewed by Beth Dakin.
+
+        * MiniBrowser/mac/MainMenu.xib:
+        * MiniBrowser/mac/WK2BrowserWindowController.m:
+        (-[WK2BrowserWindowController fetchWebsiteData:]):
+        Add menu item to fetch and dump website data.
+
</ins><span class="cx"> 2015-02-23  David Kilzer  &lt;ddkilzer@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS] run-webkit-tests --leaks is broken because IOSSimulatorPort has no is_snowleopard attribute
</span></span></pre></div>
<a id="trunkToolsMiniBrowsermacMainMenuxib"></a>
<div class="modfile"><h4>Modified: trunk/Tools/MiniBrowser/mac/MainMenu.xib (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/MiniBrowser/mac/MainMenu.xib        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Tools/MiniBrowser/mac/MainMenu.xib        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;
</span><del>-&lt;document type=&quot;com.apple.InterfaceBuilder3.Cocoa.XIB&quot; version=&quot;3.0&quot; toolsVersion=&quot;7096&quot; systemVersion=&quot;14D42&quot; targetRuntime=&quot;MacOSX.Cocoa&quot; propertyAccessControl=&quot;none&quot;&gt;
</del><ins>+&lt;document type=&quot;com.apple.InterfaceBuilder3.Cocoa.XIB&quot; version=&quot;3.0&quot; toolsVersion=&quot;7504.2&quot; systemVersion=&quot;14D89&quot; targetRuntime=&quot;MacOSX.Cocoa&quot; propertyAccessControl=&quot;none&quot;&gt;
</ins><span class="cx">     &lt;dependencies&gt;
</span><del>-        &lt;plugIn identifier=&quot;com.apple.InterfaceBuilder.CocoaPlugin&quot; version=&quot;7096&quot;/&gt;
</del><ins>+        &lt;plugIn identifier=&quot;com.apple.InterfaceBuilder.CocoaPlugin&quot; version=&quot;7504.2&quot;/&gt;
</ins><span class="cx">     &lt;/dependencies&gt;
</span><span class="cx">     &lt;objects&gt;
</span><span class="cx">         &lt;customObject id=&quot;-2&quot; userLabel=&quot;File's Owner&quot; customClass=&quot;NSApplication&quot;&gt;
</span><span class="lines">@@ -457,6 +457,12 @@
</span><span class="cx">                                 &lt;/connections&gt;
</span><span class="cx">                             &lt;/menuItem&gt;
</span><span class="cx">                             &lt;menuItem isSeparatorItem=&quot;YES&quot; id=&quot;77P-rp-OVT&quot;/&gt;
</span><ins>+                            &lt;menuItem title=&quot;Fetch Website Data&quot; id=&quot;bFf-Dl-CTv&quot;&gt;
+                                &lt;modifierMask key=&quot;keyEquivalentModifierMask&quot;/&gt;
+                                &lt;connections&gt;
+                                    &lt;action selector=&quot;fetchWebsiteData:&quot; target=&quot;-1&quot; id=&quot;pVk-bR-Z4t&quot;/&gt;
+                                &lt;/connections&gt;
+                            &lt;/menuItem&gt;
</ins><span class="cx">                             &lt;menuItem title=&quot;Clear Website Data&quot; id=&quot;bfj-13-wQ4&quot;&gt;
</span><span class="cx">                                 &lt;modifierMask key=&quot;keyEquivalentModifierMask&quot;/&gt;
</span><span class="cx">                                 &lt;connections&gt;
</span></span></pre></div>
<a id="trunkToolsMiniBrowsermacWK2BrowserWindowControllerm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m (180518 => 180519)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2015-02-23 22:10:51 UTC (rev 180518)
+++ trunk/Tools/MiniBrowser/mac/WK2BrowserWindowController.m        2015-02-23 22:29:37 UTC (rev 180519)
</span><span class="lines">@@ -407,6 +407,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (IBAction)fetchWebsiteData:(id)sender
+{
+    [_configuration._websiteDataStore fetchDataRecordsOfTypes:WKWebsiteDataTypeAll completionHandler:^(NSArray *websiteDataRecords) {
+        NSLog(@&quot;did fetch website data %@.&quot;, websiteDataRecords);
+    }];
+}
+
</ins><span class="cx"> - (IBAction)clearWebsiteData:(id)sender
</span><span class="cx"> {
</span><span class="cx">     [_configuration._websiteDataStore removeDataOfTypes:WKWebsiteDataTypeAll modifiedSince:[NSDate distantPast] completionHandler:^{
</span></span></pre>
</div>
</div>

</body>
</html>