diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-23 09:44:37 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-23 09:44:37 -0700 |
| commit | 5c8f5ddce8a8440c7c0e9e805e55964e4d4f3b93 (patch) | |
| tree | acae118a60ddfb85de117d8eb29efa5ce12f8df8 /WebKit | |
| parent | 7a7a9f77e27f6e56fb70bf2df47838fcf8caa229 (diff) | |
| parent | dd7fab39a0afb776e22686558313e31e2bf0fd64 (diff) | |
| download | external_webkit-5c8f5ddce8a8440c7c0e9e805e55964e4d4f3b93.zip external_webkit-5c8f5ddce8a8440c7c0e9e805e55964e4d4f3b93.tar.gz external_webkit-5c8f5ddce8a8440c7c0e9e805e55964e4d4f3b93.tar.bz2 | |
Merge change 8191
* changes:
Enforce app cache maximum size
Diffstat (limited to 'WebKit')
| -rw-r--r-- | WebKit/android/jni/WebSettings.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/WebKit/android/jni/WebSettings.cpp b/WebKit/android/jni/WebSettings.cpp index 7d2b12d..73ebf63 100644 --- a/WebKit/android/jni/WebSettings.cpp +++ b/WebKit/android/jni/WebSettings.cpp @@ -92,6 +92,7 @@ struct FieldIds { #if ENABLE(OFFLINE_WEB_APPLICATIONS) mAppCacheEnabled = env->GetFieldID(clazz, "mAppCacheEnabled", "Z"); mAppCachePath = env->GetFieldID(clazz, "mAppCachePath", "Ljava/lang/String;"); + mAppCacheMaxSize = env->GetFieldID(clazz, "mAppCacheMaxSize", "J"); #endif mJavaScriptCanOpenWindowsAutomatically = env->GetFieldID(clazz, "mJavaScriptCanOpenWindowsAutomatically", "Z"); @@ -123,6 +124,7 @@ struct FieldIds { #if ENABLE(OFFLINE_WEB_APPLICATIONS) LOG_ASSERT(mAppCacheEnabled, "Could not find field mAppCacheEnabled"); LOG_ASSERT(mAppCachePath, "Could not find field mAppCachePath"); + LOG_ASSERT(mAppCacheMaxSize, "Could not find field mAppCacheMaxSize"); #endif LOG_ASSERT(mJavaScriptCanOpenWindowsAutomatically, "Could not find field mJavaScriptCanOpenWindowsAutomatically"); @@ -164,6 +166,7 @@ struct FieldIds { #if ENABLE(OFFLINE_WEB_APPLICATIONS) jfieldID mAppCacheEnabled; jfieldID mAppCachePath; + jfieldID mAppCacheMaxSize; #endif jfieldID mJavaScriptCanOpenWindowsAutomatically; jfieldID mUseWideViewport; @@ -299,6 +302,8 @@ public: WebCore::cacheStorage().setCacheDirectory(path); } } + jlong maxsize = env->GetIntField(obj, gFieldIds->mAppCacheMaxSize); + WebCore::cacheStorage().setMaximumSize(maxsize); #endif flag = env->GetBooleanField(obj, gFieldIds->mJavaScriptCanOpenWindowsAutomatically); s->setJavaScriptCanOpenWindowsAutomatically(flag); |
