summaryrefslogtreecommitdiffstats
path: root/core/java/android/webkit
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-23 09:44:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-23 09:44:23 -0700
commit8dc0c9b4ad2f5c8ddea72dd2e30acf7db793f8a6 (patch)
tree36ddfd6f43175c4e4224087b91d56f3918e1437f /core/java/android/webkit
parent675c7d2eb8198c7b68c02da731bc2c5b71d5eb5b (diff)
parent1c829208eadf175ad4600e70a14013b50a20adfe (diff)
downloadframeworks_base-8dc0c9b4ad2f5c8ddea72dd2e30acf7db793f8a6.zip
frameworks_base-8dc0c9b4ad2f5c8ddea72dd2e30acf7db793f8a6.tar.gz
frameworks_base-8dc0c9b4ad2f5c8ddea72dd2e30acf7db793f8a6.tar.bz2
Merge change 8189
* changes: Enforce app cache maximum size
Diffstat (limited to 'core/java/android/webkit')
-rw-r--r--core/java/android/webkit/WebSettings.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebSettings.java b/core/java/android/webkit/WebSettings.java
index 8f3d55f..b56f167 100644
--- a/core/java/android/webkit/WebSettings.java
+++ b/core/java/android/webkit/WebSettings.java
@@ -181,6 +181,7 @@ public class WebSettings {
private boolean mDatabaseEnabled = false;
private String mAppCachePath = "";
private boolean mAppCacheEnabled = false;
+ private long mAppCacheMaxSize = Long.MAX_VALUE;
private boolean mDomStorageEnabled = false;
// Class to handle messages before WebCore is ready.
@@ -996,6 +997,19 @@ public class WebSettings {
}
/**
+ * Set the maximum size for the Application Caches content.
+ * @param appCacheMaxSize the maximum size in bytes.
+ *
+ * @hide pending api council approval
+ */
+ public synchronized void setAppCacheMaxSize(long appCacheMaxSize) {
+ if (appCacheMaxSize != mAppCacheMaxSize) {
+ mAppCacheMaxSize = appCacheMaxSize;
+ postSync();
+ }
+ }
+
+ /**
* Set whether the database storage API is enabled.
* @param flag boolean True if the WebView should use the database storage
* API.