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

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

Issue 101773003: Linux sandbox: cleanup sandbox-bpf naming. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address 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 #include "sandbox/linux/seccomp-bpf/die.h" 5 #include "sandbox/linux/seccomp-bpf/die.h"
6 #include "sandbox/linux/seccomp-bpf/errorcode.h" 6 #include "sandbox/linux/seccomp-bpf/errorcode.h"
7 7
8 namespace playground2 { 8 namespace sandbox {
9 9
10 ErrorCode::ErrorCode(int err) { 10 ErrorCode::ErrorCode(int err) {
11 switch (err) { 11 switch (err) {
12 case ERR_ALLOWED: 12 case ERR_ALLOWED:
13 err_ = SECCOMP_RET_ALLOW; 13 err_ = SECCOMP_RET_ALLOW;
14 error_type_ = ET_SIMPLE; 14 error_type_ = ET_SIMPLE;
15 break; 15 break;
16 case ERR_MIN_ERRNO... ERR_MAX_ERRNO: 16 case ERR_MIN_ERRNO... ERR_MAX_ERRNO:
17 err_ = SECCOMP_RET_ERRNO + err; 17 err_ = SECCOMP_RET_ERRNO + err;
18 error_type_ = ET_SIMPLE; 18 error_type_ = ET_SIMPLE;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return failed_->LessThan(*err.failed_); 94 return failed_->LessThan(*err.failed_);
95 } else { 95 } else {
96 return false; 96 return false;
97 } 97 }
98 } else { 98 } else {
99 SANDBOX_DIE("Corrupted ErrorCode"); 99 SANDBOX_DIE("Corrupted ErrorCode");
100 } 100 }
101 } 101 }
102 } 102 }
103 103
104 } // namespace 104 } // namespace
Robert Sesek 2013/12/10 21:52:05 "namespace sandbox"
jln (very slow on Chromium) 2013/12/10 22:01:48 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698