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

Unified Diff: services/shell/runner/host/linux_sandbox.h

Issue 2419723002: Move services/shell to services/service_manager (Closed)
Patch Set: rebase Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: services/shell/runner/host/linux_sandbox.h
diff --git a/services/shell/runner/host/linux_sandbox.h b/services/shell/runner/host/linux_sandbox.h
deleted file mode 100644
index bd1880a54c523620935e5426a2258330fea4e8d7..0000000000000000000000000000000000000000
--- a/services/shell/runner/host/linux_sandbox.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
-#define SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
-
-#include <memory>
-
-#include "base/files/scoped_file.h"
-#include "base/macros.h"
-#include "sandbox/linux/bpf_dsl/bpf_dsl.h"
-#include "sandbox/linux/bpf_dsl/policy.h"
-#include "sandbox/linux/syscall_broker/broker_process.h"
-
-namespace shell {
-
-// Encapsulates all tasks related to raising the sandbox for mojo runner.
-class LinuxSandbox {
- public:
- explicit LinuxSandbox(
- const std::vector<sandbox::syscall_broker::BrokerFilePermission>&
- permissions);
- ~LinuxSandbox();
-
- // Grabs a file descriptor to /proc.
- void Warmup();
-
- // Puts the user in a new PID namespace.
- void EngageNamespaceSandbox();
-
- // Starts a broker process and sets up seccomp-bpf to delegate decisions to
- // it.
- void EngageSeccompSandbox();
-
- // Performs the dropping of access to the outside world (drops the reference
- // to /proc acquired in Warmup().
- void Seal();
-
- private:
- bool warmed_up_;
- base::ScopedFD proc_fd_;
- std::unique_ptr<sandbox::syscall_broker::BrokerProcess> broker_;
- std::unique_ptr<sandbox::bpf_dsl::Policy> policy_;
-
- DISALLOW_COPY_AND_ASSIGN(LinuxSandbox);
-};
-
-} // namespace shell
-
-#endif // SERVICES_SHELL_RUNNER_HOST_LINUX_SANDBOX_H_
« 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