OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_ |
6 #define CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_ | 6 #define CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
10 | 11 |
11 // This class is used to report via UMA the Android kernel version and | 12 // This class is used to report via UMA the Android kernel version and |
12 // level of seccomp-bpf support. The operations are performed on the | 13 // level of seccomp-bpf support. The operations are performed on the |
13 // blocking thread pool. | 14 // blocking thread pool. |
14 class SeccompSupportDetector | 15 class SeccompSupportDetector |
15 : public base::RefCountedThreadSafe<SeccompSupportDetector> { | 16 : public base::RefCountedThreadSafe<SeccompSupportDetector> { |
16 public: | 17 public: |
17 // Starts the detection process. This should be called once per browser | 18 // Starts the detection process. This should be called once per browser |
18 // session. This is safe to call from any thread. | 19 // session. This is safe to call from any thread. |
(...skipping 10 matching lines...) Expand all Loading... |
29 void DetectKernelVersion(); | 30 void DetectKernelVersion(); |
30 | 31 |
31 // Called on the blocking thread pool. This tests whether the system | 32 // Called on the blocking thread pool. This tests whether the system |
32 // supports PR_SET_SECCOMP. | 33 // supports PR_SET_SECCOMP. |
33 void DetectSeccomp(); | 34 void DetectSeccomp(); |
34 | 35 |
35 DISALLOW_COPY_AND_ASSIGN(SeccompSupportDetector); | 36 DISALLOW_COPY_AND_ASSIGN(SeccompSupportDetector); |
36 }; | 37 }; |
37 | 38 |
38 #endif // CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_ | 39 #endif // CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_ |
OLD | NEW |