Re-landing patch for "Introducing the DatabaseStrategy and database servers".
authormark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 08:09:53 +0000 (08:09 +0000)
committermark.lam@apple.com <mark.lam@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 15 Dec 2012 08:09:53 +0000 (08:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104934.

Not reviewed.

Source/WebCore:

Merged from r137767. Previously reviewed by Sam Weinig.
Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.

No new tests.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
* Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* Modules/webdatabase/DatabaseManager.h:
(DatabaseManager):
* Target.pri:
* WebCore.exp.in:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
* platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::databaseStrategy):
(PlatformStrategies):
(WebCore::PlatformStrategies::PlatformStrategies):

Source/WebKit/efl:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesEfl.cpp:
(PlatformStrategiesEfl::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesEfl.h:
(PlatformStrategiesEfl):

Source/WebKit/gtk:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesGtk.cpp:
(PlatformStrategiesGtk::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesGtk.h:
(PlatformStrategiesGtk):

Source/WebKit/mac:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createDatabaseStrategy):

Source/WebKit/qt:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesQt.cpp:
(PlatformStrategiesQt::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesQt.h:
(PlatformStrategiesQt):

Source/WebKit/win:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createDatabaseStrategy):
* WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

Source/WebKit/wince:

Merged from r137767. Previously reviewed by Sam Weinig.

* WebCoreSupport/PlatformStrategiesWinCE.cpp:
(PlatformStrategiesWinCE::createDatabaseStrategy):
* WebCoreSupport/PlatformStrategiesWinCE.h:
(PlatformStrategiesWinCE):

Source/WebKit2:

Merged from r137767. Previously reviewed by Sam Weinig.

* CMakeLists.txt:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createDatabaseStrategy):
(WebKit):
(WebKit::WebPlatformStrategies::getDatabaseServer):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
(WebPlatformStrategies):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137795 268f45cc-cd09-0410-ab3c-d52691b4dbfc

37 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h [new file with mode: 0644]
Source/WebCore/Modules/webdatabase/DBBackendServer.h [new file with mode: 0644]
Source/WebCore/Modules/webdatabase/DatabaseManager.cpp
Source/WebCore/Modules/webdatabase/DatabaseManager.h
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/DatabaseStrategy.cpp [new file with mode: 0644]
Source/WebCore/platform/DatabaseStrategy.h [new file with mode: 0644]
Source/WebCore/platform/PlatformStrategies.h
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.cpp
Source/WebKit/efl/WebCoreSupport/PlatformStrategiesEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.cpp
Source/WebKit/qt/WebCoreSupport/PlatformStrategiesQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/win/WebCoreSupport/WebPlatformStrategies.h
Source/WebKit/wince/ChangeLog
Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
Source/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.h
Source/WebKit2/CMakeLists.txt
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h

