summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Kristian Monsen <kristianm@google.com> 2011-09-14 16:29:23 +0100
committer Steve Block <steveblock@google.com> 2011-09-28 10:44:11 +0100
commitd9151bf1ccd9bc726ba2c252919503f8968649cc (patch)
tree2027ec729011732d8302e15e03ddc213dc708005
parent9a0cd15eec572e1322c2c328b2e5acea9f2d9210 (diff)
Hook up WebView.clearSslPreferences() for the Chromium HTTP stack
Note that this is an incomplete fix, as we do not clear the responses for connections currently in use, as they maintain their own cache. See http:/b/5324235. Bug: 5287216 Change-Id: I18f6638efeff0bee1e7ffed606be1444d683bebd
-rw-r--r--core/java/android/webkit/SslCertLookupTable.java4
-rw-r--r--core/java/android/webkit/WebViewCore.java10
2 files changed, 12 insertions, 2 deletions
diff --git a/core/java/android/webkit/SslCertLookupTable.java b/core/java/android/webkit/SslCertLookupTable.java
index 048a3cfb0861..052244f95f89 100644
--- a/core/java/android/webkit/SslCertLookupTable.java
+++ b/core/java/android/webkit/SslCertLookupTable.java
@@ -46,4 +46,8 @@ final class SslCertLookupTable {
public boolean isAllowed(SslError sslError) {
return table.getBoolean(sslError.toString());
}
+
+ public void clear() {
+ table.clear();
+ }
}
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 470e843f5868..deaf0f271389 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -1349,8 +1349,14 @@ public final class WebViewCore {
}
case CLEAR_SSL_PREF_TABLE:
- Network.getInstance(mContext)
- .clearUserSslPrefTable();
+ if (JniUtil.useChromiumHttpStack()) {
+ // FIXME: This will not work for connections currently in use, as
+ // they cache the certificate responses. See http://b/5324235.
+ SslCertLookupTable.getInstance().clear();
+ nativeCloseIdleConnections();
+ } else {
+ Network.getInstance(mContext).clearUserSslPrefTable();
+ }
break;
case TOUCH_UP: