summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Storage
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2009-05-13 17:58:43 +0100
committerBen Murdoch <benm@google.com>2009-05-15 11:38:01 +0100
commit8ccf722629b08f2a06b2cadbdc3d0c9dc885e25d (patch)
treead83ccc3e517a60955ebedbfc855a4a97558f508 /WebKit/mac/Storage
parent8fe05189c51b0ae29ba6f8c9d4c86fa288110707 (diff)
downloadexternal_webkit-8ccf722629b08f2a06b2cadbdc3d0c9dc885e25d.zip
external_webkit-8ccf722629b08f2a06b2cadbdc3d0c9dc885e25d.tar.gz
external_webkit-8ccf722629b08f2a06b2cadbdc3d0c9dc885e25d.tar.bz2
Apply fixes for webkit bugs 24776 and 25616 to add ENABLE(DATABASE) guards. This makes the macro work, so ENABLE_DATABASE can be toggled in config.h and the JavaScriptCore.derived.mk or V8Bindings.derived.mk.
Diffstat (limited to 'WebKit/mac/Storage')
-rw-r--r--WebKit/mac/Storage/WebDatabaseManager.mm4
-rw-r--r--WebKit/mac/Storage/WebDatabaseManagerInternal.h4
-rw-r--r--WebKit/mac/Storage/WebDatabaseManagerPrivate.h4
-rw-r--r--WebKit/mac/Storage/WebDatabaseTrackerClient.h4
-rw-r--r--WebKit/mac/Storage/WebDatabaseTrackerClient.mm4
-rw-r--r--WebKit/mac/Storage/WebSecurityOrigin.mm10
-rw-r--r--WebKit/mac/Storage/WebSecurityOriginPrivate.h1
7 files changed, 31 insertions, 0 deletions
diff --git a/WebKit/mac/Storage/WebDatabaseManager.mm b/WebKit/mac/Storage/WebDatabaseManager.mm
index fa9eea6..a84f235 100644
--- a/WebKit/mac/Storage/WebDatabaseManager.mm
+++ b/WebKit/mac/Storage/WebDatabaseManager.mm
@@ -29,6 +29,8 @@
#import "WebDatabaseManagerPrivate.h"
#import "WebDatabaseManagerInternal.h"
+#if ENABLE(DATABASE)
+
#import "WebDatabaseTrackerClient.h"
#import "WebSecurityOriginInternal.h"
@@ -137,3 +139,5 @@ void WebKitInitializeDatabasesIfNecessary()
initialized = YES;
}
+
+#endif
diff --git a/WebKit/mac/Storage/WebDatabaseManagerInternal.h b/WebKit/mac/Storage/WebDatabaseManagerInternal.h
index 2065a4e..6a4ad1d 100644
--- a/WebKit/mac/Storage/WebDatabaseManagerInternal.h
+++ b/WebKit/mac/Storage/WebDatabaseManagerInternal.h
@@ -26,4 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if ENABLE(DATABASE)
+
void WebKitInitializeDatabasesIfNecessary();
+
+#endif
diff --git a/WebKit/mac/Storage/WebDatabaseManagerPrivate.h b/WebKit/mac/Storage/WebDatabaseManagerPrivate.h
index faa4e5d..e373b1c 100644
--- a/WebKit/mac/Storage/WebDatabaseManagerPrivate.h
+++ b/WebKit/mac/Storage/WebDatabaseManagerPrivate.h
@@ -26,6 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if ENABLE(DATABASE)
+
extern NSString *WebDatabaseDirectoryDefaultsKey;
extern NSString *WebDatabaseDisplayNameKey;
@@ -62,3 +64,5 @@ extern NSString *WebDatabaseIdentifierKey;
- (void)deleteDatabase:(NSString *)databaseIdentifier withOrigin:(WebSecurityOrigin *)origin;
@end
+
+#endif
diff --git a/WebKit/mac/Storage/WebDatabaseTrackerClient.h b/WebKit/mac/Storage/WebDatabaseTrackerClient.h
index 5db444c..d06cfe9 100644
--- a/WebKit/mac/Storage/WebDatabaseTrackerClient.h
+++ b/WebKit/mac/Storage/WebDatabaseTrackerClient.h
@@ -26,6 +26,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if ENABLE(DATABASE)
+
#import <WebCore/DatabaseTrackerClient.h>
class WebDatabaseTrackerClient : public WebCore::DatabaseTrackerClient {
@@ -38,3 +40,5 @@ public:
private:
WebDatabaseTrackerClient();
};
+
+#endif
diff --git a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
index 48530d6..89626fb 100644
--- a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
+++ b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
@@ -28,6 +28,8 @@
#import "WebDatabaseTrackerClient.h"
+#if ENABLE(DATABASE)
+
#import "WebDatabaseManagerPrivate.h"
#import "WebSecurityOriginInternal.h"
#import <wtf/RetainPtr.h>
@@ -67,3 +69,5 @@ void WebDatabaseTrackerClient::dispatchDidModifyDatabase(SecurityOrigin* origin,
object:webSecurityOrigin.get()
userInfo:userInfo.get()];
}
+
+#endif
diff --git a/WebKit/mac/Storage/WebSecurityOrigin.mm b/WebKit/mac/Storage/WebSecurityOrigin.mm
index 85313d0..56a21f5 100644
--- a/WebKit/mac/Storage/WebSecurityOrigin.mm
+++ b/WebKit/mac/Storage/WebSecurityOrigin.mm
@@ -71,12 +71,20 @@ using namespace WebCore;
- (unsigned long long)usage
{
+#if ENABLE(DATABASE)
return DatabaseTracker::tracker().usageForOrigin(reinterpret_cast<SecurityOrigin*>(_private));
+#else
+ return 0;
+#endif
}
- (unsigned long long)quota
{
+#if ENABLE(DATABASE)
return DatabaseTracker::tracker().quotaForOrigin(reinterpret_cast<SecurityOrigin*>(_private));
+#else
+ return 0;
+#endif
}
// Sets the storage quota (in bytes)
@@ -84,7 +92,9 @@ using namespace WebCore;
// This will simply prevent new data from being added to databases in that origin
- (void)setQuota:(unsigned long long)quota
{
+#if ENABLE(DATABASE)
DatabaseTracker::tracker().setQuota(reinterpret_cast<SecurityOrigin*>(_private), quota);
+#endif
}
- (BOOL)isEqual:(id)anObject
diff --git a/WebKit/mac/Storage/WebSecurityOriginPrivate.h b/WebKit/mac/Storage/WebSecurityOriginPrivate.h
index 0796c6e..c7836f8 100644
--- a/WebKit/mac/Storage/WebSecurityOriginPrivate.h
+++ b/WebKit/mac/Storage/WebSecurityOriginPrivate.h
@@ -49,4 +49,5 @@
// This will simply prevent new data from being added to databases in that origin
- (void)setQuota:(unsigned long long)quota;
+
@end