Chromium Code Reviews| Index: content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java |
| diff --git a/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java b/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java |
| index e6a84437fbc0ea0786e6e44bf969f43803751509..ff6c3902c7f5ec36210c3b34ff54c7acbd559555 100644 |
| --- a/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java |
| +++ b/content/public/android/java/src/org/chromium/content/app/ChildProcessServiceImpl.java |
| @@ -38,6 +38,7 @@ import org.chromium.content.common.IChildProcessCallback; |
| import org.chromium.content.common.IChildProcessService; |
| import org.chromium.content.common.SurfaceWrapper; |
| +import java.util.ArrayList; |
| import java.util.concurrent.Semaphore; |
| import java.util.concurrent.atomic.AtomicReference; |
| @@ -74,6 +75,7 @@ public class ChildProcessServiceImpl { |
| private ChromiumLinkerParams mLinkerParams; |
| // Child library process type. |
| private int mLibraryProcessType; |
| + private String[] mAdditionalCommandLine; |
| private static AtomicReference<Context> sContext = new AtomicReference<>(null); |
| private boolean mLibraryInitialized; |
| @@ -196,7 +198,19 @@ public class ChildProcessServiceImpl { |
| mMainThread.wait(); |
| } |
| } |
| - CommandLine.init(mCommandLineParams); |
| + |
| + ArrayList<String> fullCommandLine = new ArrayList<String>(); |
| + for (String param : mCommandLineParams) fullCommandLine.add(param); |
|
Xi Han
2017/02/10 18:02:42
It's better to keep the style consistent with line
|
| + if (mAdditionalCommandLine != null) { |
| + for (String param : mAdditionalCommandLine) { |
| + fullCommandLine.add(param); |
| + } |
| + } |
| + String[] fullCommandLineArray = new String[fullCommandLine.size()]; |
| + for (int i = 0; i < fullCommandLine.size(); ++i) { |
| + fullCommandLineArray[i] = fullCommandLine.get(i); |
| + } |
| + CommandLine.init(fullCommandLineArray); |
| if (ContentSwitches.SWITCH_RENDERER_PROCESS.equals( |
| CommandLine.getInstance().getSwitchValue( |
| @@ -327,6 +341,7 @@ public class ChildProcessServiceImpl { |
| // See onCreate(). |
| mLinkerParams = new ChromiumLinkerParams(intent); |
| mLibraryProcessType = ChildProcessCreationParams.getLibraryProcessType(intent); |
| + mAdditionalCommandLine = ChildProcessCreationParams.getAdditionalCommandLine(intent); |
| mMainThread.notifyAll(); |
| } |
| } |