index 7eee9ed..3946cc8 100644 (file)
@@ -1796,6 +1796,7 @@ set(WebCore_SOURCES
     platform/ContextMenuItem.cpp
     platform/ContentType.cpp
     platform/CrossThreadCopier.cpp
+    platform/DatabaseStrategy.cpp
     platform/DateComponents.cpp
     platform/Decimal.cpp
     platform/DragData.cpp
index ce2617d..85975b5 100644 (file)
@@ -1,3 +1,35 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+        Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.
+
+        No new tests.
+
+        * CMakeLists.txt:
+        * GNUmakefile.list.am:
+        * Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
+        * Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
+        * Modules/webdatabase/DatabaseManager.cpp:
+        (WebCore::DatabaseManager::DatabaseManager):
+        * Modules/webdatabase/DatabaseManager.h:
+        (DatabaseManager):
+        * Target.pri:
+        * WebCore.exp.in:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
+        * platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
+        * platform/PlatformStrategies.h:
+        (WebCore::PlatformStrategies::databaseStrategy):
+        (PlatformStrategies):
+        (WebCore::PlatformStrategies::PlatformStrategies):
+
 2012-12-14  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
 
         Emphasis mark is printed after inline-block with justify
index 53fcc9e..705f72c 100644 (file)
@@ -2086,6 +2086,7 @@ webcore_modules_sources += \
        Source/WebCore/Modules/webaudio/WaveTable.h \
        Source/WebCore/Modules/webdatabase/AbstractDatabase.cpp \
        Source/WebCore/Modules/webdatabase/AbstractDatabase.h \
+       Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h \
        Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.cpp \
        Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.h \
        Source/WebCore/Modules/webdatabase/DOMWindowWebDatabase.cpp \
@@ -2109,6 +2110,7 @@ webcore_modules_sources += \
        Source/WebCore/Modules/webdatabase/DatabaseThread.h \
        Source/WebCore/Modules/webdatabase/DatabaseTracker.cpp \
        Source/WebCore/Modules/webdatabase/DatabaseTracker.h \
+       Source/WebCore/Modules/webdatabase/DBBackendServer.h \
        Source/WebCore/Modules/webdatabase/OriginQuotaManager.cpp \
        Source/WebCore/Modules/webdatabase/OriginQuotaManager.h \
        Source/WebCore/Modules/webdatabase/OriginUsageRecord.cpp \
@@ -5297,6 +5299,8 @@ webcore_platform_sources += \
        Source/WebCore/platform/CrossThreadCopier.h \
        Source/WebCore/platform/Cursor.cpp \
        Source/WebCore/platform/Cursor.h \
+       Source/WebCore/platform/DatabaseStrategy.cpp \
+       Source/WebCore/platform/DatabaseStrategy.h \
        Source/WebCore/platform/DateComponents.cpp \
        Source/WebCore/platform/DateComponents.h \
        Source/WebCore/platform/DateTimeChooser.h \
diff --git a/Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h b/Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h
new file mode 100644 (file)
index 0000000..df156bd
--- /dev/null
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 AbstractDatabaseServer_h
+#define AbstractDatabaseServer_h
+
+#if ENABLE(SQL_DATABASE)
+
+namespace WebCore {
+
+class AbstractDatabaseServer {
+protected:
+    AbstractDatabaseServer() { }
+    virtual ~AbstractDatabaseServer() { }
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(SQL_DATABASE)
+
+#endif // AbstractDatabaseServer_h
diff --git a/Source/WebCore/Modules/webdatabase/DBBackendServer.h b/Source/WebCore/Modules/webdatabase/DBBackendServer.h
new file mode 100644 (file)
index 0000000..56a1f5b
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 DBBackendServer_h
+#define DBBackendServer_h
+
+#if ENABLE(SQL_DATABASE)
+
+#include "AbstractDatabaseServer.h"
+
+namespace WebCore {
+namespace DBBackend {
+
+class Server: public AbstractDatabaseServer {
+public:
+    Server() { };
+    virtual ~Server() { }
+};
+
+} // namespace DBBackend
+} // namespace WebCore
+
+#endif // ENABLE(SQL_DATABASE)
+
+#endif // DBBackendServer_h
index 67453ed..193ebc3 100644 (file)
 #include "DatabaseTracker.h"
 #include <wtf/UnusedParam.h>
 
+#if USE(PLATFORM_STRATEGIES)
+#include "DatabaseStrategy.h"
+#include "PlatformStrategies.h"
+#else
+#include "DBBackendServer.h"
+#endif
+
 namespace WebCore {
 
 DatabaseManager& DatabaseManager::manager()
@@ -46,6 +53,12 @@ DatabaseManager& DatabaseManager::manager()
 
 DatabaseManager::DatabaseManager()
 {
+#if USE(PLATFORM_STRATEGIES)
+    m_server = platformStrategies()->databaseStrategy()->getDatabaseServer();
+#else
+    m_server = new DBBackend::Server;
+#endif
+    ASSERT(m_server); // We should always have a server to work with.
 }
 
 void DatabaseManager::initialize(const String& databasePath)
index 4f7b373..b7d3812 100644 (file)
@@ -35,6 +35,7 @@
 
 namespace WebCore {
 
+class AbstractDatabaseServer;
 class DatabaseManagerClient;
 class DatabaseTaskSynchronizer;
 class SecurityOrigin;
@@ -85,6 +86,8 @@ public:
 private:
     DatabaseManager();
     ~DatabaseManager() { }
+
+    AbstractDatabaseServer* m_server;
 };
 
 } // namespace WebCore
index 26f6928..dbe8497 100644 (file)
@@ -948,6 +948,7 @@ SOURCES += \
     platform/ClockGeneric.cpp \
     platform/ContentType.cpp \
     platform/CrossThreadCopier.cpp \
+    platform/DatabaseStrategy.cpp \
     platform/DateComponents.cpp \
     platform/Decimal.cpp \
     platform/DragData.cpp \
@@ -1413,6 +1414,7 @@ HEADERS += \
     Modules/notifications/WorkerContextNotifications.h \
     \
     Modules/webdatabase/AbstractDatabase.h \
+    Modules/webdatabase/AbstractDatabaseServer.h \
     Modules/webdatabase/ChangeVersionWrapper.h \
     Modules/webdatabase/DOMWindowWebDatabase.h \
     Modules/webdatabase/DatabaseAuthorizer.h \
@@ -1423,6 +1425,7 @@ HEADERS += \
     Modules/webdatabase/DatabaseTask.h \
     Modules/webdatabase/DatabaseThread.h \
     Modules/webdatabase/DatabaseTracker.h \
+    Modules/webdatabase/DBBackendServer.h \
     Modules/webdatabase/OriginQuotaManager.h \
     Modules/webdatabase/OriginUsageRecord.h \
     Modules/webdatabase/SQLCallbackWrapper.h \
index f9ea562..0c831de 100644 (file)
@@ -434,6 +434,7 @@ __ZN7WebCore15visitedLinkHashEPKtj
 __ZN7WebCore15visitedLinkHashERKN3WTF6StringE
 __ZN7WebCore16ApplicationCache18diskUsageForOriginEPNS_14SecurityOriginE
 __ZN7WebCore16ApplicationCache20deleteCacheForOriginEPNS_14SecurityOriginE
+__ZN7WebCore16DatabaseStrategy17getDatabaseServerEv
 __ZN7WebCore16DeviceMotionData12Acceleration6createEbdbdbd
 __ZN7WebCore16DeviceMotionData12RotationRate6createEbdbdbd
 __ZN7WebCore16DeviceMotionData6createEN3WTF10PassRefPtrINS0_12AccelerationEEES4_NS2_INS0_12RotationRateEEEbd
@@ -1482,6 +1483,7 @@ __ZNK7WebCore9PageCache10frameCountEv
 __ZNK7WebCore9PageCache21autoreleasedPageCountEv
 __ZTVN7WebCore12ChromeClientE
 __ZTVN7WebCore14LoaderStrategyE
+__ZTVN7WebCore16DatabaseStrategyE
 __ZTVN7WebCore16IconDatabaseBaseE
 __ZTVN7WebCore17FrameLoaderClientE
 __ZTVN7WebCore25HistoryPropertyListWriterE
index ba08f55..ab87bee 100644 (file)
             'Modules/webaudio/WaveTable.cpp',
             'Modules/webaudio/WaveTable.h',
             'Modules/webdatabase/AbstractDatabase.cpp',
+            'Modules/webdatabase/AbstractDatabaseServer.h',
             'Modules/webdatabase/ChangeVersionWrapper.cpp',
             'Modules/webdatabase/ChangeVersionWrapper.h',
             'Modules/webdatabase/Database.cpp',
             'Modules/webdatabase/DatabaseThread.cpp',
             'Modules/webdatabase/DatabaseThread.h',
             'Modules/webdatabase/DatabaseTracker.cpp',
+            'Modules/webdatabase/DBBackendServer.h',
             'Modules/webdatabase/DOMWindowWebDatabase.cpp',
             'Modules/webdatabase/DOMWindowWebDatabase.h',
             'Modules/webdatabase/OriginQuotaManager.cpp',
index 5e1fcce..ca20493 100755 (executable)
                                        >
                                </File>
                                <File
+                                       RelativePath="..\Modules\webdatabase\AbstractDatabaseServer.h"
+                                       >
+                               </File>
+                               <File
                                        RelativePath="..\Modules\webdatabase\ChangeVersionWrapper.cpp"
                                        >
                                </File>
                                        >
                                </File>
                                <File
+                                       RelativePath="..\Modules\webdatabase\DBBackendServer.h"
+                                       >
+                               </File>
+                               <File
                                        RelativePath="..\Modules\webdatabase\DOMWindowWebDatabase.cpp"
                                        >
                                </File>
                                >
                        </File>
                        <File
+                               RelativePath="..\platform\DatabaseStrategy.cpp"
+                               >
+                       </File>
+                       <File
+                               RelativePath="..\platform\DatabaseStrategy.h"
+                               >
+                       </File>
+                       <File
                                RelativePath="..\platform\DateComponents.cpp"
                                >
                        </File>
index 2090314..745217c 100644 (file)
                FDF6BAF9134A4C9800822920 /* JSOfflineAudioCompletionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = FDF6BAF7134A4C9800822920 /* JSOfflineAudioCompletionEvent.h */; };
                FDF7E9C313AC21DB00A51EAC /* JSAudioBufferCallback.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FDF7E9C113AC21DB00A51EAC /* JSAudioBufferCallback.cpp */; };
                FDF7E9C413AC21DB00A51EAC /* JSAudioBufferCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = FDF7E9C213AC21DB00A51EAC /* JSAudioBufferCallback.h */; };
