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

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

Issue 2645413002: Prepare to get the multiprocess setting from WebViewDelegate. (Closed)
Patch Set: Created 3 years, 11 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/WebViewChromiumFactoryProvider.java
diff --git a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
index b7fb06b95604bf6e1b142f2741731eb1ae1a8c55..833a920577267835575d9100e6c992df40d27924 100644
--- a/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
+++ b/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java
@@ -18,7 +18,6 @@ import android.os.Looper;
import android.os.Process;
import android.os.StrictMode;
import android.os.UserManager;
-import android.provider.Settings;
import android.util.Log;
import android.webkit.CookieManager;
import android.webkit.GeolocationPermissions;
@@ -197,6 +196,13 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
initialize(WebViewDelegateFactory.createProxyDelegate(delegate));
}
+ /**
+ * Constructor for internal use when a proxy delegate has already been created.
+ */
+ WebViewChromiumFactoryProvider(WebViewDelegate delegate) {
Torne 2017/01/23 16:09:16 This allows the subclass version of create() to cr
boliu 2017/01/23 16:34:18 protected?
Torne 2017/01/23 17:27:30 No point; the downstream version is in the same pa
boliu 2017/01/23 17:44:04 oh.. package is actually more strict than protecte
+ initialize(delegate);
+ }
+
@SuppressFBWarnings("DMI_HARDCODED_ABSOLUTE_FILENAME")
private void initialize(WebViewDelegate webViewDelegate) {
mWebViewDelegate = webViewDelegate;
@@ -224,9 +230,7 @@ public class WebViewChromiumFactoryProvider implements WebViewFactoryProvider {
CommandLine.init(null);
}
- if (Settings.Global.getInt(ContextUtils.getApplicationContext().getContentResolver(),
- Settings.Global.WEBVIEW_MULTIPROCESS, 0)
- == 1) {
+ if (mWebViewDelegate.isMultiProcessEnabled()) {
CommandLine cl = CommandLine.getInstance();
cl.appendSwitch("webview-sandboxed-renderer");
}

Powered by Google App Engine
This is Rietveld 408576698