Title: [123315] trunk/Source/WebKit2
Revision
123315
Author
[email protected]
Date
2012-07-23 01:30:11 -0700 (Mon, 23 Jul 2012)

Log Message

[WK2] SQL Database cannot be disabled at build time
https://bugs.webkit.org/show_bug.cgi?id=91837

Patch by Thiago Marcos P. Santos <[email protected]> on 2012-07-23
Reviewed by Kenneth Rohde Christiansen.

WebKit2 had no #ifdefs for SQL Database. This patch adds these
statments and it can now be disabled at build time.

* Shared/OriginAndDatabases.cpp:
* Shared/OriginAndDatabases.h:
* Shared/WebCoreArgumentCoders.cpp:
(CoreIPC):
* UIProcess/API/C/WKContext.cpp:
(WKContextGetDatabaseManager):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetTypeID):
(WKDatabaseManagerGetOriginKey):
(WKDatabaseManagerGetOriginQuotaKey):
(WKDatabaseManagerGetOriginUsageKey):
(WKDatabaseManagerGetDatabaseDetailsKey):
(WKDatabaseManagerGetDatabaseDetailsNameKey):
(WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
(WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
(WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
(WKDatabaseManagerSetClient):
(WKDatabaseManagerGetDatabasesByOrigin):
(callGetDatabasesByOriginBlockAndDispose):
(WKDatabaseManagerGetDatabasesByOrigin_b):
(WKDatabaseManagerGetDatabaseOrigins):
(callGetDatabaseOriginsBlockBlockAndDispose):
(WKDatabaseManagerGetDatabaseOrigins_b):
(WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
(WKDatabaseManagerDeleteDatabasesForOrigin):
(WKDatabaseManagerDeleteAllDatabases):
(WKDatabaseManagerSetQuotaForOrigin):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::shouldTerminate):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::didReceiveMessage):
* UIProcess/WebContext.h:
(WebContext):
* UIProcess/WebDatabaseManagerProxy.cpp:
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.messages.in:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearAllDatabases):
(WebKit::InjectedBundle::setDatabaseQuota):
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
* WebProcess/WebCoreSupport/WebDatabaseManager.h:
* WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessage):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (123314 => 123315)


--- trunk/Source/WebKit2/ChangeLog	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/ChangeLog	2012-07-23 08:30:11 UTC (rev 123315)
@@ -1,3 +1,60 @@
+2012-07-23  Thiago Marcos P. Santos  <[email protected]>
+
+        [WK2] SQL Database cannot be disabled at build time
+        https://bugs.webkit.org/show_bug.cgi?id=91837
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        WebKit2 had no #ifdefs for SQL Database. This patch adds these
+        statments and it can now be disabled at build time.
+
+        * Shared/OriginAndDatabases.cpp:
+        * Shared/OriginAndDatabases.h:
+        * Shared/WebCoreArgumentCoders.cpp:
+        (CoreIPC):
+        * UIProcess/API/C/WKContext.cpp:
+        (WKContextGetDatabaseManager):
+        * UIProcess/API/C/WKDatabaseManager.cpp:
+        (WKDatabaseManagerGetTypeID):
+        (WKDatabaseManagerGetOriginKey):
+        (WKDatabaseManagerGetOriginQuotaKey):
+        (WKDatabaseManagerGetOriginUsageKey):
+        (WKDatabaseManagerGetDatabaseDetailsKey):
+        (WKDatabaseManagerGetDatabaseDetailsNameKey):
+        (WKDatabaseManagerGetDatabaseDetailsDisplayNameKey):
+        (WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey):
+        (WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey):
+        (WKDatabaseManagerSetClient):
+        (WKDatabaseManagerGetDatabasesByOrigin):
+        (callGetDatabasesByOriginBlockAndDispose):
+        (WKDatabaseManagerGetDatabasesByOrigin_b):
+        (WKDatabaseManagerGetDatabaseOrigins):
+        (callGetDatabaseOriginsBlockBlockAndDispose):
+        (WKDatabaseManagerGetDatabaseOrigins_b):
+        (WKDatabaseManagerDeleteDatabasesWithNameForOrigin):
+        (WKDatabaseManagerDeleteDatabasesForOrigin):
+        (WKDatabaseManagerDeleteAllDatabases):
+        (WKDatabaseManagerSetQuotaForOrigin):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::WebContext):
+        (WebKit::WebContext::~WebContext):
+        (WebKit::WebContext::shouldTerminate):
+        (WebKit::WebContext::disconnectProcess):
+        (WebKit::WebContext::didReceiveMessage):
+        * UIProcess/WebContext.h:
+        (WebContext):
+        * UIProcess/WebDatabaseManagerProxy.cpp:
+        * UIProcess/WebDatabaseManagerProxy.h:
+        * UIProcess/WebDatabaseManagerProxy.messages.in:
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::clearAllDatabases):
+        (WebKit::InjectedBundle::setDatabaseQuota):
+        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
+        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
+        * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::didReceiveMessage):
+
 2012-07-23  Kent Tamura  <[email protected]>
 
         Rename ENABLE_METER_TAG and ENABLE_PROGRESS_TAG to ENABLE_METER_ELEMENT and ENABLE_PROGRESS_ELEMENT respectively

