Chromium Code Reviews| 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; |