+               FE115FAB167988CD00249134 /* AbstractDatabaseServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE115FA9167988CD00249134 /* AbstractDatabaseServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FE456F181677D74E005EDDF9 /* DatabaseManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE456F161677D74E005EDDF9 /* DatabaseManager.cpp */; };
                FE456F191677D74E005EDDF9 /* DatabaseManager.h in Headers */ = {isa = PBXBuildFile; fileRef = FE456F171677D74E005EDDF9 /* DatabaseManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FE6FD4880F676E5700092873 /* Coordinates.h in Headers */ = {isa = PBXBuildFile; fileRef = FE6FD4850F676E5700092873 /* Coordinates.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FE80DA660E9C4703000D6F75 /* JSGeoposition.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80DA620E9C4703000D6F75 /* JSGeoposition.h */; };
                FE80DA710E9C472F000D6F75 /* JSPositionError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE80DA6D0E9C472F000D6F75 /* JSPositionError.cpp */; };
                FE80DA720E9C472F000D6F75 /* JSPositionError.h in Headers */ = {isa = PBXBuildFile; fileRef = FE80DA6E0E9C472F000D6F75 /* JSPositionError.h */; };
+               FEAF6654167970320062D0C5 /* DBBackendServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FEAF6653167970070062D0C5 /* DBBackendServer.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               FEDEF84116797108000E444A /* DatabaseStrategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */; };
+               FEDEF84216797108000E444A /* DatabaseStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = FEDEF84016797108000E444A /* DatabaseStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; };
                FF945ECB161F7F3600971BC8 /* PseudoElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FF945EC9161F7F3600971BC8 /* PseudoElement.cpp */; };
                FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */ = {isa = PBXBuildFile; fileRef = FF945ECA161F7F3600971BC8 /* PseudoElement.h */; };
                FFD5B97A135CC97800D5E92A /* PageVisibilityState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */; };
                FDF6BAF7134A4C9800822920 /* JSOfflineAudioCompletionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOfflineAudioCompletionEvent.h; sourceTree = "<group>"; };
                FDF7E9C113AC21DB00A51EAC /* JSAudioBufferCallback.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSAudioBufferCallback.cpp; sourceTree = "<group>"; };
                FDF7E9C213AC21DB00A51EAC /* JSAudioBufferCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSAudioBufferCallback.h; sourceTree = "<group>"; };
+               FE115FA9167988CD00249134 /* AbstractDatabaseServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AbstractDatabaseServer.h; path = Modules/webdatabase/AbstractDatabaseServer.h; sourceTree = "<group>"; };
                FE456F161677D74E005EDDF9 /* DatabaseManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DatabaseManager.cpp; path = Modules/webdatabase/DatabaseManager.cpp; sourceTree = "<group>"; };
                FE456F171677D74E005EDDF9 /* DatabaseManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DatabaseManager.h; path = Modules/webdatabase/DatabaseManager.h; sourceTree = "<group>"; };
                FE6FD4850F676E5700092873 /* Coordinates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Coordinates.h; sourceTree = "<group>"; };
                FE80DA620E9C4703000D6F75 /* JSGeoposition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGeoposition.h; sourceTree = "<group>"; };
                FE80DA6D0E9C472F000D6F75 /* JSPositionError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPositionError.cpp; sourceTree = "<group>"; };
                FE80DA6E0E9C472F000D6F75 /* JSPositionError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPositionError.h; sourceTree = "<group>"; };
+               FEAF6653167970070062D0C5 /* DBBackendServer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DBBackendServer.h; path = Modules/webdatabase/DBBackendServer.h; sourceTree = "<group>"; };
+               FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DatabaseStrategy.cpp; sourceTree = "<group>"; };
+               FEDEF84016797108000E444A /* DatabaseStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatabaseStrategy.h; sourceTree = "<group>"; };
                FF945EC9161F7F3600971BC8 /* PseudoElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PseudoElement.cpp; sourceTree = "<group>"; };
                FF945ECA161F7F3600971BC8 /* PseudoElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PseudoElement.h; sourceTree = "<group>"; };
                FFD5B977135CC97800D5E92A /* PageVisibilityState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageVisibilityState.cpp; sourceTree = "<group>"; };
                        children = (
                                97BC69D61505F076001B74AC /* AbstractDatabase.cpp */,
                                97BC69D71505F076001B74AC /* AbstractDatabase.h */,
