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

Side by Side Diff: content/common/sandbox_linux/sandbox_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 <dirent.h> 5 #include <dirent.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <sys/resource.h> 7 #include <sys/resource.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 #include <sys/time.h> 9 #include <sys/time.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
11 11
12 #include <limits> 12 #include <limits>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/callback_helpers.h" 15 #include "base/callback_helpers.h"
16 #include "base/command_line.h" 16 #include "base/command_line.h"
17 #include "base/logging.h" 17 #include "base/logging.h"
18 #include "base/memory/singleton.h" 18 #include "base/memory/singleton.h"
19 #include "base/posix/eintr_wrapper.h" 19 #include "base/posix/eintr_wrapper.h"
20 #include "base/strings/string_number_conversions.h" 20 #include "base/strings/string_number_conversions.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "content/common/sandbox_linux.h" 22 #include "content/common/sandbox_linux/sandbox_linux.h"
23 #include "content/common/sandbox_seccomp_bpf_linux.h" 23 #include "content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h"
24 #include "content/public/common/content_switches.h" 24 #include "content/public/common/content_switches.h"
25 #include "content/public/common/sandbox_linux.h" 25 #include "content/public/common/sandbox_linux.h"
26 #include "sandbox/linux/services/credentials.h" 26 #include "sandbox/linux/services/credentials.h"
27 #include "sandbox/linux/suid/client/setuid_sandbox_client.h" 27 #include "sandbox/linux/suid/client/setuid_sandbox_client.h"
28 28
29 namespace { 29 namespace {
30 30
31 void LogSandboxStarted(const std::string& sandbox_name) { 31 void LogSandboxStarted(const std::string& sandbox_name) {
32 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 32 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
33 const std::string process_type = 33 const std::string process_type =
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 void LinuxSandbox::SealSandbox() { 290 void LinuxSandbox::SealSandbox() {
291 if (proc_fd_ >= 0) { 291 if (proc_fd_ >= 0) {
292 int ret = IGNORE_EINTR(close(proc_fd_)); 292 int ret = IGNORE_EINTR(close(proc_fd_));
293 CHECK_EQ(0, ret); 293 CHECK_EQ(0, ret);
294 proc_fd_ = -1; 294 proc_fd_ = -1;
295 } 295 }
296 } 296 }
297 297
298 } // namespace content 298 } // namespace content
299 299
OLDNEW
« no previous file with comments | « content/common/sandbox_linux/sandbox_linux.h ('k') | content/common/sandbox_linux/sandbox_seccomp_bpf_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698