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

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

Issue 22691002: Allow overlapping sync and async startup requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Allow overlapping sync and async startup requests - fix code review Nits Created 7 years, 4 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
« no previous file with comments | « no previous file | chrome/app/android/chrome_main_delegate_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
index 7c3ab76050d63f2521dafbd9e2263ff37d77995c..c0657a3b0e3da4658e86608042657cbbdc761d4e 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java
@@ -5,12 +5,11 @@
package org.chromium.android_webview;
import android.content.Context;
-import android.content.SharedPreferences;
import org.chromium.base.PathUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.content.app.LibraryLoader;
-import org.chromium.content.browser.AndroidBrowserProcess;
+import org.chromium.content.browser.BrowserStartupController;
import org.chromium.content.common.ProcessInitException;
/**
@@ -46,12 +45,9 @@ public abstract class AwBrowserProcess {
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
- try {
- LibraryLoader.ensureInitialized();
- AndroidBrowserProcess.init(context,
- AndroidBrowserProcess.MAX_RENDERERS_SINGLE_PROCESS);
- } catch (ProcessInitException e) {
- throw new RuntimeException("Cannot initialize WebView", e);
+ if( !BrowserStartupController.get(context).startBrowserProcessesSync(
+ BrowserStartupController.MAX_RENDERERS_SINGLE_PROCESS)) {
+ throw new RuntimeException("Cannot initialize WebView");
}
}
});
« no previous file with comments | « no previous file | chrome/app/android/chrome_main_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698