+                               FE115FA9167988CD00249134 /* AbstractDatabaseServer.h */,
                                97BC69D81505F076001B74AC /* ChangeVersionWrapper.cpp */,
                                97BC69D91505F076001B74AC /* ChangeVersionWrapper.h */,
                                97BC69DE1505F081001B74AC /* Database.cpp */,
                                97BC69EE1505F081001B74AC /* DatabaseThread.h */,
                                97BC69EF1505F081001B74AC /* DatabaseTracker.cpp */,
                                97BC69F01505F081001B74AC /* DatabaseTracker.h */,
+                               FEAF6653167970070062D0C5 /* DBBackendServer.h */,
                                A8CCBB46151F831600AB7CE9 /* DOMWindowWebDatabase.cpp */,
                                A8CCBB47151F831600AB7CE9 /* DOMWindowWebDatabase.h */,
                                A8CCBB4E151F835A00AB7CE9 /* DOMWindowWebDatabase.idl */,
                                2E4346570F546A9900B0F1BA /* CrossThreadCopier.h */,
                                E11AF15011B9A1A300805103 /* Cursor.cpp */,
                                F587868402DE3B8601EA4122 /* Cursor.h */,
+                               FEDEF83F16797108000E444A /* DatabaseStrategy.cpp */,
+                               FEDEF84016797108000E444A /* DatabaseStrategy.h */,
                                A5732B08136A161D005C8D7C /* DateComponents.cpp */,
                                A5732B09136A161D005C8D7C /* DateComponents.h */,
                                45FEA5CD156DDE8C00654101 /* Decimal.cpp */,
                        isa = PBXHeadersBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               FEDEF84216797108000E444A /* DatabaseStrategy.h in Headers */,
