summaryrefslogtreecommitdiffstats
path: root/WebKit/mac/Misc/WebCache.mm
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebKit/mac/Misc/WebCache.mm
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebKit/mac/Misc/WebCache.mm')
-rw-r--r--WebKit/mac/Misc/WebCache.mm20
1 files changed, 20 insertions, 0 deletions
diff --git a/WebKit/mac/Misc/WebCache.mm b/WebKit/mac/Misc/WebCache.mm
index 1c1850b..d3dfbdb 100644
--- a/WebKit/mac/Misc/WebCache.mm
+++ b/WebKit/mac/Misc/WebCache.mm
@@ -28,6 +28,7 @@
#import "WebPreferences.h"
#import "WebView.h"
#import "WebViewInternal.h"
+#import <WebCore/ApplicationCacheStorage.h>
#import <WebCore/Cache.h>
@implementation WebCache
@@ -40,25 +41,41 @@
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:s.images.count], @"Images",
[NSNumber numberWithInt:s.cssStyleSheets.count], @"CSS",
+#if ENABLE(XSLT)
[NSNumber numberWithInt:s.xslStyleSheets.count], @"XSL",
+#else
+ [NSNumber numberWithInt:0], @"XSL",
+#endif
[NSNumber numberWithInt:s.scripts.count], @"JavaScript",
nil],
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:s.images.size], @"Images",
[NSNumber numberWithInt:s.cssStyleSheets.size] ,@"CSS",
+#if ENABLE(XSLT)
[NSNumber numberWithInt:s.xslStyleSheets.size], @"XSL",
+#else
+ [NSNumber numberWithInt:0], @"XSL",
+#endif
[NSNumber numberWithInt:s.scripts.size], @"JavaScript",
nil],
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:s.images.liveSize], @"Images",
[NSNumber numberWithInt:s.cssStyleSheets.liveSize] ,@"CSS",
+#if ENABLE(XSLT)
[NSNumber numberWithInt:s.xslStyleSheets.liveSize], @"XSL",
+#else
+ [NSNumber numberWithInt:0], @"XSL",
+#endif
[NSNumber numberWithInt:s.scripts.liveSize], @"JavaScript",
nil],
[NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithInt:s.images.decodedSize], @"Images",
[NSNumber numberWithInt:s.cssStyleSheets.decodedSize] ,@"CSS",
+#if ENABLE(XSLT)
[NSNumber numberWithInt:s.xslStyleSheets.decodedSize], @"XSL",
+#else
+ [NSNumber numberWithInt:0], @"XSL",
+#endif
[NSNumber numberWithInt:s.scripts.decodedSize], @"JavaScript",
nil],
nil];
@@ -70,6 +87,9 @@
WebCacheModel cacheModel = [WebView _cacheModel];
[WebView _setCacheModel:WebCacheModelDocumentViewer];
[WebView _setCacheModel:cacheModel];
+
+ // Empty the application cache.
+ WebCore::cacheStorage().empty();
}
+ (void)setDisabled:(BOOL)disabled