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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "content/public/common/sandboxed_process_launcher_delegate.h" | 6 #include "content/public/common/sandboxed_process_launcher_delegate.h" |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 | 9 |
10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
11 bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() { | 11 bool SandboxedProcessLauncherDelegate::ShouldLaunchElevated() { |
12 return false; | 12 return false; |
13 } | 13 } |
14 | 14 |
15 bool SandboxedProcessLauncherDelegate::ShouldSandbox() { | 15 bool SandboxedProcessLauncherDelegate::ShouldSandbox() { |
16 return true; | 16 return true; |
17 } | 17 } |
18 | 18 |
19 bool SandboxedProcessLauncherDelegate::DisableDefaultPolicy() { | 19 bool SandboxedProcessLauncherDelegate::DisableDefaultPolicy() { |
20 return false; | 20 return false; |
21 } | 21 } |
22 | 22 |
23 bool SandboxedProcessLauncherDelegate::PreSpawnTarget( | 23 bool SandboxedProcessLauncherDelegate::PreSpawnTarget( |
24 sandbox::TargetPolicy* policy) { | 24 sandbox::TargetPolicy* policy) { |
25 return true; | 25 return true; |
26 } | 26 } |
27 | 27 |
28 #elif(OS_POSIX) | 28 #elif(OS_POSIX) |
29 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) | 29 bool SandboxedProcessLauncherDelegate::ShouldUseZygote() { |
30 ZygoteHandle* SandboxedProcessLauncherDelegate::GetZygote() { | 30 return false; |
31 return nullptr; | |
32 } | 31 } |
33 #endif // !defined(OS_MACOSX) && !defined(OS_ANDROID) | |
34 | 32 |
35 base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { | 33 base::EnvironmentMap SandboxedProcessLauncherDelegate::GetEnvironment() { |
36 return base::EnvironmentMap(); | 34 return base::EnvironmentMap(); |
37 } | 35 } |
38 #endif | 36 #endif |
39 | 37 |
40 SandboxType SandboxedProcessLauncherDelegate::GetSandboxType() { | 38 SandboxType SandboxedProcessLauncherDelegate::GetSandboxType() { |
41 return SANDBOX_TYPE_INVALID; | 39 return SANDBOX_TYPE_INVALID; |
42 } | 40 } |
43 | 41 |
44 } // namespace content | 42 } // namespace content |
OLD | NEW |