+                               FE115FAB167988CD00249134 /* AbstractDatabaseServer.h in Headers */,
+                               FEAF6654167970320062D0C5 /* DBBackendServer.h in Headers */,
                                FE456F191677D74E005EDDF9 /* DatabaseManager.h in Headers */,
                                E43105BB16750F1600DB2FB8 /* NodeTraversal.h in Headers */,
                                C375D7FE16639519006184AB /* TypeAhead.h in Headers */,
                                FDA9325D16703B2A008982DC /* OfflineAudioContext.cpp in Sources */,
                                FDA9326616703BA9008982DC /* JSOfflineAudioContext.cpp in Sources */,
                                FE456F181677D74E005EDDF9 /* DatabaseManager.cpp in Sources */,
+                               FEDEF84116797108000E444A /* DatabaseStrategy.cpp in Sources */,
                                F37A56221679CF7B00C57046 /* HeapGraphSerializer.cpp in Sources */,
                                CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */,
                        );
diff --git a/Source/WebCore/platform/DatabaseStrategy.cpp b/Source/WebCore/platform/DatabaseStrategy.cpp
new file mode 100644 (file)
index 0000000..022e3f0
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 "config.h"
+#include "DatabaseStrategy.h"
+
+#if USE(PLATFORM_STRATEGIES)
+#if ENABLE(SQL_DATABASE)
+
+#include "DBBackendServer.h"
+
+namespace WebCore {
+
+AbstractDatabaseServer* DatabaseStrategy::getDatabaseServer()
+{
+    return new DBBackend::Server;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(SQL_DATABASE)
+#endif // USE(PLATFORM_STRATEGIES)
diff --git a/Source/WebCore/platform/DatabaseStrategy.h b/Source/WebCore/platform/DatabaseStrategy.h
new file mode 100644 (file)
index 0000000..f869f54
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2012 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. ``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
+ * 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 DatabaseStrategy_h
+#define DatabaseStrategy_h
+
+#if USE(PLATFORM_STRATEGIES)
+
+#include "AbstractDatabaseServer.h"
+
+namespace WebCore {
+
+class DatabaseStrategy {
+public:
+#if ENABLE(SQL_DATABASE)
+    virtual AbstractDatabaseServer* getDatabaseServer();
+#endif
+
+protected:
+    virtual ~DatabaseStrategy() { }
+};
+
+} // namespace WebCore
+
+#endif // USE(PLATFORM_STRATEGIES)
+
+#endif // DatabaseStrategy_h
index 1fae41d..0d16799 100644 (file)
@@ -31,6 +31,7 @@
 namespace WebCore {
 
 class CookiesStrategy;
+class DatabaseStrategy;
 class LoaderStrategy;
 class PasteboardStrategy;
 class PluginStrategy;
@@ -46,6 +47,13 @@ public:
         return m_cookiesStrategy;
     }
 
+    DatabaseStrategy* databaseStrategy()
+    {
+        if (!m_databaseStrategy)
+            m_databaseStrategy = createDatabaseStrategy();
+        return m_databaseStrategy;
+    }
+
     LoaderStrategy* loaderStrategy()
     {
         if (!m_loaderStrategy)
@@ -84,6 +92,7 @@ public:
 protected:
     PlatformStrategies()
         : m_cookiesStrategy(0)
+        , m_databaseStrategy(0)
         , m_loaderStrategy(0)
         , m_pasteboardStrategy(0)
         , m_pluginStrategy(0)
@@ -98,6 +107,7 @@ protected:
 
 private:
     virtual CookiesStrategy* createCookiesStrategy() = 0;
+    virtual DatabaseStrategy* createDatabaseStrategy() = 0;
     virtual LoaderStrategy* createLoaderStrategy() = 0;
     virtual PasteboardStrategy* createPasteboardStrategy() = 0;
     virtual PluginStrategy* createPluginStrategy() = 0;
@@ -105,6 +115,7 @@ private:
     virtual VisitedLinkStrategy* createVisitedLinkStrategy() = 0;
 
     CookiesStrategy* m_cookiesStrategy;
+    DatabaseStrategy* m_databaseStrategy;
     LoaderStrategy* m_loaderStrategy;
     PasteboardStrategy* m_pasteboardStrategy;
     PluginStrategy* m_pluginStrategy;
index 2790682..f54ff87 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * WebCoreSupport/PlatformStrategiesEfl.cpp:
+        (PlatformStrategiesEfl::createDatabaseStrategy):
+        * WebCoreSupport/PlatformStrategiesEfl.h:
+        (PlatformStrategiesEfl):
+
 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r137767.
index ca19486..bce0b31 100644 (file)
@@ -50,6 +50,11 @@ CookiesStrategy* PlatformStrategiesEfl::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* PlatformStrategiesEfl::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* PlatformStrategiesEfl::createLoaderStrategy()
 {
     return this;
index baa7d05..79ffdf6 100644 (file)
@@ -21,6 +21,7 @@
 #define PlatformStrategiesEfl_h
 
 #include "CookiesStrategy.h"
+#include "DatabaseStrategy.h"
 #include "LoaderStrategy.h"
 #include "PasteboardStrategy.h"
 #include "PlatformStrategies.h"
@@ -28,7 +29,7 @@
 #include "SharedWorkerStrategy.h"
 #include "VisitedLinkStrategy.h"
 
-class PlatformStrategiesEfl : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class PlatformStrategiesEfl : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
 
@@ -37,6 +38,7 @@ private:
 
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy();
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy();
     virtual WebCore::LoaderStrategy* createLoaderStrategy();
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
     virtual WebCore::PluginStrategy* createPluginStrategy();
@@ -55,6 +57,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname);
     virtual void deleteAllCookies(WebCore::NetworkingContext*);
 
+    // WebCore::DatabaseStrategy
+    // - Using default implementation.
+
     // WebCore::PluginStrategy
     virtual void refreshPlugins();
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
index deea1fe..ac0b204 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * WebCoreSupport/PlatformStrategiesGtk.cpp:
+        (PlatformStrategiesGtk::createDatabaseStrategy):
+        * WebCoreSupport/PlatformStrategiesGtk.h:
+        (PlatformStrategiesGtk):
+
 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r137767.
index baa6825..61846d5 100644 (file)
@@ -43,6 +43,11 @@ CookiesStrategy* PlatformStrategiesGtk::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* PlatformStrategiesGtk::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* PlatformStrategiesGtk::createLoaderStrategy()
 {
     return this;
index c4536f1..0a04458 100644 (file)
@@ -20,6 +20,7 @@
 #define PlatformStrategiesGtk_h
 
 #include "CookiesStrategy.h"
+#include "DatabaseStrategy.h"
 #include "LoaderStrategy.h"
 #include "PasteboardStrategy.h"
 #include "PlatformStrategies.h"
@@ -27,7 +28,7 @@
 #include "SharedWorkerStrategy.h"
 #include "VisitedLinkStrategy.h"
 
-class PlatformStrategiesGtk : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class PlatformStrategiesGtk : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
 
@@ -36,6 +37,7 @@ private:
 
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy();
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy();
     virtual WebCore::LoaderStrategy* createLoaderStrategy();
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
     virtual WebCore::PluginStrategy* createPluginStrategy();
@@ -54,6 +56,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname);
     virtual void deleteAllCookies(WebCore::NetworkingContext*);
 
+    // WebCore::DatabaseStrategy
+    // - Using default implementation.
+
     // WebCore::PluginStrategy
     virtual void refreshPlugins();
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
index 564aaa4..35d80fe 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * WebCoreSupport/WebPlatformStrategies.h:
+        (WebPlatformStrategies):
+        * WebCoreSupport/WebPlatformStrategies.mm:
+        (WebPlatformStrategies::createDatabaseStrategy):
+
 2012-12-14  Mark Lam  <mark.lam@apple.com>
 
         The WebView should initialize the platform strategies before initializing other sub-systems.
index 9c5f511..7cbcd8e 100644 (file)
@@ -27,6 +27,7 @@
 #define WebPlatformStrategies_h
 
 #include <WebCore/CookiesStrategy.h>
+#include <WebCore/DatabaseStrategy.h>
 #include <WebCore/LoaderStrategy.h>
 #include <WebCore/PasteboardStrategy.h>
 #include <WebCore/PlatformStrategies.h>
@@ -34,7 +35,7 @@
 #include <WebCore/SharedWorkerStrategy.h>
 #include <WebCore/VisitedLinkStrategy.h>
 
-class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
     
@@ -43,6 +44,7 @@ private:
     
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy() OVERRIDE;
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy() OVERRIDE;
     virtual WebCore::LoaderStrategy* createLoaderStrategy() OVERRIDE;
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy() OVERRIDE;
     virtual WebCore::PluginStrategy* createPluginStrategy() OVERRIDE;
@@ -62,6 +64,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname) OVERRIDE;
     virtual void deleteAllCookies(WebCore::NetworkingContext*) OVERRIDE;
 
+    // WebCore::DatabaseStrategy
+    // - Using default implementation.
+
     // WebCore::PluginStrategy
     virtual void refreshPlugins() OVERRIDE;
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&) OVERRIDE;
index 1591718..ecaaf97 100644 (file)
@@ -53,6 +53,11 @@ CookiesStrategy* WebPlatformStrategies::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* WebPlatformStrategies::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* WebPlatformStrategies::createLoaderStrategy()
 {
     return this;
index 7af2ed9..e14f308 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * WebCoreSupport/PlatformStrategiesQt.cpp:
+        (PlatformStrategiesQt::createDatabaseStrategy):
+        * WebCoreSupport/PlatformStrategiesQt.h:
+        (PlatformStrategiesQt):
+
 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r137767.
index 07e8460..9f0fa9b 100644 (file)
@@ -65,6 +65,11 @@ CookiesStrategy* PlatformStrategiesQt::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* PlatformStrategiesQt::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* PlatformStrategiesQt::createLoaderStrategy()
 {
     return this;
index 7ba16cf..1eba9b2 100644 (file)
@@ -29,6 +29,7 @@
 #define PlatformStrategiesQt_h
 
 #include <CookiesStrategy.h>
+#include <DatabaseStrategy.h>
 #include <LoaderStrategy.h>
 #include <PlatformStrategies.h>
 #include <PluginStrategy.h>
@@ -39,7 +40,7 @@ namespace WebCore {
 class PasteboardStrategy;
 }
 
-class PlatformStrategiesQt : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class PlatformStrategiesQt : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
 
@@ -48,6 +49,7 @@ private:
 
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy();
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy();
     virtual WebCore::LoaderStrategy* createLoaderStrategy();
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
     virtual WebCore::PluginStrategy* createPluginStrategy();
@@ -66,6 +68,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname);
     virtual void deleteAllCookies(WebCore::NetworkingContext*);
 
+    // WebCore::DatabaseStrategy
+    // - Using default implementation.
+
     // WebCore::PluginStrategy
     virtual void refreshPlugins();
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
index c5b93b1..6b0251e 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebPlatformStrategies::createDatabaseStrategy):
+        * WebCoreSupport/WebPlatformStrategies.h:
+        (WebPlatformStrategies):
+
 2012-12-14  Mark Lam  <mark.lam@apple.com>
 
         The WebView should initialize the platform strategies before initializing other sub-systems.
index c3d69da..457b565 100644 (file)
@@ -52,6 +52,11 @@ CookiesStrategy* WebPlatformStrategies::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* WebPlatformStrategies::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* WebPlatformStrategies::createLoaderStrategy()
 {
     return this;
index c2eb6ef..d186c3e 100644 (file)
 #define WebPlatformStrategies_h
 
 #include <WebCore/CookiesStrategy.h>
+#include <WebCore/DatabaseStrategy.h>
 #include <WebCore/LoaderStrategy.h>
 #include <WebCore/PlatformStrategies.h>
 #include <WebCore/PluginStrategy.h>
 #include <WebCore/SharedWorkerStrategy.h>
 #include <WebCore/VisitedLinkStrategy.h>
 
-class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
     
@@ -42,6 +43,7 @@ private:
     
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy();
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy();
     virtual WebCore::LoaderStrategy* createLoaderStrategy();
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
     virtual WebCore::PluginStrategy* createPluginStrategy();
@@ -63,6 +65,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname);
     virtual void deleteAllCookies(WebCore::NetworkingContext*);
 
+    // WebCore::DatabaseStrategy
+    // - Using default implementation.
+
     // WebCore::PluginStrategy
     virtual void refreshPlugins();
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
index e737b02..82b2fbd 100644 (file)
@@ -1,3 +1,17 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * WebCoreSupport/PlatformStrategiesWinCE.cpp:
+        (PlatformStrategiesWinCE::createDatabaseStrategy):
+        * WebCoreSupport/PlatformStrategiesWinCE.h:
+        (PlatformStrategiesWinCE):
+
 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r137767.
index 51eda76..2885302 100644 (file)
@@ -49,6 +49,11 @@ CookiesStrategy* PlatformStrategiesWinCE::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* PlatformStrategiesWinCE::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* PlatformStrategiesWinCE::createLoaderStrategy()
 {
     return this;
index 306e569..ff5fa60 100644 (file)
 #define PlatformStrategiesWinCE_h
 
 #include "CookiesStrategy.h"
+#include "DatabaseStrategy.h"
 #include "LoaderStrategy.h"
 #include "PlatformStrategies.h"
 #include "PluginStrategy.h"
 #include "SharedWorkerStrategy.h"
 #include "VisitedLinkStrategy.h"
 
-class PlatformStrategiesWinCE : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class PlatformStrategiesWinCE : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
 
@@ -41,6 +42,7 @@ private:
 
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy();
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy();
     virtual WebCore::LoaderStrategy* createLoaderStrategy();
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
     virtual WebCore::PluginStrategy* createPluginStrategy();
@@ -59,6 +61,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname);
     virtual void deleteAllCookies(WebCore::NetworkingContext*);
 
+    // WebCore::DatabaseStrategy
+    // - Using default implementation.
+
     // WebCore::PluginStrategy
     virtual void refreshPlugins();
     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
index 6b8ad82..8b2a179 100644 (file)
@@ -52,6 +52,7 @@ set(WebKit2_INCLUDE_DIRECTORIES
     "${WEBCORE_DIR}/Modules/networkinfo"
     "${WEBCORE_DIR}/Modules/notifications"
     "${WEBCORE_DIR}/Modules/vibration"
+    "${WEBCORE_DIR}/Modules/webdatabase"
     "${WEBCORE_DIR}/accessibility"
     "${WEBCORE_DIR}/bindings/js"
     "${WEBCORE_DIR}/bindings"
index 4aa0613..bc989c4 100644 (file)
@@ -1,3 +1,20 @@
+2012-12-15  Mark Lam  <mark.lam@apple.com>
+
+        Re-landing patch for "Introducing the DatabaseStrategy and database servers".
+        https://bugs.webkit.org/show_bug.cgi?id=104934.
+
+        Not reviewed.
+
+        Merged from r137767. Previously reviewed by Sam Weinig.
+
+        * CMakeLists.txt:
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::WebPlatformStrategies::createDatabaseStrategy):
+        (WebKit):
+        (WebKit::WebPlatformStrategies::getDatabaseServer):
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
+        (WebPlatformStrategies):
+
 2012-12-14  Anders Carlsson  <andersca@apple.com>
 
         DownloadProxy objects should be message receivers
index 3ce2e8f..8083ba5 100644 (file)
@@ -76,6 +76,11 @@ CookiesStrategy* WebPlatformStrategies::createCookiesStrategy()
     return this;
 }
 
