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 be12dda26307d8e80e08510bd25e1aca17115873..9ad8b51473e3f2bcdbbecea31b6973bc8872219d 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 |
@@ -403,16 +403,22 @@ public class ChildProcessLauncher { |
} |
} |
+ private static Bundle createCommonParamsBundle(ChildProcessCreationParams params) { |
+ Bundle commonParams = new Bundle(); |
+ commonParams.putParcelable( |
+ ChildProcessConstants.EXTRA_LINKER_PARAMS, getLinkerParamsForNewConnection()); |
+ final boolean bindToCallerCheck = params == null ? false : params.getBindToCallerCheck(); |
+ commonParams.putBoolean(ChildProcessConstants.EXTRA_BIND_TO_CALLER, bindToCallerCheck); |
+ return commonParams; |
+ } |
+ |
private static ChildProcessConnection allocateBoundConnection(SpawnData spawnData, |
boolean alwaysInForeground, ChildProcessConnection.StartCallback startCallback) { |
final Context context = spawnData.context(); |
final boolean inSandbox = spawnData.inSandbox(); |
final ChildProcessCreationParams creationParams = spawnData.getCreationParams(); |
- Bundle commonParams = new Bundle(); |
- commonParams.putParcelable( |
- ChildProcessConstants.EXTRA_LINKER_PARAMS, getLinkerParamsForNewConnection()); |
- ChildProcessConnection connection = |
- allocateConnection(spawnData, commonParams, alwaysInForeground); |
+ ChildProcessConnection connection = allocateConnection(spawnData, |
+ createCommonParamsBundle(spawnData.getCreationParams()), alwaysInForeground); |
if (connection != null) { |
connection.start(startCallback); |
@@ -629,7 +635,8 @@ public class ChildProcessLauncher { |
// Chrome's package to use when initializing a non-renderer processes. |
// TODO(boliu): Should fold into |paramId|. Investigate why this is needed. |
params = new ChildProcessCreationParams(context.getPackageName(), |
- params.getIsExternalService(), params.getLibraryProcessType()); |
+ params.getIsExternalService(), params.getLibraryProcessType(), |
+ params.getBindToCallerCheck()); |
} |
if (ContentSwitches.SWITCH_GPU_PROCESS.equals(processType)) { |
callbackType = CALLBACK_FOR_GPU_PROCESS; |
@@ -808,17 +815,14 @@ public class ChildProcessLauncher { |
} |
@VisibleForTesting |
- static ChildProcessConnection allocateConnectionForTesting(Context context, |
- ChildProcessCreationParams creationParams) { |
- Bundle commonParams = new Bundle(); |
- commonParams.putParcelable( |
- ChildProcessConstants.EXTRA_LINKER_PARAMS, getLinkerParamsForNewConnection()); |
+ static ChildProcessConnection allocateConnectionForTesting( |
+ Context context, ChildProcessCreationParams creationParams) { |
return allocateConnection( |
new SpawnData(false /* forWarmUp */, context, null /* commandLine */, |
0 /* childProcessId */, null /* filesToBeMapped */, |
null /* LaunchCallback */, CALLBACK_FOR_RENDERER_PROCESS, |
true /* inSandbox */, creationParams), |
- commonParams, false); |
+ createCommonParamsBundle(creationParams), false); |
} |
/** |