| Index: content/public/android/java/org/chromium/content/browser/AndroidBrowserProcess.java
|
| diff --git a/content/public/android/java/org/chromium/content/browser/AndroidBrowserProcess.java b/content/public/android/java/org/chromium/content/browser/AndroidBrowserProcess.java
|
| index f848e17f9668c3e3b80ab56fbad906ac25981dee..28f163de853f1a489a4942f0e45da922a48afc80 100644
|
| --- a/content/public/android/java/org/chromium/content/browser/AndroidBrowserProcess.java
|
| +++ b/content/public/android/java/org/chromium/content/browser/AndroidBrowserProcess.java
|
| @@ -9,6 +9,7 @@ import android.content.Context;
|
| import android.content.res.Resources;
|
| import android.util.Log;
|
|
|
| +import org.chromium.content.app.AppResource;
|
| import org.chromium.content.app.ContentMain;
|
| import org.chromium.content.app.LibraryLoader;
|
| import org.chromium.content.browser.ContentView;
|
| @@ -89,6 +90,23 @@ public class AndroidBrowserProcess {
|
|
|
| Context appContext = context.getApplicationContext();
|
|
|
| + // This block is inside genericChromiumProcessInit() instead
|
| + // of initChromiumBrowserProcess() to make sure we do it once.
|
| + // In here it is protected with the sInitialized.
|
| + if (hostIsChrome) {
|
| + if (nativeIsOfficialBuild() ||
|
| + CommandLine.getInstance().hasSwitch(CommandLine.ADD_OFFICIAL_COMMAND_LINE)) {
|
| + Resources res = context.getResources();
|
| + try {
|
| + String[] switches = res.getStringArray(AppResource.ARRAY_OFFICIAL_COMMAND_LINE);
|
| + CommandLine.getInstance().appendSwitchesAndArguments(switches);
|
| + } catch (Resources.NotFoundException e) {
|
| + // Do nothing. It is fine to have no command line
|
| + // additions for an official build.
|
| + }
|
| + }
|
| + }
|
| +
|
| int maxRenderers = normalizeMaxRendererProcesses(appContext, maxRendererProcesses);
|
| Log.i(TAG, "Initializing chromium process, renderers=" + maxRenderers +
|
| " hostIsChrome=" + hostIsChrome);
|
|
|