Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Side by Side Diff: content/renderer/renderer_main_platform_delegate_android.cc

Issue 285283003: Remove flag --test-sandbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changes requested by jln Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698