Chromium Code Reviews| Index: sandbox/linux/seccomp-bpf/sandbox_bpf.h |
| diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.h b/sandbox/linux/seccomp-bpf/sandbox_bpf.h |
| index fef50988b3cd295da29c59ce4f8d25cc164ccc33..3585774b06afeccbade74064a5b912d685d8e81f 100644 |
| --- a/sandbox/linux/seccomp-bpf/sandbox_bpf.h |
| +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.h |
| @@ -21,7 +21,7 @@ |
| #include "sandbox/linux/seccomp-bpf/errorcode.h" |
| #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" |
| -namespace playground2 { |
| +namespace sandbox { |
| struct arch_seccomp_data { |
| int nr; |
| @@ -38,10 +38,10 @@ struct arch_sigsys { |
| class CodeGen; |
| class SandboxUnittestHelper; |
| -class SandboxBpfPolicy; |
| +class SandboxBPFPolicy; |
|
Robert Sesek
2013/12/10 21:15:26
nit: alphabetize
jln (very slow on Chromium)
2013/12/10 21:36:38
Done.
|
| struct Instruction; |
| -class Sandbox { |
| +class SandboxBPF { |
| public: |
| enum SandboxStatus { |
| STATUS_UNKNOWN, // Status prior to calling supportsSeccompSandbox() |
| @@ -56,7 +56,7 @@ class Sandbox { |
| // policy each time a call is made through an EvaluateSyscall function |
| // pointer. One common use case would be to pass the "aux" pointer as an |
| // argument to Trap() functions. |
| - typedef ErrorCode (*EvaluateSyscall)(Sandbox* sandbox_compiler, |
| + typedef ErrorCode (*EvaluateSyscall)(SandboxBPF* sandbox_compiler, |
| int system_call_number, |
| void* aux); |
| typedef std::vector<std::pair<EvaluateSyscall, void*> > Evaluators; |
| @@ -74,8 +74,8 @@ class Sandbox { |
| // should be noted that during its lifetime, the object probably made |
| // irreversible state changes to the runtime environment. These changes |
| // stay in effect even after the destructor has been run. |
| - Sandbox(); |
| - ~Sandbox(); |
| + SandboxBPF(); |
| + ~SandboxBPF(); |
| // Checks whether a particular system call number is valid on the current |
| // architecture. E.g. on ARM there's a non-contiguous range of private |
| @@ -112,7 +112,7 @@ class Sandbox { |
| // Set the BPF policy as |policy|. Ownership of |policy| is transfered here |
| // to the sandbox object. |
| - void SetSandboxPolicy(SandboxBpfPolicy* policy); |
| + void SetSandboxPolicy(SandboxBPFPolicy* policy); |
| // We can use ErrorCode to request calling of a trap handler. This method |
| // performs the required wrapping of the callback function into an |
| @@ -224,7 +224,7 @@ class Sandbox { |
| bool KernelSupportSeccompBPF(); |
| // Verify that the current policy passes some basic sanity checks. |
| - void PolicySanityChecks(SandboxBpfPolicy* policy); |
| + void PolicySanityChecks(SandboxBPFPolicy* policy); |
| // Assembles and installs a filter based on the policy that has previously |
| // been configured with SetSandboxPolicy(). |
| @@ -264,11 +264,11 @@ class Sandbox { |
| bool quiet_; |
| int proc_fd_; |
| - scoped_ptr<const SandboxBpfPolicy> policy_; |
| + scoped_ptr<const SandboxBPFPolicy> policy_; |
| Conds* conds_; |
| bool sandbox_has_started_; |
| - DISALLOW_COPY_AND_ASSIGN(Sandbox); |
| + DISALLOW_COPY_AND_ASSIGN(SandboxBPF); |
| }; |
| } // namespace |
|
Robert Sesek
2013/12/10 21:15:26
"namespace sandbox"
jln (very slow on Chromium)
2013/12/10 21:36:38
Done.
|