| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |