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

Unified Diff: sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « net/url_request/url_request_unittest.cc ('k') | sandbox/linux/seccomp-bpf/codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
diff --git a/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc b/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
index 192e68ddfc9d5a2cb52e92d4bd7f1908ed0ceb41..9727d28f04288e9332f757d0558926218f48d52c 100644
--- a/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
+++ b/sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc
@@ -46,9 +46,9 @@ class EmptyClassTakingPolicy : public bpf_dsl::Policy {
BPF_ASSERT(fourty_two);
BPF_ASSERT(FourtyTwo::kMagicValue == fourty_two->value());
}
- virtual ~EmptyClassTakingPolicy() {}
+ ~EmptyClassTakingPolicy() override {}
- virtual ResultExpr EvaluateSyscall(int sysno) const override {
+ ResultExpr EvaluateSyscall(int sysno) const override {
DCHECK(SandboxBPF::IsValidSyscallNumber(sysno));
return Allow();
}
@@ -84,13 +84,13 @@ TEST(BPFTest, BPFTesterCompatibilityDelegateLeakTest) {
class EnosysPtracePolicy : public bpf_dsl::Policy {
public:
EnosysPtracePolicy() { my_pid_ = sys_getpid(); }
- virtual ~EnosysPtracePolicy() {
+ ~EnosysPtracePolicy() override {
// Policies should be able to bind with the process on which they are
// created. They should never be created in a parent process.
BPF_ASSERT_EQ(my_pid_, sys_getpid());
}
- virtual ResultExpr EvaluateSyscall(int system_call_number) const override {
+ ResultExpr EvaluateSyscall(int system_call_number) const override {
CHECK(SandboxBPF::IsValidSyscallNumber(system_call_number));
if (system_call_number == __NR_ptrace) {
// The EvaluateSyscall function should run in the process that created
@@ -110,12 +110,12 @@ class EnosysPtracePolicy : public bpf_dsl::Policy {
class BasicBPFTesterDelegate : public BPFTesterDelegate {
public:
BasicBPFTesterDelegate() {}
- virtual ~BasicBPFTesterDelegate() {}
+ ~BasicBPFTesterDelegate() override {}
- virtual scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
+ scoped_ptr<bpf_dsl::Policy> GetSandboxBPFPolicy() override {
return scoped_ptr<bpf_dsl::Policy>(new EnosysPtracePolicy());
}
- virtual void RunTestFunction() override {
+ void RunTestFunction() override {
errno = 0;
int ret = ptrace(PTRACE_TRACEME, -1, NULL, NULL);
BPF_ASSERT(-1 == ret);
« no previous file with comments | « net/url_request/url_request_unittest.cc ('k') | sandbox/linux/seccomp-bpf/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698