OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/renderer/renderer_main_platform_delegate.h" | 5 #include "content/renderer/renderer_main_platform_delegate.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "content/public/common/content_switches.h" | 8 #include "content/public/common/content_switches.h" |
9 #include "content/public/common/sandbox_init.h" | 9 #include "content/public/common/sandbox_init.h" |
10 | 10 |
| 11 namespace content { |
| 12 |
11 RendererMainPlatformDelegate::RendererMainPlatformDelegate( | 13 RendererMainPlatformDelegate::RendererMainPlatformDelegate( |
12 const content::MainFunctionParams& parameters) | 14 const MainFunctionParams& parameters) |
13 : parameters_(parameters) { | 15 : parameters_(parameters) { |
14 } | 16 } |
15 | 17 |
16 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { | 18 RendererMainPlatformDelegate::~RendererMainPlatformDelegate() { |
17 } | 19 } |
18 | 20 |
19 void RendererMainPlatformDelegate::PlatformInitialize() { | 21 void RendererMainPlatformDelegate::PlatformInitialize() { |
20 } | 22 } |
21 | 23 |
22 void RendererMainPlatformDelegate::PlatformUninitialize() { | 24 void RendererMainPlatformDelegate::PlatformUninitialize() { |
23 } | 25 } |
24 | 26 |
25 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { | 27 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { |
26 // The sandbox is started in the zygote process: zygote_main_linux.cc | 28 // The sandbox is started in the zygote process: zygote_main_linux.cc |
27 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 29 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
28 return true; | 30 return true; |
29 } | 31 } |
30 | 32 |
31 bool RendererMainPlatformDelegate::EnableSandbox() { | 33 bool RendererMainPlatformDelegate::EnableSandbox() { |
32 // The setuid sandbox is started in the zygote process: zygote_main_linux.cc | 34 // The setuid sandbox is started in the zygote process: zygote_main_linux.cc |
33 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 35 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
34 // | 36 // |
35 // The seccomp sandbox mode 1 (sandbox/linux/seccomp-legacy) and mode 2 | 37 // The seccomp sandbox mode 1 (sandbox/linux/seccomp-legacy) and mode 2 |
36 // (sandbox/linux/seccomp-bpf) are started in InitializeSandbox(). | 38 // (sandbox/linux/seccomp-bpf) are started in InitializeSandbox(). |
37 content::InitializeSandbox(); | 39 InitializeSandbox(); |
38 return true; | 40 return true; |
39 } | 41 } |
40 | 42 |
41 void RendererMainPlatformDelegate::RunSandboxTests() { | 43 void RendererMainPlatformDelegate::RunSandboxTests() { |
42 // The sandbox is started in the zygote process: zygote_main_linux.cc | 44 // The sandbox is started in the zygote process: zygote_main_linux.cc |
43 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox | 45 // http://code.google.com/p/chromium/wiki/LinuxSUIDSandbox |
44 } | 46 } |
| 47 |
| 48 } // namespace content |
OLD | NEW |