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 <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "build/build_config.h" | 22 #include "build/build_config.h" |
23 #include "content/public/browser/content_browser_client.h" | 23 #include "content/public/browser/content_browser_client.h" |
24 #include "content/public/common/content_descriptors.h" | 24 #include "content/public/common/content_descriptors.h" |
25 #include "content/public/common/content_switches.h" | 25 #include "content/public/common/content_switches.h" |
26 #include "content/public/common/result_codes.h" | 26 #include "content/public/common/result_codes.h" |
27 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 27 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
28 #include "mojo/edk/embedder/embedder.h" | 28 #include "mojo/edk/embedder/embedder.h" |
29 #include "mojo/edk/embedder/named_platform_channel_pair.h" | 29 #include "mojo/edk/embedder/named_platform_channel_pair.h" |
30 #include "mojo/edk/embedder/platform_channel_pair.h" | 30 #include "mojo/edk/embedder/platform_channel_pair.h" |
31 #include "mojo/edk/embedder/scoped_platform_handle.h" | 31 #include "mojo/edk/embedder/scoped_platform_handle.h" |
| 32 #include "ppapi/features/features.h" |
32 | 33 |
33 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
34 #include "base/files/file_path.h" | 35 #include "base/files/file_path.h" |
35 #include "base/win/scoped_handle.h" | 36 #include "base/win/scoped_handle.h" |
36 #include "base/win/win_util.h" | 37 #include "base/win/win_util.h" |
37 #include "content/common/sandbox_win.h" | 38 #include "content/common/sandbox_win.h" |
38 #include "content/public/common/sandbox_init.h" | 39 #include "content/public/common/sandbox_init.h" |
39 #include "sandbox/win/src/sandbox_types.h" | 40 #include "sandbox/win/src/sandbox_types.h" |
40 #elif defined(OS_MACOSX) | 41 #elif defined(OS_MACOSX) |
41 #include "content/browser/bootstrap_sandbox_manager_mac.h" | 42 #include "content/browser/bootstrap_sandbox_manager_mac.h" |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 base::CommandLine* cmd_line, | 431 base::CommandLine* cmd_line, |
431 int child_process_id) { | 432 int child_process_id) { |
432 DCHECK(CalledOnValidThread()); | 433 DCHECK(CalledOnValidThread()); |
433 | 434 |
434 #if defined(OS_ANDROID) | 435 #if defined(OS_ANDROID) |
435 // Android only supports renderer, sandboxed utility and gpu. | 436 // Android only supports renderer, sandboxed utility and gpu. |
436 std::string process_type = | 437 std::string process_type = |
437 cmd_line->GetSwitchValueASCII(switches::kProcessType); | 438 cmd_line->GetSwitchValueASCII(switches::kProcessType); |
438 CHECK(process_type == switches::kGpuProcess || | 439 CHECK(process_type == switches::kGpuProcess || |
439 process_type == switches::kRendererProcess || | 440 process_type == switches::kRendererProcess || |
440 #if defined(ENABLE_PLUGINS) | 441 #if BUILDFLAG(ENABLE_PLUGINS) |
441 process_type == switches::kPpapiPluginProcess || | 442 process_type == switches::kPpapiPluginProcess || |
442 #endif | 443 #endif |
443 process_type == switches::kUtilityProcess) | 444 process_type == switches::kUtilityProcess) |
444 << "Unsupported process type: " << process_type; | 445 << "Unsupported process type: " << process_type; |
445 | 446 |
446 // Non-sandboxed utility or renderer process are currently not supported. | 447 // Non-sandboxed utility or renderer process are currently not supported. |
447 DCHECK(process_type == switches::kGpuProcess || | 448 DCHECK(process_type == switches::kGpuProcess || |
448 !cmd_line->HasSwitch(switches::kNoSandbox)); | 449 !cmd_line->HasSwitch(switches::kNoSandbox)); |
449 | 450 |
450 #endif | 451 #endif |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 } | 602 } |
602 | 603 |
603 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 604 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
604 Client* client) { | 605 Client* client) { |
605 Client* ret = client_; | 606 Client* ret = client_; |
606 client_ = client; | 607 client_ = client; |
607 return ret; | 608 return ret; |
608 } | 609 } |
609 | 610 |
610 } // namespace content | 611 } // namespace content |
OLD | NEW |