Modified: trunk/Source/WebKit2/Shared/OriginAndDatabases.cpp (123314 => 123315)


--- trunk/Source/WebKit2/Shared/OriginAndDatabases.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/Shared/OriginAndDatabases.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "OriginAndDatabases.h"
 
+#if ENABLE(SQL_DATABASE)
+
 #include "WebCoreArgumentCoders.h"
 
 using namespace WebCore;
@@ -55,3 +57,5 @@
 }
 
 } // namespace WebKit
+
+#endif // ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebKit2/Shared/OriginAndDatabases.h (123314 => 123315)


--- trunk/Source/WebKit2/Shared/OriginAndDatabases.h	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/Shared/OriginAndDatabases.h	2012-07-23 08:30:11 UTC (rev 123315)
@@ -26,6 +26,8 @@
 #ifndef OriginAndDatabases_h
 #define OriginAndDatabases_h
 
+#if ENABLE(SQL_DATABASE)
+
 #include <WebCore/DatabaseDetails.h>
 #include <wtf/Vector.h>
 #include <wtf/text/WTFString.h>
@@ -49,4 +51,6 @@
 
 } // namespace WebKit
 
+#endif // ENABLE(SQL_DATABASE)
+
 #endif // OriginAndDatabases_h

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (123314 => 123315)


--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -495,7 +495,7 @@
     return true;
 }
 
-
+#if ENABLE(SQL_DATABASE)
 void ArgumentCoder<DatabaseDetails>::encode(ArgumentEncoder* encoder, const DatabaseDetails& details)
 {
     encoder->encode(details.name());
@@ -525,6 +525,7 @@
     details = DatabaseDetails(name, displayName, expectedUsage, currentUsage);
     return true;
 }
+#endif
 
 void ArgumentCoder<DictationAlternative>::encode(ArgumentEncoder* encoder, const DictationAlternative& dictationAlternative)
 {

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -181,7 +181,11 @@
 
 WKDatabaseManagerRef WKContextGetDatabaseManager(WKContextRef contextRef)
 {
+#if ENABLE(SQL_DATABASE)
     return toAPI(toImpl(contextRef)->databaseManagerProxy());
+#else
+    return 0;
+#endif
 }
 
 WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef contextRef)

Modified: trunk/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKDatabaseManager.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -37,118 +37,176 @@
 
 WKTypeID WKDatabaseManagerGetTypeID()
 {
+#if ENABLE(SQL_DATABASE)
     return toAPI(WebDatabaseManagerProxy::APIType);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetOriginKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::originKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetOriginQuotaKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::originQuotaKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetOriginUsageKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::originUsageKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetDatabaseDetailsKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::databaseDetailsKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetDatabaseDetailsNameKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::databaseDetailsNameKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetDatabaseDetailsDisplayNameKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::databaseDetailsDisplayNameKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetDatabaseDetailsExpectedUsageKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::databaseDetailsExpectedUsageKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 WKStringRef WKDatabaseManagerGetDatabaseDetailsCurrentUsageKey()
 {
+#if ENABLE(SQL_DATABASE)
     static WebString* key = WebString::create(WebDatabaseManagerProxy::databaseDetailsCurrentUsageKey()).leakRef();
     return toAPI(key);
+#else
+    return 0;
+#endif
 }
 
 void WKDatabaseManagerSetClient(WKDatabaseManagerRef databaseManagerRef, const WKDatabaseManagerClient* wkClient)
 {
+#if ENABLE(SQL_DATABASE)
     if (wkClient && wkClient->version)
         return;
     toImpl(databaseManagerRef)->initializeClient(wkClient);
+#endif
 }
 
 void WKDatabaseManagerGetDatabasesByOrigin(WKDatabaseManagerRef databaseManagerRef, void* context, WKDatabaseManagerGetDatabasesByOriginFunction callback)
 {
+#if ENABLE(SQL_DATABASE)
     toImpl(databaseManagerRef)->getDatabasesByOrigin(ArrayCallback::create(context, callback));
+#endif
 }
 
 #ifdef __BLOCKS__
 static void callGetDatabasesByOriginBlockAndDispose(WKArrayRef resultValue, WKErrorRef errorRef, void* context)
 {
+#if ENABLE(SQL_DATABASE)
     WKDatabaseManagerGetDatabasesByOriginBlock block = (WKDatabaseManagerGetDatabasesByOriginBlock)context;
     block(resultValue, errorRef);
     Block_release(block);
+#endif
 }
 
 void WKDatabaseManagerGetDatabasesByOrigin_b(WKDatabaseManagerRef databaseManagerRef, WKDatabaseManagerGetDatabasesByOriginBlock block)
 {
+#if ENABLE(SQL_DATABASE)
     WKDatabaseManagerGetDatabasesByOrigin(databaseManagerRef, Block_copy(block), callGetDatabasesByOriginBlockAndDispose);
+#endif
 }
-#endif
+#endif // __BLOCKS__
 
 void WKDatabaseManagerGetDatabaseOrigins(WKDatabaseManagerRef databaseManagerRef, void* context, WKDatabaseManagerGetDatabaseOriginsFunction callback)
 {
+#if ENABLE(SQL_DATABASE)
     toImpl(databaseManagerRef)->getDatabaseOrigins(ArrayCallback::create(context, callback));
+#endif
 }
 
 #ifdef __BLOCKS__
 static void callGetDatabaseOriginsBlockBlockAndDispose(WKArrayRef resultValue, WKErrorRef errorRef, void* context)
 {
+#if ENABLE(SQL_DATABASE)
     WKDatabaseManagerGetDatabaseOriginsBlock block = (WKDatabaseManagerGetDatabaseOriginsBlock)context;
     block(resultValue, errorRef);
     Block_release(block);
+#endif
 }
 
 void WKDatabaseManagerGetDatabaseOrigins_b(WKDatabaseManagerRef databaseManagerRef, WKDatabaseManagerGetDatabaseOriginsBlock block)
 {
+#if ENABLE(SQL_DATABASE)
     WKDatabaseManagerGetDatabaseOrigins(databaseManagerRef, Block_copy(block), callGetDatabaseOriginsBlockBlockAndDispose);
+#endif
 }
-#endif
+#endif // __BLOCKS__
 
 void WKDatabaseManagerDeleteDatabasesWithNameForOrigin(WKDatabaseManagerRef databaseManagerRef, WKStringRef databaseNameRef, WKSecurityOriginRef originRef)
 {
+#if ENABLE(SQL_DATABASE)
     toImpl(databaseManagerRef)->deleteDatabaseWithNameForOrigin(toWTFString(databaseNameRef), toImpl(originRef));
+#endif
 }
 
 void WKDatabaseManagerDeleteDatabasesForOrigin(WKDatabaseManagerRef databaseManagerRef, WKSecurityOriginRef originRef)
 {
+#if ENABLE(SQL_DATABASE)
     toImpl(databaseManagerRef)->deleteDatabasesForOrigin(toImpl(originRef));
+#endif
 }
 
 void WKDatabaseManagerDeleteAllDatabases(WKDatabaseManagerRef databaseManagerRef)
 {
+#if ENABLE(SQL_DATABASE)
     toImpl(databaseManagerRef)->deleteAllDatabases();
+#endif
 }
 
 void WKDatabaseManagerSetQuotaForOrigin(WKDatabaseManagerRef databaseManagerRef, WKSecurityOriginRef originRef, uint64_t quota)
 {
+#if ENABLE(SQL_DATABASE)
     toImpl(databaseManagerRef)->setQuotaForOrigin(toImpl(originRef), quota);
+#endif
 }

Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/WebContext.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -146,7 +146,9 @@
     , m_batteryManagerProxy(WebBatteryManagerProxy::create(this))
 #endif
     , m_cookieManagerProxy(WebCookieManagerProxy::create(this))
+#if ENABLE(SQL_DATABASE)
     , m_databaseManagerProxy(WebDatabaseManagerProxy::create(this))
+#endif
     , m_geolocationManagerProxy(WebGeolocationManagerProxy::create(this))
     , m_iconDatabase(WebIconDatabase::create(this))
     , m_keyValueStorageManagerProxy(WebKeyValueStorageManagerProxy::create(this))
@@ -210,8 +212,10 @@
     m_cookieManagerProxy->invalidate();
     m_cookieManagerProxy->clearContext();
 
+#if ENABLE(SQL_DATABASE)
     m_databaseManagerProxy->invalidate();
     m_databaseManagerProxy->clearContext();
+#endif
     
     m_geolocationManagerProxy->invalidate();
     m_geolocationManagerProxy->clearContext();
@@ -381,8 +385,10 @@
         return false;
     if (!m_cookieManagerProxy->shouldTerminate(process))
         return false;
+#if ENABLE(SQL_DATABASE)
     if (!m_databaseManagerProxy->shouldTerminate(process))
         return false;
+#endif
     if (!m_keyValueStorageManagerProxy->shouldTerminate(process))
         return false;
     if (!m_mediaCacheManagerProxy->shouldTerminate(process))
@@ -438,7 +444,9 @@
     m_batteryManagerProxy->invalidate();
 #endif
     m_cookieManagerProxy->invalidate();
+#if ENABLE(SQL_DATABASE)
     m_databaseManagerProxy->invalidate();
+#endif
     m_geolocationManagerProxy->invalidate();
     m_keyValueStorageManagerProxy->invalidate();
     m_mediaCacheManagerProxy->invalidate();
@@ -788,10 +796,12 @@
         return;
     }
 
