Loading core/java/android/webkit/BrowserFrame.java +0 −9 Original line number Original line Diff line number Diff line Loading @@ -1351,15 +1351,6 @@ class BrowserFrame extends Handler { private native void nativeAddJavascriptInterface(int nativeFramePointer, private native void nativeAddJavascriptInterface(int nativeFramePointer, Object obj, String interfaceName); Object obj, String interfaceName); /** * Enable or disable the native cache. */ /* FIXME: The native cache is always on for now until we have a better * solution for our 2 caches. */ private native void setCacheDisabled(boolean disabled); public native boolean cacheDisabled(); public native void clearCache(); public native void clearCache(); /** /** Loading core/java/android/webkit/CacheManager.java +1 −27 Original line number Original line Diff line number Diff line Loading @@ -68,8 +68,6 @@ public final class CacheManager { // Limit the maximum cache file size to half of the normal capacity // Limit the maximum cache file size to half of the normal capacity static long CACHE_MAX_SIZE = (CACHE_THRESHOLD - CACHE_TRIM_AMOUNT) / 2; static long CACHE_MAX_SIZE = (CACHE_THRESHOLD - CACHE_TRIM_AMOUNT) / 2; private static boolean mDisabled; // Reference count the enable/disable transaction // Reference count the enable/disable transaction private static int mRefCount; private static int mRefCount; Loading Loading @@ -321,22 +319,6 @@ public final class CacheManager { return mBaseDir; return mBaseDir; } } /** * Sets whether the HTTP cache should be disabled. * @param disabled Whether the cache should be disabled */ static void setCacheDisabled(boolean disabled) { assert !JniUtil.useChromiumHttpStack(); if (disabled == mDisabled) { return; } mDisabled = disabled; if (mDisabled) { removeAllCacheFiles(); } } /** /** * Gets whether the HTTP cache is disabled. * Gets whether the HTTP cache is disabled. * @return True if the HTTP cache is disabled * @return True if the HTTP cache is disabled Loading @@ -344,7 +326,7 @@ public final class CacheManager { */ */ @Deprecated @Deprecated public static boolean cacheDisabled() { public static boolean cacheDisabled() { return mDisabled; return false; } } // only called from WebViewWorkerThread // only called from WebViewWorkerThread Loading Loading @@ -489,10 +471,6 @@ public final class CacheManager { static CacheResult getCacheFile(String url, long postIdentifier, static CacheResult getCacheFile(String url, long postIdentifier, Map<String, String> headers) { Map<String, String> headers) { if (mDisabled) { return null; } CacheResult result = JniUtil.useChromiumHttpStack() ? CacheResult result = JniUtil.useChromiumHttpStack() ? getCacheFileChromiumHttpStack(url) : getCacheFileChromiumHttpStack(url) : getCacheFileAndroidHttpStack(url, postIdentifier); getCacheFileAndroidHttpStack(url, postIdentifier); Loading Loading @@ -552,10 +530,6 @@ public final class CacheManager { boolean forceCache) { boolean forceCache) { assert !JniUtil.useChromiumHttpStack(); assert !JniUtil.useChromiumHttpStack(); if (!forceCache && mDisabled) { return null; } String databaseKey = getDatabaseKey(url, postIdentifier); String databaseKey = getDatabaseKey(url, postIdentifier); // according to the rfc 2616, the 303 response MUST NOT be cached. // according to the rfc 2616, the 303 response MUST NOT be cached. Loading Loading
core/java/android/webkit/BrowserFrame.java +0 −9 Original line number Original line Diff line number Diff line Loading @@ -1351,15 +1351,6 @@ class BrowserFrame extends Handler { private native void nativeAddJavascriptInterface(int nativeFramePointer, private native void nativeAddJavascriptInterface(int nativeFramePointer, Object obj, String interfaceName); Object obj, String interfaceName); /** * Enable or disable the native cache. */ /* FIXME: The native cache is always on for now until we have a better * solution for our 2 caches. */ private native void setCacheDisabled(boolean disabled); public native boolean cacheDisabled(); public native void clearCache(); public native void clearCache(); /** /** Loading
core/java/android/webkit/CacheManager.java +1 −27 Original line number Original line Diff line number Diff line Loading @@ -68,8 +68,6 @@ public final class CacheManager { // Limit the maximum cache file size to half of the normal capacity // Limit the maximum cache file size to half of the normal capacity static long CACHE_MAX_SIZE = (CACHE_THRESHOLD - CACHE_TRIM_AMOUNT) / 2; static long CACHE_MAX_SIZE = (CACHE_THRESHOLD - CACHE_TRIM_AMOUNT) / 2; private static boolean mDisabled; // Reference count the enable/disable transaction // Reference count the enable/disable transaction private static int mRefCount; private static int mRefCount; Loading Loading @@ -321,22 +319,6 @@ public final class CacheManager { return mBaseDir; return mBaseDir; } } /** * Sets whether the HTTP cache should be disabled. * @param disabled Whether the cache should be disabled */ static void setCacheDisabled(boolean disabled) { assert !JniUtil.useChromiumHttpStack(); if (disabled == mDisabled) { return; } mDisabled = disabled; if (mDisabled) { removeAllCacheFiles(); } } /** /** * Gets whether the HTTP cache is disabled. * Gets whether the HTTP cache is disabled. * @return True if the HTTP cache is disabled * @return True if the HTTP cache is disabled Loading @@ -344,7 +326,7 @@ public final class CacheManager { */ */ @Deprecated @Deprecated public static boolean cacheDisabled() { public static boolean cacheDisabled() { return mDisabled; return false; } } // only called from WebViewWorkerThread // only called from WebViewWorkerThread Loading Loading @@ -489,10 +471,6 @@ public final class CacheManager { static CacheResult getCacheFile(String url, long postIdentifier, static CacheResult getCacheFile(String url, long postIdentifier, Map<String, String> headers) { Map<String, String> headers) { if (mDisabled) { return null; } CacheResult result = JniUtil.useChromiumHttpStack() ? CacheResult result = JniUtil.useChromiumHttpStack() ? getCacheFileChromiumHttpStack(url) : getCacheFileChromiumHttpStack(url) : getCacheFileAndroidHttpStack(url, postIdentifier); getCacheFileAndroidHttpStack(url, postIdentifier); Loading Loading @@ -552,10 +530,6 @@ public final class CacheManager { boolean forceCache) { boolean forceCache) { assert !JniUtil.useChromiumHttpStack(); assert !JniUtil.useChromiumHttpStack(); if (!forceCache && mDisabled) { return null; } String databaseKey = getDatabaseKey(url, postIdentifier); String databaseKey = getDatabaseKey(url, postIdentifier); // according to the rfc 2616, the 303 response MUST NOT be cached. // according to the rfc 2616, the 303 response MUST NOT be cached. Loading