| 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 "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 31 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
| 32 const CommandLine& command_line = parameters_.command_line; | 32 const CommandLine& command_line = parameters_.command_line; |
| 33 if (command_line.HasSwitch(switches::kEnableVtune)) | 33 if (command_line.HasSwitch(switches::kEnableVtune)) |
| 34 vTune::InitializeVtuneForV8(); | 34 vTune::InitializeVtuneForV8(); |
| 35 #endif | 35 #endif |
| 36 } | 36 } |
| 37 | 37 |
| 38 void RendererMainPlatformDelegate::PlatformUninitialize() { | 38 void RendererMainPlatformDelegate::PlatformUninitialize() { |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool RendererMainPlatformDelegate::InitSandboxTests(bool no_sandbox) { | |
| 42 return true; | |
| 43 } | |
| 44 | |
| 45 bool RendererMainPlatformDelegate::EnableSandbox() { | 41 bool RendererMainPlatformDelegate::EnableSandbox() { |
| 46 #ifdef USE_SECCOMP_BPF | 42 #ifdef USE_SECCOMP_BPF |
| 47 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 43 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 48 switches::kEnableSeccompFilterSandbox)) { | 44 switches::kEnableSeccompFilterSandbox)) { |
| 49 return true; | 45 return true; |
| 50 } | 46 } |
| 51 | 47 |
| 52 sandbox::SandboxBPF sandbox; | 48 sandbox::SandboxBPF sandbox; |
| 53 sandbox.SetSandboxPolicy(new SandboxBPFBasePolicyAndroid()); | 49 sandbox.SetSandboxPolicy(new SandboxBPFBasePolicyAndroid()); |
| 54 CHECK(sandbox.StartSandbox(sandbox::SandboxBPF::PROCESS_MULTI_THREADED)); | 50 CHECK(sandbox.StartSandbox(sandbox::SandboxBPF::PROCESS_MULTI_THREADED)); |
| 55 #endif | 51 #endif |
| 56 return true; | 52 return true; |
| 57 } | 53 } |
| 58 | 54 |
| 59 void RendererMainPlatformDelegate::RunSandboxTests(bool no_sandbox) { | |
| 60 } | |
| 61 | |
| 62 } // namespace content | 55 } // namespace content |
| OLD | NEW |