Merge "Hook up WebView.clearSslPreferences() for the Chromium HTTP stack"

This commit is contained in:
Steve Block
2011-09-28 02:45:28 -07:00
committed by Android (Google) Code Review
2 changed files with 12 additions and 2 deletions

View File

@@ -46,4 +46,8 @@ final class SslCertLookupTable {
public boolean isAllowed(SslError sslError) { public boolean isAllowed(SslError sslError) {
return table.getBoolean(sslError.toString()); return table.getBoolean(sslError.toString());
} }
public void clear() {
table.clear();
}
} }

View File

@@ -1349,8 +1349,14 @@ public final class WebViewCore {
} }
case CLEAR_SSL_PREF_TABLE: case CLEAR_SSL_PREF_TABLE:
Network.getInstance(mContext) if (JniUtil.useChromiumHttpStack()) {
.clearUserSslPrefTable(); // 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; break;
case TOUCH_UP: case TOUCH_UP: