| 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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 | 437 |
| 438 #if defined(OS_ANDROID) | 438 #if defined(OS_ANDROID) |
| 439 // Android only supports renderer, sandboxed utility and gpu. | 439 // Android only supports renderer, sandboxed utility and gpu. |
| 440 std::string process_type = | 440 std::string process_type = |
| 441 cmd_line->GetSwitchValueASCII(switches::kProcessType); | 441 cmd_line->GetSwitchValueASCII(switches::kProcessType); |
| 442 CHECK(process_type == switches::kGpuProcess || | 442 CHECK(process_type == switches::kGpuProcess || |
| 443 process_type == switches::kRendererProcess || | 443 process_type == switches::kRendererProcess || |
| 444 #if BUILDFLAG(ENABLE_PLUGINS) | 444 #if BUILDFLAG(ENABLE_PLUGINS) |
| 445 process_type == switches::kPpapiPluginProcess || | 445 process_type == switches::kPpapiPluginProcess || |
| 446 #endif | 446 #endif |
| 447 process_type == switches::kUtilityProcess) | 447 process_type == switches::kUtilityProcess); |
| 448 << "Unsupported process type: " << process_type; | |
| 449 | 448 |
| 450 // Non-sandboxed utility or renderer process are currently not supported. | 449 // Non-sandboxed utility or renderer process are currently not supported. |
| 451 DCHECK(process_type == switches::kGpuProcess || | 450 DCHECK(process_type == switches::kGpuProcess || |
| 452 !cmd_line->HasSwitch(switches::kNoSandbox)); | 451 !cmd_line->HasSwitch(switches::kNoSandbox)); |
| 453 | 452 |
| 454 #endif | 453 #endif |
| 455 mojo::edk::ScopedPlatformHandle server_handle; | 454 mojo::edk::ScopedPlatformHandle server_handle; |
| 456 mojo::edk::ScopedPlatformHandle client_handle; | 455 mojo::edk::ScopedPlatformHandle client_handle; |
| 457 #if defined(OS_WIN) | 456 #if defined(OS_WIN) |
| 458 if (delegate->ShouldLaunchElevated()) { | 457 if (delegate->ShouldLaunchElevated()) { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 } | 604 } |
| 606 | 605 |
| 607 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( | 606 ChildProcessLauncher::Client* ChildProcessLauncher::ReplaceClientForTest( |
| 608 Client* client) { | 607 Client* client) { |
| 609 Client* ret = client_; | 608 Client* ret = client_; |
| 610 client_ = client; | 609 client_ = client; |
| 611 return ret; | 610 return ret; |
| 612 } | 611 } |
| 613 | 612 |
| 614 } // namespace content | 613 } // namespace content |
| OLD | NEW |