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

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

Issue 1882423004: Move shell service to toplevel shell namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_ 5 #ifndef SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
6 #define SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_ 6 #define SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "sandbox/linux/bpf_dsl/bpf_dsl.h" 12 #include "sandbox/linux/bpf_dsl/bpf_dsl.h"
13 #include "sandbox/linux/bpf_dsl/policy.h" 13 #include "sandbox/linux/bpf_dsl/policy.h"
14 #include "sandbox/linux/syscall_broker/broker_process.h" 14 #include "sandbox/linux/syscall_broker/broker_process.h"
15 15
16 namespace mojo {
17 namespace shell { 16 namespace shell {
18 17
19 // Encapsulates all tasks related to raising the sandbox for mojo runner. 18 // Encapsulates all tasks related to raising the sandbox for mojo runner.
20 class LinuxSandbox { 19 class LinuxSandbox {
21 public: 20 public:
22 explicit LinuxSandbox( 21 explicit LinuxSandbox(
23 const std::vector<sandbox::syscall_broker::BrokerFilePermission>& 22 const std::vector<sandbox::syscall_broker::BrokerFilePermission>&
24 permissions); 23 permissions);
25 ~LinuxSandbox(); 24 ~LinuxSandbox();
26 25
(...skipping 14 matching lines...) Expand all
41 private: 40 private:
42 bool warmed_up_; 41 bool warmed_up_;
43 base::ScopedFD proc_fd_; 42 base::ScopedFD proc_fd_;
44 std::unique_ptr<sandbox::syscall_broker::BrokerProcess> broker_; 43 std::unique_ptr<sandbox::syscall_broker::BrokerProcess> broker_;
45 std::unique_ptr<sandbox::bpf_dsl::Policy> policy_; 44 std::unique_ptr<sandbox::bpf_dsl::Policy> policy_;
46 45
47 DISALLOW_COPY_AND_ASSIGN(LinuxSandbox); 46 DISALLOW_COPY_AND_ASSIGN(LinuxSandbox);
48 }; 47 };
49 48
50 } // namespace shell 49 } // namespace shell
51 } // namespace mojo
52 50
53 #endif // SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_ 51 #endif // SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
OLDNEW
« no previous file with comments | « services/shell/runner/host/in_process_native_runner_unittest.cc ('k') | services/shell/runner/host/linux_sandbox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698