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

Side by Side Diff: sandbox/linux/seccomp-bpf/errorcode.cc

Issue 12223109: SECCOMP-BPF: Refactor the BPF sandbox API to use fewer "static" fields and methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 9 months 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
« no previous file with comments | « sandbox/linux/seccomp-bpf/errorcode.h ('k') | sandbox/linux/seccomp-bpf/errorcode_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" 5 #include "sandbox/linux/seccomp-bpf/die.h"
6 #include "sandbox/linux/seccomp-bpf/errorcode.h"
6 7
7 8
8 namespace playground2 { 9 namespace playground2 {
9 10
10 ErrorCode::ErrorCode(int err) { 11 ErrorCode::ErrorCode(int err) {
11 switch (err) { 12 switch (err) {
12 case ERR_ALLOWED: 13 case ERR_ALLOWED:
13 err_ = SECCOMP_RET_ALLOW; 14 err_ = SECCOMP_RET_ALLOW;
14 error_type_ = ET_SIMPLE; 15 error_type_ = ET_SIMPLE;
15 break; 16 break;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } else { 97 } else {
97 return false; 98 return false;
98 } 99 }
99 } else { 100 } else {
100 SANDBOX_DIE("Corrupted ErrorCode"); 101 SANDBOX_DIE("Corrupted ErrorCode");
101 } 102 }
102 } 103 }
103 } 104 }
104 105
105 } // namespace 106 } // namespace
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/errorcode.h ('k') | sandbox/linux/seccomp-bpf/errorcode_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698