OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 base::CommandLine* cmd_line, | 365 base::CommandLine* cmd_line, |
366 int child_process_id) { | 366 int child_process_id) { |
367 DCHECK(CalledOnValidThread()); | 367 DCHECK(CalledOnValidThread()); |
368 | 368 |
369 #if defined(OS_ANDROID) | 369 #if defined(OS_ANDROID) |
370 // Android only supports renderer, sandboxed utility and gpu. | 370 // Android only supports renderer, sandboxed utility and gpu. |
371 std::string process_type = | 371 std::string process_type = |
372 cmd_line->GetSwitchValueASCII(switches::kProcessType); | 372 cmd_line->GetSwitchValueASCII(switches::kProcessType); |
373 CHECK(process_type == switches::kGpuProcess || | 373 CHECK(process_type == switches::kGpuProcess || |
374 process_type == switches::kRendererProcess || | 374 process_type == switches::kRendererProcess || |
| 375 #if defined(ENABLE_PLUGINS) |
| 376 process_type == switches::kPpapiPluginProcess || |
| 377 #endif |
375 process_type == switches::kUtilityProcess) | 378 process_type == switches::kUtilityProcess) |
376 << "Unsupported process type: " << process_type; | 379 << "Unsupported process type: " << process_type; |
377 | 380 |
378 // Non-sandboxed utility or renderer process are currently not supported. | 381 // Non-sandboxed utility or renderer process are currently not supported. |
379 DCHECK(process_type == switches::kGpuProcess || | 382 DCHECK(process_type == switches::kGpuProcess || |
380 !cmd_line->HasSwitch(switches::kNoSandbox)); | 383 !cmd_line->HasSwitch(switches::kNoSandbox)); |
381 | 384 |
382 // We need to close the client end of the IPC channel to reliably detect | 385 // We need to close the client end of the IPC channel to reliably detect |
383 // child termination. We will close this fd after we create the child | 386 // child termination. We will close this fd after we create the child |
384 // process which is asynchronous on Android. | 387 // process which is asynchronous on Android. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 } | 544 } |
542 | 545 |
543 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 546 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
544 Client* client) { | 547 Client* client) { |
545 Client* ret = client_; | 548 Client* ret = client_; |
546 client_ = client; | 549 client_ = client; |
547 return ret; | 550 return ret; |
548 } | 551 } |
549 | 552 |
550 } // namespace content | 553 } // namespace content |
OLD | NEW |