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

Unified Diff: android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java

Issue 2339343002: Android webview tries to switch to CE context (Closed)
Patch Set: Addressed concerns from PS1 Created 4 years, 3 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/glue/java/src/com/android/webview/chromium/WebViewChromium.java
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
index 4a3892673442c2b9ec08979ddb21ba8d4649b45a..dad70a816c5e41bb43789b1d776b1e5e90f360c6 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java
@@ -114,15 +114,16 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
// init is ofter called right after and is NOT threadsafe.
public WebViewChromium(WebViewChromiumFactoryProvider factory, WebView webView,
WebView.PrivateAccess webViewPrivate, boolean shouldDisableThreadChecking) {
- WebViewChromiumFactoryProvider.checkStorageIsNotDeviceProtected(webView.getContext());
+ Context ctx = WebViewChromiumFactoryProvider.switchToCredentialProtectedStorage(
Torne 2016/09/21 12:04:18 You're still allowing a WebView to be constructed
Nate Fischer 2016/09/22 04:21:12 I'm a bit confused about what you mean here. Digg
Torne 2016/09/22 09:59:54 These are two totally unrelated things that use di
+ webView.getContext());
mWebView = webView;
mWebViewPrivate = webViewPrivate;
mHitTestResult = new WebView.HitTestResult();
- mContext = ResourcesContextWrapperFactory.get(mWebView.getContext());
+ mContext = ResourcesContextWrapperFactory.get(ctx);
mAppTargetSdkVersion = mContext.getApplicationInfo().targetSdkVersion;
mFactory = factory;
mShouldDisableThreadChecking = shouldDisableThreadChecking;
- factory.getWebViewDelegate().addWebViewAssetPath(mWebView.getContext());
+ factory.getWebViewDelegate().addWebViewAssetPath(ctx);
}
static void completeWindowCreation(WebView parent, WebView child) {

Powered by Google App Engine
This is Rietveld 408576698