summaryrefslogtreecommitdiffstats
path: root/content/browser/child_process_launcher.cc
diff options
context:
space:
mode:
authorDaniel Sievers <sievers@chromium.org>2014-12-11 15:02:21 -0800
committerDaniel Sievers <sievers@chromium.org>2014-12-11 23:03:16 +0000
commit1897d5d8f32fd78a9f50305149844aa417f3a0cb (patch)
treeb5a3071412530788210dc9ea4c9b65a882de460d /content/browser/child_process_launcher.cc
parente59a6e0f1513a92ceaf4725171cee420214b2c3b (diff)
downloadchromium_src-1897d5d8f32fd78a9f50305149844aa417f3a0cb.zip
chromium_src-1897d5d8f32fd78a9f50305149844aa417f3a0cb.tar.gz
chromium_src-1897d5d8f32fd78a9f50305149844aa417f3a0cb.tar.bz2
Android: CHECK() for supported child process types
BUG=396568 TBR=feng@chromium.org NOTRY=True Review URL: https://codereview.chromium.org/797783002 Cr-Commit-Position: refs/heads/master@{#307987}
Diffstat (limited to 'content/browser/child_process_launcher.cc')
-rw-r--r--content/browser/child_process_launcher.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/content/browser/child_process_launcher.cc b/content/browser/child_process_launcher.cc
index 636fd88..5f708b87 100644
--- a/content/browser/child_process_launcher.cc
+++ b/content/browser/child_process_launcher.cc
@@ -181,6 +181,18 @@ void ChildProcessLauncher::Context::Launch(
client_ = client;
#if defined(OS_ANDROID)
+ // We currently only support renderer and gpu child processes.
+ std::string process_type =
+ cmd_line->GetSwitchValueASCII(switches::kProcessType);
+ CHECK_NE(switches::kPluginProcess, process_type);
+ CHECK_NE(switches::kPpapiBrokerProcess, process_type);
+ CHECK_NE(switches::kPpapiPluginProcess, process_type);
+ CHECK_NE(switches::kSandboxIPCProcess, process_type);
+ CHECK_NE(switches::kUtilityProcess, process_type);
+ CHECK_NE(switches::kZygoteProcess, process_type);
+ CHECK(process_type == switches::kGpuProcess ||
+ process_type == switches::kRendererProcess);
+
// We need to close the client end of the IPC channel to reliably detect
// child termination. We will close this fd after we create the child
// process which is asynchronous on Android.