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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java

Issue 2087043003: customtabs: Don't create an extra child process when one is already there. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java b/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
index f7beba7409674afad31df65e312b60db91c5092a..f6e49d86921c4fcc6d34cbacb2ce496e82e50184 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/init/NativeInitializationController.java
@@ -72,8 +72,11 @@ class NativeInitializationController {
/**
* Start loading the native library in the background. This kicks off the native initialization
* process.
+ *
+ * @param allocateChildConnection Whether a spare child connection should be allocated. Set to
+ * false if you know that no new renderer is needed.
*/
- public void startBackgroundTasks() {
+ public void startBackgroundTasks(final boolean allocateChildConnection) {
// TODO(yusufo) : Investigate using an AsyncTask for this.
new Thread() {
@Override
@@ -98,7 +101,7 @@ class NativeInitializationController {
mActivityDelegate.onStartupFailure();
return;
}
- ChildProcessLauncher.warmUp(mContext);
+ if (allocateChildConnection) ChildProcessLauncher.warmUp(mContext);
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public void run() {

Powered by Google App Engine
This is Rietveld 408576698