Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/public/common/sandboxed_process_launcher_delegate.h" | |
| 6 | |
| 5 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 6 #include "content/public/common/sandboxed_process_launcher_delegate.h" | |
| 7 | 8 |
| 8 namespace content { | 9 namespace content { |
| 9 | 10 |
| 10 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
| 11 bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() { | 12 bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() { |
| 12 return false; | 13 return false; |
| 13 } | 14 } |
| 14 | 15 |
| 15 bool SandboxedProcessLauncherDelegate::ShouldSandbox() { | 16 bool SandboxedProcessLauncherDelegate::ShouldSandbox() { |
| 16 return true; | 17 return true; |
| 17 } | 18 } |
| 18 | 19 |
| 19 bool SandboxedProcessLauncherDelegate::DisableDefaultPolicy() { | 20 bool SandboxedProcessLauncherDelegate::DisableDefaultPolicy() { |
| 20 return false; | 21 return false; |
| 21 } | 22 } |
| 22 | 23 |
| 23 bool SandboxedProcessLauncherDelegate::PreSpawnTarget( | 24 bool SandboxedProcessLauncherDelegate::PreSpawnTarget( |
| 24 sandbox::TargetPolicy* policy) { | 25 sandbox::TargetPolicy* policy) { |
| 25 return true; | 26 return true; |
| 26 } | 27 } |
| 27 | 28 |
| 28 #elif(OS_POSIX) | 29 #elif(OS_POSIX) |
| 30 | |
| 29 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 31 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 30 ZygoteHandle* SandboxedProcessLauncherDelegate::GetZygote() { | 32 ZygoteHandle SandboxedProcessLauncherDelegate::GetZygote() { |
| 31 return nullptr; | 33 return nullptr; |
|
James Cook
2017/04/28 20:07:52
I could also make this return GetGenericZygote().
mdempsky
2017/04/28 22:13:45
I believe some of the launcher delegate subclasses
| |
| 32 } | 34 } |
| 33 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) | 35 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) |
| 34 | 36 |
| 35 base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { | 37 base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { |
| 36 return base::EnvironmentMap(); | 38 return base::EnvironmentMap(); |
| 37 } | 39 } |
| 38 #endif | 40 #endif |
| 39 | 41 |
| 40 SandboxType SandboxedProcessLauncherDelegate::GetSandboxType() { | 42 SandboxType SandboxedProcessLauncherDelegate::GetSandboxType() { |
| 41 return SANDBOX_TYPE_INVALID; | 43 return SANDBOX_TYPE_INVALID; |
| 42 } | 44 } |
| 43 | 45 |
| 44 } // namespace content | 46 } // namespace content |
| OLD | NEW |