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

Side by Side Diff: sandbox/linux/seccomp-bpf/basicblock.h

Issue 101773003: Linux sandbox: cleanup sandbox-bpf naming. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address namespace sandbox nits. Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef SANDBOX_LINUX_SECCOMP_BPF_BASICBLOCK_H__ 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_BASICBLOCK_H__
6 #define SANDBOX_LINUX_SECCOMP_BPF_BASICBLOCK_H__ 6 #define SANDBOX_LINUX_SECCOMP_BPF_BASICBLOCK_H__
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "sandbox/linux/seccomp-bpf/instruction.h" 10 #include "sandbox/linux/seccomp-bpf/instruction.h"
11 11
12 namespace playground2 { 12 namespace sandbox {
13 13
14 struct BasicBlock { 14 struct BasicBlock {
15 BasicBlock(); 15 BasicBlock();
16 ~BasicBlock(); 16 ~BasicBlock();
17 17
18 // Our implementation of the code generator uses a "Less" operator to 18 // Our implementation of the code generator uses a "Less" operator to
19 // identify common sequences of basic blocks. This would normally be 19 // identify common sequences of basic blocks. This would normally be
20 // really easy to do, but STL requires us to wrap the comparator into 20 // really easy to do, but STL requires us to wrap the comparator into
21 // a class. We begrudgingly add some code here that provides this wrapping. 21 // a class. We begrudgingly add some code here that provides this wrapping.
22 template <class T> 22 template <class T>
(...skipping 14 matching lines...) Expand all
37 37
38 // Basic blocks are essentially nothing more than a set of instructions. 38 // Basic blocks are essentially nothing more than a set of instructions.
39 std::vector<Instruction*> instructions; 39 std::vector<Instruction*> instructions;
40 40
41 // In order to compute relative branch offsets we need to keep track of 41 // In order to compute relative branch offsets we need to keep track of
42 // how far our block is away from the very last basic block. The "offset_" 42 // how far our block is away from the very last basic block. The "offset_"
43 // is measured in number of BPF instructions. 43 // is measured in number of BPF instructions.
44 int offset; 44 int offset;
45 }; 45 };
46 46
47 } // namespace playground2 47 } // namespace sandbox
48 48
49 #endif // SANDBOX_LINUX_SECCOMP_BPF_BASICBLOCK_H__ 49 #endif // SANDBOX_LINUX_SECCOMP_BPF_BASICBLOCK_H__
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc ('k') | sandbox/linux/seccomp-bpf/basicblock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698