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

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

Issue 800993003: Android: Allow sandboxed utility process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9a10a80e627f0f3a8872136c54d035cb88b6fc97..2d7419fed29d28efdeac53b736174e66774aa1f0 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
@@ -40,9 +40,11 @@ public class ChildProcessLauncher {
static final int CALLBACK_FOR_UNKNOWN_PROCESS = 0;
static final int CALLBACK_FOR_GPU_PROCESS = 1;
static final int CALLBACK_FOR_RENDERER_PROCESS = 2;
+ static final int CALLBACK_FOR_UTILITY_PROCESS = 3;
private static final String SWITCH_PROCESS_TYPE = "type";
private static final String SWITCH_RENDERER_PROCESS = "renderer";
+ private static final String SWITCH_UTILITY_PROCESS = "utility";
private static final String SWITCH_GPU_PROCESS = "gpu-process";
private static class ChildConnectionAllocator {
@@ -403,6 +405,9 @@ public class ChildProcessLauncher {
} else if (SWITCH_GPU_PROCESS.equals(processType)) {
callbackType = CALLBACK_FOR_GPU_PROCESS;
inSandbox = false;
+ } else if (SWITCH_UTILITY_PROCESS.equals(processType)) {
+ // We only support sandboxed right now.
+ callbackType = CALLBACK_FOR_UTILITY_PROCESS;
} else {
assert false;
}
@@ -459,9 +464,7 @@ public class ChildProcessLauncher {
}
};
- // TODO(sievers): Revisit this as it doesn't correctly handle the utility process
- // assert callbackType != CALLBACK_FOR_UNKNOWN_PROCESS;
-
+ assert callbackType != CALLBACK_FOR_UNKNOWN_PROCESS;
connection.setupConnection(commandLine,
filesToBeMapped,
createCallback(childProcessId, callbackType),
« no previous file with comments | « content/browser/child_process_launcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698