+#if ENABLE(SQL_DATABASE)
     if (messageID.is<CoreIPC::MessageClassWebDatabaseManagerProxy>()) {
         m_databaseManagerProxy->didReceiveWebDatabaseManagerProxyMessage(connection, messageID, arguments);
         return;
     }
+#endif
 
     if (messageID.is<CoreIPC::MessageClassWebGeolocationManagerProxy>()) {
         m_geolocationManagerProxy->didReceiveMessage(connection, messageID, arguments);

Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/WebContext.h	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h	2012-07-23 08:30:11 UTC (rev 123315)
@@ -167,7 +167,9 @@
     WebBatteryManagerProxy* batteryManagerProxy() const { return m_batteryManagerProxy.get(); }
 #endif
     WebCookieManagerProxy* cookieManagerProxy() const { return m_cookieManagerProxy.get(); }
+#if ENABLE(SQL_DATABASE)
     WebDatabaseManagerProxy* databaseManagerProxy() const { return m_databaseManagerProxy.get(); }
+#endif
     WebGeolocationManagerProxy* geolocationManagerProxy() const { return m_geolocationManagerProxy.get(); }
     WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
     WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
@@ -321,7 +323,9 @@
     RefPtr<WebBatteryManagerProxy> m_batteryManagerProxy;
 #endif
     RefPtr<WebCookieManagerProxy> m_cookieManagerProxy;
+#if ENABLE(SQL_DATABASE)
     RefPtr<WebDatabaseManagerProxy> m_databaseManagerProxy;
+#endif
     RefPtr<WebGeolocationManagerProxy> m_geolocationManagerProxy;
     RefPtr<WebIconDatabase> m_iconDatabase;
     RefPtr<WebKeyValueStorageManagerProxy> m_keyValueStorageManagerProxy;

Modified: trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "WebDatabaseManagerProxy.h"
 
+#if ENABLE(SQL_DATABASE)
+
 #include "ImmutableArray.h"
 #include "ImmutableDictionary.h"
 #include "WebDatabaseManagerMessages.h"
@@ -231,3 +233,4 @@
 
 } // namespace WebKit
 
+#endif // ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h	2012-07-23 08:30:11 UTC (rev 123315)
@@ -26,6 +26,8 @@
 #ifndef WebDatabaseManagerProxy_h
 #define WebDatabaseManagerProxy_h
 
+#if ENABLE(SQL_DATABASE)
+
 #include "APIObject.h"
 #include "Arguments.h"
 #include "GenericCallback.h"
@@ -99,4 +101,6 @@
 
 } // namespace WebKit
 
+#endif // ENABLE(SQL_DATABASE)
+
 #endif // DatabaseManagerProxy_h

Modified: trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.messages.in (123314 => 123315)


--- trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.messages.in	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.messages.in	2012-07-23 08:30:11 UTC (rev 123315)
@@ -20,9 +20,13 @@
 # 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.
 
+#if ENABLE(SQL_DATABASE)
+
 messages -> WebDatabaseManagerProxy {
     DidGetDatabasesByOrigin(Vector<WebKit::OriginAndDatabases> originAndDatabases, uint64_t callbackID);
     DidGetDatabaseOrigins(Vector<WTF::String> originIdentifiers, uint64_t callbackID)
     DidModifyOrigin(WTF::String originIdentifier)
     DidModifyDatabase(WTF::String originIdentifier, WTF::String databaseIdentifier)
 }
+
+#endif // ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (123314 => 123315)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -263,12 +263,16 @@
 
 void InjectedBundle::clearAllDatabases()
 {
+#if ENABLE(SQL_DATABASE)
     WebDatabaseManager::shared().deleteAllDatabases();
+#endif
 }
 
 void InjectedBundle::setDatabaseQuota(uint64_t quota)
 {
+#if ENABLE(SQL_DATABASE)
     WebDatabaseManager::shared().setQuotaForOrigin("file:///", quota);
+#endif
 }
 
 void InjectedBundle::clearApplicationCache()

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp (123314 => 123315)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "WebDatabaseManager.h"
 
+#if ENABLE(SQL_DATABASE)
+
 #include "Connection.h"
 #include "MessageID.h"
 #include "OriginAndDatabases.h"
@@ -181,3 +183,5 @@
 }
 
 } // namespace WebKit
+
+#endif // ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h (123314 => 123315)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.h	2012-07-23 08:30:11 UTC (rev 123315)
@@ -26,6 +26,8 @@
 #ifndef WebDatabaseManager_h
 #define WebDatabaseManager_h
 
+#if ENABLE(SQL_DATABASE)
+
 #include "Arguments.h"
 #include <WebCore/DatabaseTrackerClient.h>
 #include <wtf/Noncopyable.h>
@@ -70,4 +72,6 @@
 
 } // namespace WebKit
 
+#endif // ENABLE(SQL_DATABASE)
+
 #endif // WebDatabaseManager_h

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.messages.in (123314 => 123315)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.messages.in	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDatabaseManager.messages.in	2012-07-23 08:30:11 UTC (rev 123315)
@@ -20,6 +20,8 @@
 # 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.
 
+#if ENABLE(SQL_DATABASE)
+
 messages -> WebDatabaseManager {
     void GetDatabasesByOrigin(uint64_t callbackID)
     void GetDatabaseOrigins(uint64_t callbackID)
@@ -28,3 +30,5 @@
     void DeleteAllDatabases()
     void SetQuotaForOrigin(WTF::String originIdentifier, uint64_t quota)
 }
+
+#endif // ENABLE(SQL_DATABASE)

Modified: trunk/Source/WebKit2/WebProcess/WebProcess.cpp (123314 => 123315)


--- trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-07-23 08:24:22 UTC (rev 123314)
+++ trunk/Source/WebKit2/WebProcess/WebProcess.cpp	2012-07-23 08:30:11 UTC (rev 123315)
@@ -633,10 +633,12 @@
         return;
     }
 
+#if ENABLE(SQL_DATABASE)
     if (messageID.is<CoreIPC::MessageClassWebDatabaseManager>()) {
         WebDatabaseManager::shared().didReceiveMessage(connection, messageID, arguments);
         return;
     }
+#endif
 
     if (messageID.is<CoreIPC::MessageClassWebGeolocationManager>()) {
         m_geolocationManager.didReceiveMessage(connection, messageID, arguments);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to