Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
authordumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jun 2010 09:16:22 +0000 (09:16 +0000)
committerdumi@chromium.org <dumi@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jun 2010 09:16:22 +0000 (09:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=39041

Reviewed by Adam Barth.

WebCore:

* WebCore.base.exp
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
(WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::openDatabase):
* storage/AbstractDatabase.cpp:
(WebCore::AbstractDatabase::isAvailable):
(WebCore::AbstractDatabase::setIsAvailable):
* storage/AbstractDatabase.h:
* storage/Database.cpp:
* storage/Database.h:
* storage/DatabaseSync.cpp:
* storage/DatabaseSync.h:
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::openDatabase):
(WebCore::WorkerContext::openDatabaseSync):
* workers/WorkerContext.h:

WebKit/chromium:

* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableDatabase):
(WebKit::WebRuntimeFeatures::isDatabaseEnabled):

WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):
(webkit_get_cache_model):

WebKit/mac:

* WebView/WebView.mm:
(-[WebView _preferencesChangedNotification:]):

WebKit/qt:

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):

WebKit/win:

* WebView.cpp:
(WebView::notifyPreferencesChanged):

WebKit/wx:

* WebView.cpp:
(wxWebView::SetDatabasesEnabled):
(wxWebView::AreDatabasesEnabled):

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

25 files changed:
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
WebCore/bindings/js/JSWorkerContextCustom.cpp
WebCore/page/DOMWindow.cpp
WebCore/storage/AbstractDatabase.cpp
WebCore/storage/AbstractDatabase.h
WebCore/storage/Database.cpp
WebCore/storage/Database.h
WebCore/storage/DatabaseSync.cpp
WebCore/storage/DatabaseSync.h
WebCore/workers/WorkerContext.cpp
WebCore/workers/WorkerContext.h
WebKit/chromium/ChangeLog
WebKit/chromium/src/WebRuntimeFeatures.cpp
WebKit/gtk/ChangeLog
WebKit/gtk/webkit/webkitwebview.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm
WebKit/qt/Api/qwebsettings.cpp
WebKit/qt/ChangeLog
WebKit/win/ChangeLog
WebKit/win/WebView.cpp
WebKit/wx/ChangeLog
WebKit/wx/WebView.cpp

index 41e7f6ac5297957c79150268117ff141fa3b0351..bbff83f93a562e8f86f363dea79d609a2444a00a 100644 (file)
@@ -1,3 +1,29 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * WebCore.base.exp
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
+        (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::openDatabase):
+        * storage/AbstractDatabase.cpp:
+        (WebCore::AbstractDatabase::isAvailable):
+        (WebCore::AbstractDatabase::setIsAvailable):
+        * storage/AbstractDatabase.h:
+        * storage/Database.cpp:
+        * storage/Database.h:
+        * storage/DatabaseSync.cpp:
+        * storage/DatabaseSync.h:
+        * workers/WorkerContext.cpp:
+        (WebCore::WorkerContext::openDatabase):
+        (WebCore::WorkerContext::openDatabaseSync):
+        * workers/WorkerContext.h:
+
 2010-06-18  Adam Barth  <abarth@webkit.org>
 
         Rubber-stamped by Eric Seidel.
index 2d4ca68c4dded2d948af48ac2a381d934fdb8001..e65a029c5a382ffc01aff1df81684e1b4d75b6a4 100644 (file)
@@ -374,6 +374,7 @@ __ZN7WebCore15StringTruncator5widthERKNS_6StringERKNS_4FontEb
 __ZN7WebCore15VisiblePositionC1EPNS_4NodeEiNS_9EAffinityE
 __ZN7WebCore15VisiblePositionC1ERKNS_8PositionENS_9EAffinityE
 __ZN7WebCore15reportExceptionEPN3JSC9ExecStateENS0_7JSValueE
+__ZN7WebCore16AbstractDatabase14setIsAvailableEb
 __ZN7WebCore16FontFallbackList15releaseFontDataEv
 __ZN7WebCore16FontPlatformDataC1EP6NSFontbb
 __ZN7WebCore16FontPlatformDataD1Ev
