Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / android_webview / java / src / org / chromium / android_webview / AwBrowserContext.java
index fc991f8..c6e8ae0 100644 (file)
@@ -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,7 @@ public class AwBrowserContext {
     private AwCookieManager mCookieManager;
     private AwFormDatabase mFormDatabase;
     private HttpAuthDatabase mHttpAuthDatabase;
+    private DefaultAndroidKeyStore mLocalKeyStore;
 
     public AwBrowserContext(SharedPreferences sharedPreferences) {
         mSharedPreferences = sharedPreferences;
@@ -61,6 +61,13 @@ public class AwBrowserContext {
         return mHttpAuthDatabase;
     }
 
+    public DefaultAndroidKeyStore getKeyStore() {
+        if (mLocalKeyStore == null) {
+            mLocalKeyStore = new DefaultAndroidKeyStore();
+        }
+        return mLocalKeyStore;
+    }
+
     /**
      * @see android.webkit.WebView#pauseTimers()
      */