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

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

Issue 1121463005: Fixit: Split base::TimeTicks --> TimeTicks + ThreadTicks + TraceTicks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Windows compile fixes. Created 5 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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-helpers/syscall_parameters_restrictions.h" 5 #include "sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <fcntl.h> 9 #include <fcntl.h>
10 #include <linux/net.h> 10 #include <linux/net.h>
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS()); 297 return If(who == RUSAGE_SELF, Allow()).Else(CrashSIGSYS());
298 } 298 }
299 #endif // !defined(OS_NACL_NONSFI) 299 #endif // !defined(OS_NACL_NONSFI)
300 300
301 ResultExpr RestrictClockID() { 301 ResultExpr RestrictClockID() {
302 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit"); 302 static_assert(4 == sizeof(clockid_t), "clockid_t is not 32bit");
303 const Arg<clockid_t> clockid(0); 303 const Arg<clockid_t> clockid(0);
304 return If( 304 return If(
305 #if defined(OS_CHROMEOS) 305 #if defined(OS_CHROMEOS)
306 // Allow the special clock for Chrome OS used by Chrome tracing. 306 // Allow the special clock for Chrome OS used by Chrome tracing.
307 clockid == base::TimeTicks::kClockSystemTrace || 307 clockid == base::TraceTicks::kClockSystemTrace ||
308 #endif 308 #endif
309 clockid == CLOCK_MONOTONIC || 309 clockid == CLOCK_MONOTONIC ||
310 clockid == CLOCK_PROCESS_CPUTIME_ID || 310 clockid == CLOCK_PROCESS_CPUTIME_ID ||
311 clockid == CLOCK_REALTIME || 311 clockid == CLOCK_REALTIME ||
312 clockid == CLOCK_THREAD_CPUTIME_ID, 312 clockid == CLOCK_THREAD_CPUTIME_ID,
313 Allow()).Else(CrashSIGSYS()); 313 Allow()).Else(CrashSIGSYS());
314 } 314 }
315 315
316 } // namespace sandbox. 316 } // namespace sandbox.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698