@@ -616,7 +617,6 @@ __ZN7WebCore7IntRectC1ERKNS_9FloatRectE
 __ZN7WebCore7IntSizeC1ERK7_NSSize
 __ZN7WebCore7cookiesEPKNS_8DocumentERKNS_4KURLE
 __ZN7WebCore7nsColorERKNS_5ColorE
-__ZN7WebCore8Database14setIsAvailableEb
 __ZN7WebCore8Document11createRangeEv
 __ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE
 __ZN7WebCore8Document13svgExtensionsEv
index a3e488e09c872809e1211a2709c9397f0342c7dc..93ce1eea0ca946ca9245aea80163be30aeeffd5a 100644 (file)
@@ -31,8 +31,7 @@
 #include "config.h"
 #include "RuntimeEnabledFeatures.h"
 
-#include "Database.h"
-#include "DatabaseSync.h"
+#include "AbstractDatabase.h"
 #include "MediaPlayer.h"
 #include "SharedWorkerRepository.h"
 #include "WebSocket.h"
@@ -95,12 +94,12 @@ bool RuntimeEnabledFeatures::webSocketEnabled()
 #if ENABLE(DATABASE)
 bool RuntimeEnabledFeatures::openDatabaseEnabled()
 {
-    return Database::isAvailable();
+    return AbstractDatabase::isAvailable();
 }
 
 bool RuntimeEnabledFeatures::openDatabaseSyncEnabled()
 {
-    return DatabaseSync::isAvailable();
+    return AbstractDatabase::isAvailable();
 }
 #endif
 
index 8995dd60969e1e42288f141d9353ed94348c8eaa..b443f90432aa0e94b3cef15ae2d600a8a6e4207f 100644 (file)
@@ -31,6 +31,7 @@
 
 #if ENABLE(DATABASE)
 #include "Database.h"
+#include "DatabaseSync.h"
 #include "JSDatabase.h"
 #include "JSDatabaseCallback.h"
 #include "JSDatabaseSync.h"
index 04a62bd25f090fa8cbab7acf80ee9222ffd5d2e3..fbccddfbdabce6df030b294ec03bc046772ab42b 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "DOMWindow.h"
 
+#include "AbstractDatabase.h"
 #include "Base64.h"
 #include "BarInfo.h"
 #include "BeforeUnloadEvent.h"
