diff options
| author | Steve Block <steveblock@google.com> | 2011-01-04 14:26:27 +0000 |
|---|---|---|
| committer | Steve Block <steveblock@google.com> | 2011-01-07 16:50:09 +0000 |
| commit | 808751fe7ac16bf7224cba284a318695d8093355 (patch) | |
| tree | f878bc0cd2fbab85cdfef45c50b9d0e336d16795 /core/java/android/webkit/FrameLoader.java | |
| parent | b3b98d9b700ac0ae038a63b734287b4d3aad950d (diff) | |
| download | frameworks_base-808751fe7ac16bf7224cba284a318695d8093355.zip frameworks_base-808751fe7ac16bf7224cba284a318695d8093355.tar.gz frameworks_base-808751fe7ac16bf7224cba284a318695d8093355.tar.bz2 | |
Avoid superfluous calls to CacheManager with the Chromium HTTP stack
When using the Chromium HTTP stack, most of the calls to CacheManager
methods are not required, as we're not using its cache. These methods
are now marked with asserts to make this clear.
Also avoid creating the cache database in WebViewDatabase.
This will avoid creating the database databases/webviewCache.db and
the directory cache/webviewCache.
Bug: 3270236
Change-Id: I68f94dde16830ed817454d5e1af961f41b71d018
Diffstat (limited to 'core/java/android/webkit/FrameLoader.java')
| -rw-r--r-- | core/java/android/webkit/FrameLoader.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/java/android/webkit/FrameLoader.java b/core/java/android/webkit/FrameLoader.java index 951dab3..2b44775 100644 --- a/core/java/android/webkit/FrameLoader.java +++ b/core/java/android/webkit/FrameLoader.java @@ -22,6 +22,7 @@ import android.net.http.RequestHandle; import android.os.Build; import android.util.Log; import android.webkit.CacheManager.CacheResult; +import android.webkit.JniUtil; import java.util.HashMap; import java.util.Map; @@ -56,6 +57,8 @@ class FrameLoader { FrameLoader(LoadListener listener, WebSettings settings, String method, WebResourceResponse interceptResponse) { + assert !JniUtil.useChromiumHttpStack(); + mListener = listener; mHeaders = null; mMethod = method; @@ -148,9 +151,10 @@ class FrameLoader { } - /* package */ - static boolean handleLocalFile(String url, LoadListener loadListener, + private static boolean handleLocalFile(String url, LoadListener loadListener, WebSettings settings) { + assert !JniUtil.useChromiumHttpStack(); + // Attempt to decode the percent-encoded url before passing to the // local loaders. try { |
