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

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: Build fix for unittests 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
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..5d03b4ea5a2cb6d2d9417b3d294b61f839d5eb4a 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,
jln (very slow on Chromium) 2014/02/20 23:38:52 These are not Bind() arguments, they should be ind
dshwang 2014/02/21 07:03:13 'git cl format' is super cool. thx.
+ write_whitelist_extra);
const int dlopen_flag = RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE;

Powered by Google App Engine
This is Rietveld 408576698