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

Side by Side Diff: components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.cc

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.h" 5 #include "components/nacl/loader/sandbox_linux/nacl_bpf_sandbox_linux.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(USE_SECCOMP_BPF) 9 #if defined(USE_SECCOMP_BPF)
10 10
(...skipping 20 matching lines...) Expand all
31 namespace { 31 namespace {
32 32
33 using sandbox::bpf_dsl::Allow; 33 using sandbox::bpf_dsl::Allow;
34 using sandbox::bpf_dsl::Error; 34 using sandbox::bpf_dsl::Error;
35 using sandbox::bpf_dsl::ResultExpr; 35 using sandbox::bpf_dsl::ResultExpr;
36 36
37 class NaClBPFSandboxPolicy : public sandbox::bpf_dsl::Policy { 37 class NaClBPFSandboxPolicy : public sandbox::bpf_dsl::Policy {
38 public: 38 public:
39 NaClBPFSandboxPolicy() 39 NaClBPFSandboxPolicy()
40 : baseline_policy_(content::GetBPFSandboxBaselinePolicy()) {} 40 : baseline_policy_(content::GetBPFSandboxBaselinePolicy()) {}
41 virtual ~NaClBPFSandboxPolicy() {} 41 ~NaClBPFSandboxPolicy() override {}
42 42
43 virtual ResultExpr EvaluateSyscall(int system_call_number) const override; 43 ResultExpr EvaluateSyscall(int system_call_number) const override;
44 virtual ResultExpr InvalidSyscall() const override { 44 ResultExpr InvalidSyscall() const override {
45 return baseline_policy_->InvalidSyscall(); 45 return baseline_policy_->InvalidSyscall();
46 } 46 }
47 47
48 private: 48 private:
49 scoped_ptr<sandbox::bpf_dsl::Policy> baseline_policy_; 49 scoped_ptr<sandbox::bpf_dsl::Policy> baseline_policy_;
50 50
51 DISALLOW_COPY_AND_ASSIGN(NaClBPFSandboxPolicy); 51 DISALLOW_COPY_AND_ASSIGN(NaClBPFSandboxPolicy);
52 }; 52 };
53 53
54 ResultExpr NaClBPFSandboxPolicy::EvaluateSyscall(int sysno) const { 54 ResultExpr NaClBPFSandboxPolicy::EvaluateSyscall(int sysno) const {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 scoped_ptr<sandbox::bpf_dsl::Policy>(new NaClBPFSandboxPolicy)); 134 scoped_ptr<sandbox::bpf_dsl::Policy>(new NaClBPFSandboxPolicy));
135 if (sandbox_is_initialized) { 135 if (sandbox_is_initialized) {
136 RunSandboxSanityChecks(); 136 RunSandboxSanityChecks();
137 return true; 137 return true;
138 } 138 }
139 #endif // defined(USE_SECCOMP_BPF) 139 #endif // defined(USE_SECCOMP_BPF)
140 return false; 140 return false;
141 } 141 }
142 142
143 } // namespace nacl 143 } // namespace nacl
OLDNEW
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_sandbox.h ('k') | components/nacl/zygote/nacl_fork_delegate_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698