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

Side by Side Diff: mojo/shell/runner/host/linux_sandbox.h

Issue 1849323003: Convert //sandbox to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixup nonsfi_sandbox_unittest.cc Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef MOJO_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_ 5 #ifndef MOJO_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
6 #define MOJO_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_ 6 #define MOJO_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
7 7
8 #include <memory>
9
8 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" 12 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
11 #include "sandbox/linux/bpf_dsl/policy.h" 13 #include "sandbox/linux/bpf_dsl/policy.h"
12 #include "sandbox/linux/syscall_broker/broker_process.h" 14 #include "sandbox/linux/syscall_broker/broker_process.h"
13 15
14 namespace mojo { 16 namespace mojo {
15 namespace shell { 17 namespace shell {
16 18
17 // Encapsulates all tasks related to raising the sandbox for mojo runner. 19 // Encapsulates all tasks related to raising the sandbox for mojo runner.
(...skipping 14 matching lines...) Expand all
32 // it. 34 // it.
33 void EngageSeccompSandbox(); 35 void EngageSeccompSandbox();
34 36
35 // Performs the dropping of access to the outside world (drops the reference 37 // Performs the dropping of access to the outside world (drops the reference
36 // to /proc acquired in Warmup(). 38 // to /proc acquired in Warmup().
37 void Seal(); 39 void Seal();
38 40
39 private: 41 private:
40 bool warmed_up_; 42 bool warmed_up_;
41 base::ScopedFD proc_fd_; 43 base::ScopedFD proc_fd_;
42 scoped_ptr<sandbox::syscall_broker::BrokerProcess> broker_; 44 std::unique_ptr<sandbox::syscall_broker::BrokerProcess> broker_;
43 scoped_ptr<sandbox::bpf_dsl::Policy> policy_; 45 std::unique_ptr<sandbox::bpf_dsl::Policy> policy_;
44 46
45 DISALLOW_COPY_AND_ASSIGN(LinuxSandbox); 47 DISALLOW_COPY_AND_ASSIGN(LinuxSandbox);
46 }; 48 };
47 49
48 } // namespace shell 50 } // namespace shell
49 } // namespace mojo 51 } // namespace mojo
50 52
51 #endif // MOJO_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_ 53 #endif // MOJO_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
OLDNEW
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc ('k') | sandbox/linux/integration_tests/bpf_dsl_seccomp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698