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

Side by Side Diff: content/common/child_process_sandbox_support_impl_shm_linux.cc

Issue 99133015: Linux Sandbox: split the GPU policies to their own file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address nits from Mark. Created 7 years 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 | Annotate | Revision Log
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/child_process_sandbox_support_impl_linux.h" 5 #include "content/common/child_process_sandbox_support_impl_linux.h"
6 6
7 #include "base/pickle.h" 7 #include "base/pickle.h"
8 #include "base/posix/unix_domain_socket_linux.h" 8 #include "base/posix/unix_domain_socket_linux.h"
9 #include "content/common/sandbox_linux.h" 9 #include "content/common/sandbox_linux/sandbox_linux.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 int MakeSharedMemorySegmentViaIPC(size_t length, bool executable) { 13 int MakeSharedMemorySegmentViaIPC(size_t length, bool executable) {
14 Pickle request; 14 Pickle request;
15 request.WriteInt(LinuxSandbox::METHOD_MAKE_SHARED_MEMORY_SEGMENT); 15 request.WriteInt(LinuxSandbox::METHOD_MAKE_SHARED_MEMORY_SEGMENT);
16 request.WriteUInt32(length); 16 request.WriteUInt32(length);
17 request.WriteBool(executable); 17 request.WriteBool(executable);
18 uint8_t reply_buf[10]; 18 uint8_t reply_buf[10];
19 int result_fd; 19 int result_fd;
20 ssize_t result = UnixDomainSocket::SendRecvMsg(GetSandboxFD(), 20 ssize_t result = UnixDomainSocket::SendRecvMsg(GetSandboxFD(),
21 reply_buf, sizeof(reply_buf), 21 reply_buf, sizeof(reply_buf),
22 &result_fd, request); 22 &result_fd, request);
23 if (result == -1) 23 if (result == -1)
24 return -1; 24 return -1;
25 return result_fd; 25 return result_fd;
26 } 26 }
27 27
28 } // namespace content 28 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_sandbox_support_impl_linux.cc ('k') | content/common/sandbox_bpf_base_policy_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698