Chromium Code Reviews| Index: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc |
| diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc |
| index 988e29544b0d5b21a0b532749c7a68296f9d9fa2..04cb5308db683ed113f0ed798bd9d6bda6b1398d 100644 |
| --- a/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc |
| +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc |
| @@ -20,6 +20,7 @@ |
| #include <ostream> |
| +#include "base/bind.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "build/build_config.h" |
| #include "sandbox/linux/seccomp-bpf/bpf_tests.h" |
| @@ -671,6 +672,9 @@ BPF_TEST(SandboxBPF, UnsafeTrapWithErrno, RedirectAllSyscallsPolicy) { |
| } |
| // Test a trap handler that makes use of a broker process to open(). |
| +bool NoOpCallback() { |
|
jln (very slow on Chromium)
2014/02/20 23:38:52
The comment becomes a little confusing here. Let's
dshwang
2014/02/21 07:03:13
I move this function few lines above, not the top.
|
| + return true; |
| +} |
| class InitializedOpenBroker { |
| public: |
| @@ -682,7 +686,7 @@ class InitializedOpenBroker { |
| broker_process_.reset( |
| new BrokerProcess(EPERM, allowed_files, std::vector<std::string>())); |
| BPF_ASSERT(broker_process() != NULL); |
| - BPF_ASSERT(broker_process_->Init(NULL)); |
| + BPF_ASSERT(broker_process_->Init(base::Bind(&NoOpCallback))); |
| initialized_ = true; |
| } |