summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
authorSelim Gurun <sgurun@google.com>2012-06-29 14:31:04 -0700
committerSelim Gurun <sgurun@google.com>2012-07-09 10:08:11 -0700
commit10f87e2741ddcfef1e87580671bfb750fd64199c (patch)
tree936c58af64bf09b7bd8086c50c44a7352e06088e /Source/WebKit
parent736e83761cd309092370bb9f7842826186c32722 (diff)
downloadexternal_webkit-10f87e2741ddcfef1e87580671bfb750fd64199c.zip
external_webkit-10f87e2741ddcfef1e87580671bfb750fd64199c.tar.gz
external_webkit-10f87e2741ddcfef1e87580671bfb750fd64199c.tar.bz2
Clean appcache properly on deleteAllData()
Bug: 6763306 The prior approach queries and deletes only the resources that are given in the manifest file. There are two problems it seems: 1. It is expensive & complicated. The deletealldata is called by an API method which clearly states this will clear all javascript storage APIs. there is an webstorage API for this, why make it complicated? 2. It seems a bug somewhere actually prevents cleaning disk storage. (see the bug above for experiments). This can be a bug of the old approach, or this can be a webkit bug (less likely). Change-Id: I7cf984efce5117191ca0e691007e2e0a11d75e93
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/android/jni/WebStorage.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/WebKit/android/jni/WebStorage.cpp b/Source/WebKit/android/jni/WebStorage.cpp
index 66a3517..0cfe414 100644
--- a/Source/WebKit/android/jni/WebStorage.cpp
+++ b/Source/WebKit/android/jni/WebStorage.cpp
@@ -130,14 +130,10 @@ static void DeleteOrigin(JNIEnv* env, jobject obj, jstring origin)
static void DeleteAllData(JNIEnv* env, jobject obj)
{
+ // delete WebSQL database
WebCore::DatabaseTracker::tracker().deleteAllDatabases();
-
- Vector<WebCore::KURL> manifestUrls;
- if (!WebCore::cacheStorage().manifestURLs(&manifestUrls))
- return;
- int size = manifestUrls.size();
- for (int i = 0; i < size; ++i)
- WebCore::cacheStorage().deleteCacheGroup(manifestUrls[i]);
+ // delete AppCache
+ WebCore::cacheStorage().deleteAllEntries();
// FIXME: this is a workaround for eliminating any DOM Storage data (both
// session and local storage) as there is no functionality inside WebKit at the