<!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>[177938] trunk/Source/WebCore</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/177938">177938</a></dd>
<dt>Author</dt> <dd>andersca@apple.com</dd>
<dt>Date</dt> <dd>2015-01-05 16:29:36 -0800 (Mon, 05 Jan 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Introduce a per-page database provider class
https://bugs.webkit.org/show_bug.cgi?id=140102

Reviewed by Sam Weinig.

This class will replace DatabaseStrategy and allow for different providers per page.

* CMakeLists.txt:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* page/DatabaseProvider.cpp: Added.
(WebCore::DatabaseProvider::~DatabaseProvider):
(WebCore::DatabaseProvider::idbFactoryBackend):
* page/DatabaseProvider.h: Added.
* page/Page.cpp:
(WebCore::Page::Page):
* page/Page.h:
* page/PageConfiguration.cpp:
* page/PageConfiguration.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxproj">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj</a></li>
<li><a href="#trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters">trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorepagePagecpp">trunk/Source/WebCore/page/Page.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebCorepagePageConfigurationcpp">trunk/Source/WebCore/page/PageConfiguration.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageConfigurationh">trunk/Source/WebCore/page/PageConfiguration.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorepageDatabaseProvidercpp">trunk/Source/WebCore/page/DatabaseProvider.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDatabaseProviderh">trunk/Source/WebCore/page/DatabaseProvider.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/CMakeLists.txt        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -1893,6 +1893,7 @@
</span><span class="cx">     page/DOMWindow.cpp
</span><span class="cx">     page/DOMWindowExtension.cpp
</span><span class="cx">     page/DOMWindowProperty.cpp
</span><ins>+    page/DatabaseProvider.cpp
</ins><span class="cx">     page/DebugPageOverlays.cpp
</span><span class="cx">     page/DeviceController.cpp
</span><span class="cx">     page/DiagnosticLoggingKeys.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/ChangeLog        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -1,5 +1,28 @@
</span><span class="cx"> 2015-01-05  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Introduce a per-page database provider class
+        https://bugs.webkit.org/show_bug.cgi?id=140102
+
+        Reviewed by Sam Weinig.
+
+        This class will replace DatabaseStrategy and allow for different providers per page.
+
+        * CMakeLists.txt:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * page/DatabaseProvider.cpp: Added.
+        (WebCore::DatabaseProvider::~DatabaseProvider):
+        (WebCore::DatabaseProvider::idbFactoryBackend):
+        * page/DatabaseProvider.h: Added.
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        * page/Page.h:
+        * page/PageConfiguration.cpp:
+        * page/PageConfiguration.h:
+
+2015-01-05  Anders Carlsson  &lt;andersca@apple.com&gt;
+
</ins><span class="cx">         Add copies of NPN_Evaluate and NPN_Invoke on Windows
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=140103
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -7185,6 +7185,7 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DOMWindow.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DOMWindowExtension.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DOMWindowProperty.cpp&quot; /&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\page\DatabaseProvider.cpp&quot; /&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\page\DebugPageOverlays.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DragController.cpp&quot; /&gt;
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\scrolling\coordinatedgraphics\ScrollingCoordinatorCoordinatedGraphics.cpp&quot; /&gt;
</span><span class="lines">@@ -19197,6 +19198,7 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DOMWindow.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DOMWindowExtension.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DOMWindowProperty.h&quot; /&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\page\DatabaseProvider.h&quot; /&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\page\DebugPageOverlays.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DragActions.h&quot; /&gt;
</span><span class="cx">     &lt;ClInclude Include=&quot;..\page\DragClient.h&quot; /&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorevcxprojWebCorevcxprojfilters"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -738,6 +738,9 @@
</span><span class="cx">     &lt;ClCompile Include=&quot;..\page\DebugPageOverlays.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;page&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><ins>+    &lt;ClCompile Include=&quot;..\page\DatabaseProvider.cpp&quot;&gt;
+      &lt;Filter&gt;page&lt;/Filter&gt;
+    &lt;/ClCompile&gt;
</ins><span class="cx">     &lt;ClCompile Include=&quot;..\page\DragController.cpp&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;page&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClCompile&gt;
</span><span class="lines">@@ -15110,6 +15113,9 @@
</span><span class="cx">     &lt;ClInclude Include=&quot;..\html\URLUtils.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;html&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span><ins>+    &lt;ClInclude Include=&quot;..\page\DatabaseProvider.h&quot;&gt;
+      &lt;Filter&gt;page&lt;/Filter&gt;
+    &lt;/ClInclude&gt;
</ins><span class="cx">     &lt;ClInclude Include=&quot;..\page\DebugPageOverlays.h&quot;&gt;
</span><span class="cx">       &lt;Filter&gt;page&lt;/Filter&gt;
</span><span class="cx">     &lt;/ClInclude&gt;
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -848,6 +848,8 @@
</span><span class="cx">                 1AC69593161A1E53003732CB /* GraphicsLayerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AC69592161A1E53003732CB /* GraphicsLayerFactory.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 1AC900C31943C0FC008625B5 /* HTTPHeaderNames.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC900C01943C0A0008625B5 /* HTTPHeaderNames.cpp */; };
</span><span class="cx">                 1ACADD791880D91C00D8B71D /* ProgressTrackerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><ins>+                1ACB2B231A5733F400333392 /* DatabaseProvider.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACB2B211A5733F400333392 /* DatabaseProvider.cpp */; };
+                1ACB2B241A5733F400333392 /* DatabaseProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACB2B221A5733F400333392 /* DatabaseProvider.h */; };
</ins><span class="cx">                 1ACD1B630B029739007E5016 /* DOMCSSStyleDeclarationInternal.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 85E711440AC5D5340053270F /* DOMCSSStyleDeclarationInternal.h */; };
</span><span class="cx">                 1ACE53DF0A8D18810022947D /* JSDOMParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */; };
</span><span class="cx">                 1ACE53E00A8D18810022947D /* JSDOMParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ACE53DE0A8D18810022947D /* JSDOMParser.h */; };
</span><span class="lines">@@ -7862,6 +7864,8 @@
</span><span class="cx">                 1AC900C11943C0A0008625B5 /* HTTPHeaderNames.gperf */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTTPHeaderNames.gperf; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1AC900C21943C0A0008625B5 /* HTTPHeaderNames.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPHeaderNames.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ACADD781880D91C00D8B71D /* ProgressTrackerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgressTrackerClient.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                1ACB2B211A5733F400333392 /* DatabaseProvider.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseProvider.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                1ACB2B221A5733F400333392 /* DatabaseProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseProvider.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 1ACE53DD0A8D18810022947D /* JSDOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ACE53DE0A8D18810022947D /* JSDOMParser.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMParser.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 1ACE53E10A8D18E70022947D /* DOMParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = DOMParser.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -16608,6 +16612,8 @@
</span><span class="cx">                                 975CA287130365F800E99AD9 /* Crypto.cpp */,
</span><span class="cx">                                 975CA288130365F800E99AD9 /* Crypto.h */,
</span><span class="cx">                                 975CA289130365F800E99AD9 /* Crypto.idl */,
</span><ins>+                                1ACB2B211A5733F400333392 /* DatabaseProvider.cpp */,
+                                1ACB2B221A5733F400333392 /* DatabaseProvider.h */,
</ins><span class="cx">                                 0F6A12BB1A00923700C6DE72 /* DebugPageOverlays.cpp */,
</span><span class="cx">                                 0F6A12BC1A00923700C6DE72 /* DebugPageOverlays.h */,
</span><span class="cx">                                 CCC2B51015F613060048CDD6 /* DeviceClient.h */,
</span><span class="lines">@@ -24138,6 +24144,7 @@
</span><span class="cx">                                 85DF82250AA7849E00486AD7 /* DOMHTMLTableSectionElement.h in Headers */,
</span><span class="cx">                                 85E711CD0AC5D5350053270F /* DOMHTMLTableSectionElementInternal.h in Headers */,
</span><span class="cx">                                 85F32AF20AA63B8700FF3184 /* DOMHTMLTextAreaElement.h in Headers */,
</span><ins>+                                1ACB2B241A5733F400333392 /* DatabaseProvider.h in Headers */,
</ins><span class="cx">                                 85E711CE0AC5D5350053270F /* DOMHTMLTextAreaElementInternal.h in Headers */,
</span><span class="cx">                                 A1C7971D1883E51F000F5E1F /* DOMHTMLTextAreaElementPrivate.h in Headers */,
</span><span class="cx">                                 85992EC00AA5069500AC0785 /* DOMHTMLTitleElement.h in Headers */,
</span><span class="lines">@@ -28096,6 +28103,7 @@
</span><span class="cx">                                 A871DB2D0A150BD600B12A68 /* HTMLTablePartElement.cpp in Sources */,
</span><span class="cx">                                 A871DB300A150BD600B12A68 /* HTMLTableRowElement.cpp in Sources */,
</span><span class="cx">                                 93442CA00D2B336000338FF9 /* HTMLTableRowsCollection.cpp in Sources */,
</span><ins>+                                1ACB2B231A5733F400333392 /* DatabaseProvider.cpp in Sources */,
</ins><span class="cx">                                 A871DB260A150BD600B12A68 /* HTMLTableSectionElement.cpp in Sources */,
</span><span class="cx">                                 D66817FA166FE6D700FA07B4 /* HTMLTemplateElement.cpp in Sources */,
</span><span class="cx">                                 A81369D7097374F600D74463 /* HTMLTextAreaElement.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorepageDatabaseProvidercpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/DatabaseProvider.cpp (0 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DatabaseProvider.cpp                                (rev 0)
+++ trunk/Source/WebCore/page/DatabaseProvider.cpp        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -0,0 +1,49 @@
</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;DatabaseProvider.h&quot;
+
+#include &quot;IDBFactoryBackendInterface.h&quot;
+
+namespace WebCore {
+
+DatabaseProvider::~DatabaseProvider()
+{
+}
+
+#if ENABLE(INDEXED_DATABASE)
+RefPtr&lt;IDBFactoryBackendInterface&gt; DatabaseProvider::idbFactoryBackend()
+{
+    if (!m_didCreateIDBFactoryBackendInterface) {
+        m_backendInterface = createIDBFactoryBackend();
+        m_didCreateIDBFactoryBackendInterface = true;
+    }
+
+    return m_backendInterface;
+}
+#endif
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorepageDatabaseProviderh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/DatabaseProvider.h (0 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DatabaseProvider.h                                (rev 0)
+++ trunk/Source/WebCore/page/DatabaseProvider.h        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -0,0 +1,55 @@
</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 DatabaseProvider_h
+#define DatabaseProvider_h
+
+#include &lt;wtf/RefCounted.h&gt;
+#include &lt;wtf/RefPtr.h&gt;
+
+namespace WebCore {
+
+class IDBFactoryBackendInterface;
+
+class DatabaseProvider : public RefCounted&lt;DatabaseProvider&gt; {
+public:
+    virtual ~DatabaseProvider();
+
+#if ENABLE(INDEXED_DATABASE)
+    RefPtr&lt;IDBFactoryBackendInterface&gt; idbFactoryBackend();
+#endif
+
+private:
+#if ENABLE(INDEXED_DATABASE)
+    WEBCORE_EXPORT virtual RefPtr&lt;IDBFactoryBackendInterface&gt; createIDBFactoryBackend() = 0;
+
+    bool m_didCreateIDBFactoryBackendInterface { false };
+    RefPtr&lt;IDBFactoryBackendInterface&gt; m_backendInterface;
+#endif
+};
+
+}
+
+#endif // DatabaseProvider_h
</ins></span></pre></div>
<a id="trunkSourceWebCorepagePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.cpp (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.cpp        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/page/Page.cpp        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include &quot;ClientRectList.h&quot;
</span><span class="cx"> #include &quot;ContextMenuClient.h&quot;
</span><span class="cx"> #include &quot;ContextMenuController.h&quot;
</span><ins>+#include &quot;DatabaseProvider.h&quot;
</ins><span class="cx"> #include &quot;DocumentLoader.h&quot;
</span><span class="cx"> #include &quot;DocumentMarkerController.h&quot;
</span><span class="cx"> #include &quot;DocumentStyleSheetCollection.h&quot;
</span><span class="lines">@@ -203,6 +204,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     , m_lastSpatialNavigationCandidatesCount(0) // NOTE: Only called from Internals for Spatial Navigation testing.
</span><span class="cx">     , m_framesHandlingBeforeUnloadEvent(0)
</span><ins>+    , m_databaseProvider(WTF::move(pageConfiguration.databaseProvider))
</ins><span class="cx">     , m_storageNamespaceProvider(*WTF::move(pageConfiguration.storageNamespaceProvider))
</span><span class="cx">     , m_userContentController(WTF::move(pageConfiguration.userContentController))
</span><span class="cx">     , m_visitedLinkStore(*WTF::move(pageConfiguration.visitedLinkStore))
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/page/Page.h        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -67,6 +67,7 @@
</span><span class="cx"> class Color;
</span><span class="cx"> class ContextMenuClient;
</span><span class="cx"> class ContextMenuController;
</span><ins>+class DatabaseProvider;
</ins><span class="cx"> class DragCaretController;
</span><span class="cx"> class DragClient;
</span><span class="cx"> class DragController;
</span><span class="lines">@@ -573,6 +574,7 @@
</span><span class="cx">     unsigned m_lastSpatialNavigationCandidatesCount;
</span><span class="cx">     unsigned m_framesHandlingBeforeUnloadEvent;
</span><span class="cx"> 
</span><ins>+    RefPtr&lt;DatabaseProvider&gt; m_databaseProvider;
</ins><span class="cx">     Ref&lt;StorageNamespaceProvider&gt; m_storageNamespaceProvider;
</span><span class="cx">     RefPtr&lt;UserContentController&gt; m_userContentController;
</span><span class="cx">     Ref&lt;VisitedLinkStore&gt; m_visitedLinkStore;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConfigurationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConfiguration.cpp (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConfiguration.cpp        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/page/PageConfiguration.cpp        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> #include &quot;PageConfiguration.h&quot;
</span><span class="cx"> 
</span><span class="cx"> #include &quot;BackForwardClient.h&quot;
</span><ins>+#include &quot;DatabaseProvider.h&quot;
</ins><span class="cx"> #include &quot;StorageNamespaceProvider.h&quot;
</span><span class="cx"> #include &quot;UserContentController.h&quot;
</span><span class="cx"> #include &quot;VisitedLinkStore.h&quot;
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageConfigurationh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PageConfiguration.h (177937 => 177938)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PageConfiguration.h        2015-01-06 00:10:52 UTC (rev 177937)
+++ trunk/Source/WebCore/page/PageConfiguration.h        2015-01-06 00:29:36 UTC (rev 177938)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx"> class ContextMenuClient;
</span><span class="cx"> #endif
</span><ins>+class DatabaseProvider;
</ins><span class="cx"> class DiagnosticLoggingClient;
</span><span class="cx"> class DragClient;
</span><span class="cx"> class EditorClient;
</span><span class="lines">@@ -70,6 +71,7 @@
</span><span class="cx">     FrameLoaderClient* loaderClientForMainFrame;
</span><span class="cx">     DiagnosticLoggingClient* diagnosticLoggingClient;
</span><span class="cx"> 
</span><ins>+    RefPtr&lt;DatabaseProvider&gt; databaseProvider;
</ins><span class="cx">     RefPtr&lt;StorageNamespaceProvider&gt; storageNamespaceProvider;
</span><span class="cx">     RefPtr&lt;UserContentController&gt; userContentController;
</span><span class="cx">     RefPtr&lt;VisitedLinkStore&gt; visitedLinkStore;
</span></span></pre>
</div>
</div>

</body>
</html>