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

Unified Diff: content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc

Issue 163433011: Clarify the process title of GPU broker process. (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Address a few more nits Created 6 years, 10 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
« no previous file with comments | « no previous file | content/common/sandbox_linux/bpf_gpu_policy_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
diff --git a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
index e1bf8a042ba85beb498314b4909f4b61daf6d245..82a91b38021f829167062cb723d4dce1b4c599bd 100644
--- a/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
+++ b/content/common/sandbox_linux/bpf_cros_arm_gpu_policy_linux.cc
@@ -15,6 +15,7 @@
#include <string>
#include <vector>
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
@@ -151,11 +152,6 @@ ErrorCode CrosArmGpuBrokerProcessPolicy::EvaluateSyscall(SandboxBPF* sandbox,
}
}
-bool EnableArmGpuBrokerPolicyCallback() {
- return SandboxSeccompBPF::StartSandboxWithExternalPolicy(
- scoped_ptr<sandbox::SandboxBPFPolicy>(new CrosArmGpuBrokerProcessPolicy));
-}
-
} // namespace
CrosArmGpuProcessPolicy::CrosArmGpuProcessPolicy(bool allow_shmat)
@@ -207,9 +203,12 @@ bool CrosArmGpuProcessPolicy::PreSandboxHook() {
// Add ARM-specific files to whitelist in the broker.
AddArmGpuWhitelist(&read_whitelist_extra, &write_whitelist_extra);
- InitGpuBrokerProcess(EnableArmGpuBrokerPolicyCallback,
- read_whitelist_extra,
- write_whitelist_extra);
+ InitGpuBrokerProcess(
+ base::Bind(&SandboxSeccompBPF::StartSandboxWithExternalPolicy,
+ base::Passed(scoped_ptr<sandbox::SandboxBPFPolicy>(
+ new CrosArmGpuBrokerProcessPolicy))),
+ read_whitelist_extra,
+ write_whitelist_extra);
const int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE;
« no previous file with comments | « no previous file | content/common/sandbox_linux/bpf_gpu_policy_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698