@@ -1224,7 +1225,7 @@ double DOMWindow::devicePixelRatio() const
 PassRefPtr<Database> DOMWindow::openDatabase(const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
 {
     RefPtr<Database> database = 0;
-    if (m_frame && Database::isAvailable() && m_frame->document()->securityOrigin()->canAccessDatabase())
+    if (m_frame && AbstractDatabase::isAvailable() && m_frame->document()->securityOrigin()->canAccessDatabase())
         database = Database::openDatabase(m_frame->document(), name, version, displayName, estimatedSize, creationCallback, ec);
 
     if (!database && !ec)
index 49f5bc34e2de1cf39533642ec74e8c9b63c167f1..dc3e8e247e030f23d1279800090ba397bf362f74 100644 (file)
 
 namespace WebCore {
 
+static bool isDatabaseAvailable = true;
+
+bool AbstractDatabase::isAvailable()
+{
+    return isDatabaseAvailable;
+}
+
+void AbstractDatabase::setIsAvailable(bool available)
+{
+    isDatabaseAvailable = available;
+}
+
 AbstractDatabase::~AbstractDatabase()
 {
 }
index e9502ccf1d44dc159d8ab7e4ddc0000b6babd65a..5e4e0fa51d65b09492178c98c8a5b265f35b9abe 100644 (file)
@@ -41,6 +41,9 @@ class SecurityOrigin;
 
 class AbstractDatabase : public ThreadSafeShared<AbstractDatabase> {
 public:
+    static bool isAvailable();
+    static void setIsAvailable(bool available);
+
     virtual ~AbstractDatabase();
 
     virtual ScriptExecutionContext* scriptExecutionContext() const = 0;
index dbafa1bf0e4ff31a8ea50038752a6caa4d3d598d..ad6b92c9b799e620332a391901a2ed6a87e9429f 100644 (file)
@@ -73,18 +73,6 @@ const String& Database::databaseInfoTableName()
     return name;
 }
 
-static bool isDatabaseAvailable = true;
-
-void Database::setIsAvailable(bool available)
-{
-    isDatabaseAvailable = available;
-}
-
-bool Database::isAvailable()
-{
-    return isDatabaseAvailable;
-}
-
 static Mutex& guidMutex()
 {
     // Note: We don't have to use AtomicallyInitializedStatic here because
index 7dd3428190f1162203d29399e485f6f3e6e67120..495f98fe39fa1c9aa5fa950221f96d4d381e84f2 100644 (file)
@@ -58,9 +58,6 @@ typedef int ExceptionCode;
 
 class Database : public AbstractDatabase {
 public:
-    static void setIsAvailable(bool);
-    static bool isAvailable();
-
     virtual ~Database();
 
     // Direct support for the DOM API
index 224a75da187ed4d45ed33d1bd9ec1a343c0044d1..0d3bed55eeb299a23569cae2b2952929a7ca89e8 100644 (file)
@@ -46,18 +46,6 @@ const String& DatabaseSync::databaseInfoTableName()
     return name;
 }
 
-static bool isSyncDatabaseAvailable = true;
-
-void DatabaseSync::setIsAvailable(bool available)
-{
-    isSyncDatabaseAvailable = available;
-}
-
-bool DatabaseSync::isAvailable()
-{
-    return isSyncDatabaseAvailable;
-}
-
 PassRefPtr<DatabaseSync> DatabaseSync::openDatabaseSync(ScriptExecutionContext*, const String&, const String&, const String&,
                                                         unsigned long, PassRefPtr<DatabaseCallback>, ExceptionCode& ec)
 {
@@ -110,4 +98,3 @@ ScriptExecutionContext* DatabaseSync::scriptExecutionContext() const
 } // namespace WebCore
 
 #endif // ENABLE(DATABASE)
-
index 4b9985c35c7e199d7e69ebd21c63d8a52cccb411..321b6207ba3b5a36fdf958ea434ca1a0f306c8ed 100644 (file)
@@ -44,9 +44,6 @@ typedef int ExceptionCode;
 // Instances of this class should be created and used only on the worker's context thread.
 class DatabaseSync : public RefCounted<DatabaseSync> {
 public:
-    static void setIsAvailable(bool);
-    static bool isAvailable();
-
     ~DatabaseSync();
 
     // Direct support for the DOM API
index bf893d2d45c428182cab35500ee65defa9d01e1a..c710ba61a79c585284e24618993e4a976a369183 100644 (file)
 
 #include "WorkerContext.h"
 
+#include "AbstractDatabase.h"
 #include "ActiveDOMObject.h"
+#include "Database.h"
+#include "DatabaseCallback.h"
+#include "DatabaseSync.h"
 #include "DatabaseTracker.h"
 #include "DOMTimer.h"
 #include "DOMWindow.h"
-#include "Database.h"
 #include "ErrorEvent.h"
 #include "Event.h"
 #include "EventException.h"
@@ -271,7 +274,7 @@ NotificationCenter* WorkerContext::webkitNotifications() const
 #if ENABLE(DATABASE)
 PassRefPtr<Database> WorkerContext::openDatabase(const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
 {
-    if (!securityOrigin()->canAccessDatabase() || !Database::isAvailable()) {
+    if (!securityOrigin()->canAccessDatabase() || !AbstractDatabase::isAvailable()) {
         ec = SECURITY_ERR;
         return 0;
     }
@@ -290,15 +293,11 @@ void WorkerContext::databaseExceededQuota(const String&)
 
 PassRefPtr<DatabaseSync> WorkerContext::openDatabaseSync(const String& name, const String& version, const String& displayName, unsigned long estimatedSize, PassRefPtr<DatabaseCallback> creationCallback, ExceptionCode& ec)
 {
-    if (!securityOrigin()->canAccessDatabase()) {
+    if (!securityOrigin()->canAccessDatabase() || !AbstractDatabase::isAvailable()) {
         ec = SECURITY_ERR;
         return 0;
     }
 
-    ASSERT(DatabaseSync::isAvailable());
-    if (!DatabaseSync::isAvailable())
-        return 0;
-
     return DatabaseSync::openDatabaseSync(this, name, version, displayName, estimatedSize, creationCallback, ec);
 }
 #endif
index d05329e4ff47fe3acd933d2d9187d68c714cfe58..4091db1b31f0c374f2d2b52155f51dafa1d39f27 100644 (file)
@@ -30,9 +30,6 @@
 #if ENABLE(WORKERS)
 
 #include "AtomicStringHash.h"
-#include "Database.h"
-#include "DatabaseSync.h"
-#include "DatabaseCallback.h"
 #include "EventListener.h"
 #include "EventNames.h"
 #include "EventTarget.h"
@@ -47,6 +44,8 @@
 namespace WebCore {
 
     class Database;
+    class DatabaseCallback;
+    class DatabaseSync;
     class NotificationCenter;
     class ScheduledAction;
     class WorkerLocation;
index 86e2abe0c29b4cb0478123a42731e77fdaa9868a..7f860138834b232dec1bf8a40c3e4bc05081a378 100644 (file)
@@ -1,3 +1,14 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enableDatabase):
+        (WebKit::WebRuntimeFeatures::isDatabaseEnabled):
+
 2010-06-17  Tony Chang  <tony@chromium.org>
 
         Reviewed by Kent Tamura.
index 8e73d6f1398afa06f9577f7ce8916776c0a554ba..595a47f47a5c508992550870e51af65919d2addb 100644 (file)
@@ -31,7 +31,7 @@
 #include "config.h"
 #include "WebRuntimeFeatures.h"
 
-#include "Database.h"
+#include "AbstractDatabase.h"
 #include "RuntimeEnabledFeatures.h"
 #include "WebMediaPlayerClientImpl.h"
 #include "WebSocket.h"
@@ -43,14 +43,14 @@ namespace WebKit {
 void WebRuntimeFeatures::enableDatabase(bool enable)
 {
 #if ENABLE(DATABASE)
-    Database::setIsAvailable(enable);
+    AbstractDatabase::setIsAvailable(enable);
 #endif
 }
 
 bool WebRuntimeFeatures::isDatabaseEnabled()
 {
 #if ENABLE(DATABASE)
-    return Database::isAvailable();
+    return AbstractDatabase::isAvailable();
 #else
     return false;
 #endif
index f9fb2505838f37fbe9caf8d103524adefdced6b6..2e2345dfa6381f1d4fa584fd535b3695c179cc51 100644 (file)
@@ -1,3 +1,15 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_update_settings):
+        (webkit_web_view_settings_notify):
+        (webkit_get_cache_model):
+
 2010-06-16  Martin Robinson  <mrobinson@igalia.com>
 
         Reviewed by Gustavo Noronha Silva.
index f33e5b32b47ae23dd27fb8003cf776599d707762..ce2bbc6f42ddbf5dc4e7d5061d20c97da4ecc307 100644 (file)
@@ -41,6 +41,7 @@
 #include "webkitwebhistoryitem.h"
 
 #include "AXObjectCache.h"
+#include "AbstractDatabase.h"
 #include "BackForwardList.h"
 #include "Cache.h"
 #include "ChromeClientGtk.h"
@@ -49,7 +50,6 @@
 #include "ContextMenuController.h"
 #include "ContextMenu.h"
 #include "Cursor.h"
-#include "Database.h"
 #include "Document.h"
 #include "DocumentLoader.h"
 #include "DragClientGtk.h"
@@ -2754,7 +2754,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
     settings->setPrivateBrowsingEnabled(enablePrivateBrowsing);
     settings->setCaretBrowsingEnabled(enableCaretBrowsing);
 #if ENABLE(DATABASE)
-    Database::setIsAvailable(enableHTML5Database);
+    AbstractDatabase::setIsAvailable(enableHTML5Database);
 #endif
     settings->setLocalStorageEnabled(enableHTML5LocalStorage);
     settings->setXSSAuditorEnabled(enableXSSAuditor);
@@ -2847,7 +2847,7 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
         settings->setCaretBrowsingEnabled(g_value_get_boolean(&value));
 #if ENABLE(DATABASE)
     else if (name == g_intern_string("enable-html5-database")) {
-        Database::setIsAvailable(g_value_get_boolean(&value));
+        AbstractDatabase::setIsAvailable(g_value_get_boolean(&value));
     }
 #endif
     else if (name == g_intern_string("enable-html5-local-storage"))
@@ -4478,4 +4478,3 @@ WebKitCacheModel webkit_get_cache_model()
     webkit_init();
     return cacheModel;
 }
-
index 217cf09b305142f670f5ede9b6511ba30608b637..1a0f1b04d00c948a01fa99fe33bc5c07c8e8d7c1 100644 (file)
@@ -1,3 +1,13 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * WebView/WebView.mm:
+        (-[WebView _preferencesChangedNotification:]):
+
 2010-06-17  Darin Adler  <darin@apple.com>
 
         Reviewed by Sam Weinig.
index 10ed5cff02a3732a42afbf93414761d58ba51fe8..436dc3cc6bee249928fcc9d9b4e92e9dc11f6be1 100644 (file)
 #import <Foundation/NSURLConnection.h>
 #import <JavaScriptCore/APICast.h>
 #import <JavaScriptCore/JSValueRef.h>
+#import <WebCore/AbstractDatabase.h>
 #import <WebCore/ApplicationCacheStorage.h>
 #import <WebCore/BackForwardList.h>
 #import <WebCore/Cache.h>
 #import <WebCore/ColorMac.h>
 #import <WebCore/CSSComputedStyleDeclaration.h>
 #import <WebCore/Cursor.h>
-#import <WebCore/Database.h>
 #import <WebCore/Document.h>
 #import <WebCore/DocumentLoader.h>
 #import <WebCore/DragController.h>
@@ -1357,7 +1357,7 @@ static bool fastDocumentTeardownEnabled()
     settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
     settings->setPluginsEnabled([preferences arePlugInsEnabled]);
 #if ENABLE(DATABASE)
-    Database::setIsAvailable([preferences databasesEnabled]);
+    AbstractDatabase::setIsAvailable([preferences databasesEnabled]);
 #endif
     settings->setLocalStorageEnabled([preferences localStorageEnabled]);
     settings->setExperimentalNotificationsEnabled([preferences experimentalNotificationsEnabled]);
index 4881bac2bfa66e71160affe355edf78f936b8df0..b2766a730df52b8708435c3704e8c442203728d6 100644 (file)
@@ -24,9 +24,9 @@
 #include "qwebpage_p.h"
 #include "qwebplugindatabase_p.h"
 
+#include "AbstractDatabase.h"
 #include "Cache.h"
 #include "CrossOriginPreflightResultCache.h"
-#include "Database.h"
 #include "FontCache.h"
 #include "Page.h"
 #include "PageCache.h"
@@ -217,7 +217,7 @@ void QWebSettingsPrivate::apply()
 #if ENABLE(DATABASE)
         value = attributes.value(QWebSettings::OfflineStorageDatabaseEnabled,
                                       global->attributes.value(QWebSettings::OfflineStorageDatabaseEnabled));
-        WebCore::Database::setIsAvailable(value);
+        WebCore::AbstractDatabase::setIsAvailable(value);
 #endif
 
         value = attributes.value(QWebSettings::OfflineWebApplicationCacheEnabled,
index eaf1b00e9e47140706ea7f4b3b3c5873904bb463..9113454056f34fe51792bb81e4ebe156ffeca147 100644 (file)
@@ -1,3 +1,13 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * Api/qwebsettings.cpp:
+        (QWebSettingsPrivate::apply):
+
 2010-06-17  Robert Hogan  <robert@webkit.org>
 
         [Qt] Build fix
index 49619730e12fafefa5a41ed13620089125c19117..1fc4634832d3c6c47289322081def45384c18987 100644 (file)
@@ -1,3 +1,13 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * WebView.cpp:
+        (WebView::notifyPreferencesChanged):
+
 2010-06-16  Adam Roben  <aroben@apple.com>
 
         Add a "forPrinting" boolean parameter to
index 3da7d3cb9ce96420ebb285ae30177b0933a2bca0..a1aa5c2f0fd1bc6b2e1849a1c72048bf17ec7311 100644 (file)
@@ -62,6 +62,7 @@
 #include <JavaScriptCore/InitializeThreading.h>
 #include <JavaScriptCore/JSLock.h>
 #include <JavaScriptCore/JSValue.h>
+#include <WebCore/AbstractDatabase.h>
 #include <WebCore/AXObjectCache.h>
 #include <WebCore/ApplicationCacheStorage.h>
 #include <WebCore/BString.h>
@@ -73,7 +74,6 @@
 #include <WebCore/ContextMenuController.h>
 #include <WebCore/CookieStorageWin.h>
 #include <WebCore/Cursor.h>
-#include <WebCore/Database.h>
 #include <WebCore/Document.h>
 #include <WebCore/DragController.h>
 #include <WebCore/DragData.h>
@@ -4710,7 +4710,7 @@ HRESULT WebView::notifyPreferencesChanged(IWebNotification* notification)
     hr = prefsPrivate->databasesEnabled(&enabled);
     if (FAILED(hr))
         return hr;
-    Database::setIsAvailable(enabled);
+    AbstractDatabase::setIsAvailable(enabled);
 #endif
 
     hr = prefsPrivate->localStorageEnabled(&enabled);
index 180732f190a2d9dae673ec30098497d99cda1494..7cb3eda93702d348505894f21a51473b490d6463 100644 (file)
@@ -1,3 +1,14 @@
+2010-06-15  Dumitru Daniliuc  <dumi@chromium.org>
+
+        Reviewed by Adam Barth.
+
+        Move isAvailable()/setIsAvailable() from Database/DatabaseSync to AbstractDatabase.
+        https://bugs.webkit.org/show_bug.cgi?id=39041
+
+        * WebView.cpp:
+        (wxWebView::SetDatabasesEnabled):
+        (wxWebView::AreDatabasesEnabled):
+
 2010-06-15  Darin Adler  <darin@apple.com>
 
         Reviewed by Adam Barth.
index d9a22cb1824d211c26638a4aa5f7037d5a7db913..c374fbc517c757da16a41f8a79ab2cdc6773afb7 100644 (file)
@@ -74,7 +74,7 @@
 #include <wtf/text/CString.h>
 
 #if ENABLE(DATABASE)
-#include "Database.h"
+#include "AbstractDatabase.h"
 #include "DatabaseTracker.h"
 #endif
 
@@ -995,7 +995,7 @@ wxString wxWebView::GetDatabaseDirectory()
 void wxWebView::SetDatabasesEnabled(bool enabled)
 {
 #if ENABLE(DATABASE)
-    WebCore::Database::setIsAvailable(enabled);
+    WebCore::AbstractDatabase::setIsAvailable(enabled);
 #endif
 }
 
@@ -1003,7 +1003,7 @@ void wxWebView::SetDatabasesEnabled(bool enabled)
 bool wxWebView::AreDatabasesEnabled()
 {
 #if ENABLE(DATABASE)
-    return WebCore::Database::isAvailable();
+    return WebCore::AbstractDatabase::isAvailable();
 #endif
     return false;
 }