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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java

Issue 2865173002: Removing the unused child process ID parameter in ChildProcessLauncher. (Closed)
Patch Set: Created 3 years, 7 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: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
index be6e4f0bb7b919e5d27ef3dc3865ccc564ee0742..68d6679d5105706425d0ca1c0bf26193f372f363 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java
@@ -167,7 +167,6 @@ public class ChildProcessLauncher {
@Override
public void run() {
startInternal(pendingSpawn.getContext(), pendingSpawn.getCommandLine(),
- pendingSpawn.getChildProcessId(),
pendingSpawn.getFilesToBeMapped(),
pendingSpawn.getLaunchCallback(),
pendingSpawn.getChildProcessCallback(),
@@ -328,9 +327,9 @@ public class ChildProcessLauncher {
}
};
ChildSpawnData spawnData = new ChildSpawnData(context, null /* commandLine */,
- -1 /* child process id */, null /* filesToBeMapped */,
- null /* launchCallback */, null /* child process callback */,
- true /* inSandbox */, SPARE_CONNECTION_ALWAYS_IN_FOREGROUND, params);
+ null /* filesToBeMapped */, null /* launchCallback */,
+ null /* child process callback */, true /* inSandbox */,
+ SPARE_CONNECTION_ALWAYS_IN_FOREGROUND, params);
sSpareSandboxedConnection =
allocateBoundConnection(spawnData, startCallback, true /* forWarmUp */);
sSpareConnectionStarting = sSpareSandboxedConnection != null;
@@ -355,7 +354,7 @@ public class ChildProcessLauncher {
* @param filesToBeMapped File IDs, FDs, offsets, and lengths to pass through.
* @param launchCallback Callback invoked when the connection is established.
*/
- static void start(Context context, int paramId, final String[] commandLine, int childProcessId,
+ static void start(Context context, int paramId, final String[] commandLine,
FileDescriptorInfo[] filesToBeMapped, LaunchCallback launchCallback) {
assert LauncherThread.runningOnLauncherThread();
IBinder childProcessCallback = null;
@@ -393,16 +392,16 @@ public class ChildProcessLauncher {
}
}
- startInternal(context, commandLine, childProcessId, filesToBeMapped, launchCallback,
- childProcessCallback, inSandbox, alwaysInForeground, params);
+ startInternal(context, commandLine, filesToBeMapped, launchCallback, childProcessCallback,
+ inSandbox, alwaysInForeground, params);
}
@VisibleForTesting
public static BaseChildProcessConnection startInternal(final Context context,
- final String[] commandLine, final int childProcessId,
- final FileDescriptorInfo[] filesToBeMapped, final LaunchCallback launchCallback,
- final IBinder childProcessCallback, final boolean inSandbox,
- final boolean alwaysInForeground, final ChildProcessCreationParams creationParams) {
+ final String[] commandLine, final FileDescriptorInfo[] filesToBeMapped,
+ final LaunchCallback launchCallback, final IBinder childProcessCallback,
+ final boolean inSandbox, final boolean alwaysInForeground,
+ final ChildProcessCreationParams creationParams) {
assert LauncherThread.runningOnLauncherThread();
try {
TraceEvent.begin("ChildProcessLauncher.startInternal");
@@ -427,9 +426,9 @@ public class ChildProcessLauncher {
// than one process), so try starting the process again.
// This connection that failed to start has not been freed,
// so a new bound connection will be allocated.
- startInternal(context, commandLine, childProcessId,
- filesToBeMapped, launchCallback, childProcessCallback,
- inSandbox, alwaysInForeground, creationParams);
+ startInternal(context, commandLine, filesToBeMapped,
+ launchCallback, childProcessCallback, inSandbox,
+ alwaysInForeground, creationParams);
}
});
}
@@ -450,10 +449,9 @@ public class ChildProcessLauncher {
}
}
if (allocatedConnection == null) {
-
- ChildSpawnData spawnData = new ChildSpawnData(context, commandLine, childProcessId,
- filesToBeMapped, launchCallback, childProcessCallback, inSandbox,
- alwaysInForeground, creationParams);
+ ChildSpawnData spawnData = new ChildSpawnData(context, commandLine, filesToBeMapped,
+ launchCallback, childProcessCallback, inSandbox, alwaysInForeground,
+ creationParams);
allocatedConnection =
allocateBoundConnection(spawnData, startCallback, false /* forWarmUp */);
if (allocatedConnection == null) {
@@ -461,8 +459,8 @@ public class ChildProcessLauncher {
}
}
- triggerConnectionSetup(allocatedConnection, commandLine, childProcessId,
- filesToBeMapped, childProcessCallback, launchCallback);
+ triggerConnectionSetup(allocatedConnection, commandLine, filesToBeMapped,
+ childProcessCallback, launchCallback);
return allocatedConnection;
} finally {
TraceEvent.end("ChildProcessLauncher.startInternal");
@@ -488,7 +486,7 @@ public class ChildProcessLauncher {
@VisibleForTesting
static void triggerConnectionSetup(final BaseChildProcessConnection connection,
- String[] commandLine, int childProcessId, FileDescriptorInfo[] filesToBeMapped,
+ String[] commandLine, FileDescriptorInfo[] filesToBeMapped,
final IBinder childProcessCallback, final LaunchCallback launchCallback) {
assert LauncherThread.runningOnLauncherThread();
Log.d(TAG, "Setting up connection to process, connection name=%s",

Powered by Google App Engine
This is Rietveld 408576698