Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1066)

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java

Issue 235563005: Add client cert support to android_webview (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review phase 1 Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
index fc991f8ef8d0bbffebd2721297d6f18c0adebbb5..d52ad4e9bfac1ae8b61de02f534dba41a3660a40 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java
@@ -8,6 +8,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import org.chromium.content.browser.ContentViewStatics;
+import org.chromium.net.DefaultAndroidKeyStore;
/**
* Java side of the Browser Context: contains all the java side objects needed to host one
@@ -15,8 +16,6 @@ import org.chromium.content.browser.ContentViewStatics;
* Note that due to running in single process mode, and limitations on renderer process only
* being able to use a single browser context, currently there can only be one AwBrowserContext
* instance, so at this point the class mostly exists for conceptual clarity.
- *
- * Obtain the default (singleton) instance with AwBrowserProcess.getDefaultBrowserContext().
*/
public class AwBrowserContext {
@@ -28,6 +27,8 @@ public class AwBrowserContext {
private AwCookieManager mCookieManager;
private AwFormDatabase mFormDatabase;
private HttpAuthDatabase mHttpAuthDatabase;
+ private DefaultAndroidKeyStore mLocalKeyStore;
+ private ClientCertLookupTable mClientCertLookupTable;
public AwBrowserContext(SharedPreferences sharedPreferences) {
mSharedPreferences = sharedPreferences;
@@ -61,6 +62,20 @@ public class AwBrowserContext {
return mHttpAuthDatabase;
}
+ public DefaultAndroidKeyStore getKeyStore() {
+ if (mLocalKeyStore == null) {
+ mLocalKeyStore = new DefaultAndroidKeyStore();
+ }
+ return mLocalKeyStore;
+ }
+
+ public ClientCertLookupTable getClientCertLookupTable() {
+ if (mClientCertLookupTable == null) {
+ mClientCertLookupTable = new ClientCertLookupTable();
+ }
+ return mClientCertLookupTable;
+ }
+
/**
* @see android.webkit.WebView#pauseTimers()
*/

Powered by Google App Engine
This is Rietveld 408576698