+DatabaseStrategy* WebPlatformStrategies::createDatabaseStrategy()
+{
+    return this;
+}
+
 LoaderStrategy* WebPlatformStrategies::createLoaderStrategy()
 {
     return this;
@@ -233,6 +238,13 @@ void WebPlatformStrategies::deleteAllCookies(NetworkingContext* context)
     WebCore::deleteAllCookies(context);
 }
 
+// DatabaseStrategy
+
+AbstractDatabaseServer* WebPlatformStrategies::getDatabaseServer()
+{
+    return DatabaseStrategy::getDatabaseServer(); // Use the default for now.
+}
+
 // LoaderStrategy
 
 #if ENABLE(NETWORK_PROCESS)
index 80acfe0..fe6138a 100644 (file)
@@ -29,6 +29,7 @@
 #if USE(PLATFORM_STRATEGIES)
 
 #include <WebCore/CookiesStrategy.h>
+#include <WebCore/DatabaseStrategy.h>
 #include <WebCore/LoaderStrategy.h>
 #include <WebCore/PasteboardStrategy.h>
 #include <WebCore/PlatformStrategies.h>
@@ -38,7 +39,7 @@
 
 namespace WebKit {
 
-class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::LoaderStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
+class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PasteboardStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::VisitedLinkStrategy {
 public:
     static void initialize();
     
@@ -47,6 +48,7 @@ private:
     
     // WebCore::PlatformStrategies
     virtual WebCore::CookiesStrategy* createCookiesStrategy() OVERRIDE;
+    virtual WebCore::DatabaseStrategy* createDatabaseStrategy() OVERRIDE;
     virtual WebCore::LoaderStrategy* createLoaderStrategy() OVERRIDE;
     virtual WebCore::PasteboardStrategy* createPasteboardStrategy() OVERRIDE;
     virtual WebCore::PluginStrategy* createPluginStrategy() OVERRIDE;
@@ -68,6 +70,9 @@ private:
     virtual void deleteCookiesForHostname(WebCore::NetworkingContext*, const String& hostname) OVERRIDE;
     virtual void deleteAllCookies(WebCore::NetworkingContext*) OVERRIDE;
 
+    // WebCore::DatabaseStrategy
+    virtual WebCore::AbstractDatabaseServer* getDatabaseServer() OVERRIDE;
+
     // WebCore::LoaderStrategy
 #if ENABLE(NETWORK_PROCESS)
     virtual WebCore::ResourceLoadScheduler* resourceLoadScheduler() OVERRIDE;