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

Side by Side Diff: content/common/sandbox_linux/sandbox_seccomp_bpf_linux.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/sandbox_linux/sandbox_seccomp_bpf_linux.h" 5 #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <sys/socket.h> 9 #include <sys/socket.h>
10 #include <sys/stat.h> 10 #include <sys/stat.h>
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 const base::CommandLine& command_line = 165 const base::CommandLine& command_line =
166 *base::CommandLine::ForCurrentProcess(); 166 *base::CommandLine::ForCurrentProcess();
167 if (IsChromeOS() && IsArchitectureArm()) { 167 if (IsChromeOS() && IsArchitectureArm()) {
168 bool allow_sysv_shm = 168 bool allow_sysv_shm =
169 command_line.HasSwitch(switches::kGpuSandboxAllowSysVShm); 169 command_line.HasSwitch(switches::kGpuSandboxAllowSysVShm);
170 return std::unique_ptr<SandboxBPFBasePolicy>( 170 return std::unique_ptr<SandboxBPFBasePolicy>(
171 new CrosArmGpuProcessPolicy(allow_sysv_shm)); 171 new CrosArmGpuProcessPolicy(allow_sysv_shm));
172 } else { 172 } else {
173 bool allow_mincore = command_line.HasSwitch(switches::kUseGL) && 173 bool allow_mincore = command_line.HasSwitch(switches::kUseGL) &&
174 command_line.GetSwitchValueASCII(switches::kUseGL) == 174 command_line.GetSwitchValueASCII(switches::kUseGL) ==
175 gfx::kGLImplementationEGLName; 175 gl::kGLImplementationEGLName;
176 return std::unique_ptr<SandboxBPFBasePolicy>( 176 return std::unique_ptr<SandboxBPFBasePolicy>(
177 new GpuProcessPolicy(allow_mincore)); 177 new GpuProcessPolicy(allow_mincore));
178 } 178 }
179 } 179 }
180 180
181 // Initialize the seccomp-bpf sandbox. 181 // Initialize the seccomp-bpf sandbox.
182 bool StartBPFSandbox(const base::CommandLine& command_line, 182 bool StartBPFSandbox(const base::CommandLine& command_line,
183 const std::string& process_type, 183 const std::string& process_type,
184 base::ScopedFD proc_fd) { 184 base::ScopedFD proc_fd) {
185 std::unique_ptr<SandboxBPFBasePolicy> policy; 185 std::unique_ptr<SandboxBPFBasePolicy> policy;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 SandboxSeccompBPF::GetBaselinePolicy() { 299 SandboxSeccompBPF::GetBaselinePolicy() {
300 #if defined(USE_SECCOMP_BPF) 300 #if defined(USE_SECCOMP_BPF)
301 return std::unique_ptr<sandbox::bpf_dsl::Policy>(new BaselinePolicy); 301 return std::unique_ptr<sandbox::bpf_dsl::Policy>(new BaselinePolicy);
302 #else 302 #else
303 return std::unique_ptr<sandbox::bpf_dsl::Policy>(); 303 return std::unique_ptr<sandbox::bpf_dsl::Policy>();
304 #endif // defined(USE_SECCOMP_BPF) 304 #endif // defined(USE_SECCOMP_BPF)
305 } 305 }
306 #endif // !defined(OS_NACL_NONSFI) 306 #endif // !defined(OS_NACL_NONSFI)
307 307
308 } // namespace content 308 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.cc ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698