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

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

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
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/errorcode.h" 5 #include "sandbox/linux/seccomp-bpf/errorcode.h"
6 6
7 #include "sandbox/linux/seccomp-bpf/die.h" 7 #include "sandbox/linux/seccomp-bpf/die.h"
8 #include "sandbox/linux/seccomp-bpf/linux_seccomp.h" 8 #include "sandbox/linux/system_headers/linux_seccomp.h"
9 9
10 namespace sandbox { 10 namespace sandbox {
11 11
12 ErrorCode::ErrorCode() : error_type_(ET_INVALID), err_(SECCOMP_RET_INVALID) { 12 ErrorCode::ErrorCode() : error_type_(ET_INVALID), err_(SECCOMP_RET_INVALID) {
13 } 13 }
14 14
15 ErrorCode::ErrorCode(int err) { 15 ErrorCode::ErrorCode(int err) {
16 switch (err) { 16 switch (err) {
17 case ERR_ALLOWED: 17 case ERR_ALLOWED:
18 err_ = SECCOMP_RET_ALLOW; 18 err_ = SECCOMP_RET_ALLOW;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } else { 106 } else {
107 return false; 107 return false;
108 } 108 }
109 } else { 109 } else {
110 SANDBOX_DIE("Corrupted ErrorCode"); 110 SANDBOX_DIE("Corrupted ErrorCode");
111 } 111 }
112 } 112 }
113 } 113 }
114 114
115 } // namespace sandbox 115 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf/bpf_tests_unittest.cc ('k') | sandbox/linux/seccomp-bpf/errorcode_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698