| Index: chrome/browser/android/seccomp_support_detector.h
|
| diff --git a/chrome/browser/android/seccomp_support_detector.h b/chrome/browser/android/seccomp_support_detector.h
|
| index 58d66bde925a45d97074a5d25f6c38468b465022..d74e3fec29d07493e223003a6ef7fb51ca23cc35 100644
|
| --- a/chrome/browser/android/seccomp_support_detector.h
|
| +++ b/chrome/browser/android/seccomp_support_detector.h
|
| @@ -6,35 +6,32 @@
|
| #define CHROME_BROWSER_ANDROID_SECCOMP_SUPPORT_DETECTOR_H_
|
|
|
| #include "base/compiler_specific.h"
|
| -#include "content/public/browser/utility_process_host_client.h"
|
| +#include "base/memory/ref_counted.h"
|
|
|
| // This class is used to report via UMA the Android kernel version and
|
| -// level of seccomp-bpf support. The kernel version is read from the blocking
|
| -// thread pool, while seccomp support is tested in a utility process, in case
|
| -// the probing causes a crash.
|
| -class SeccompSupportDetector : public content::UtilityProcessHostClient {
|
| +// level of seccomp-bpf support. The operations are performed on the
|
| +// blocking thread pool.
|
| +class SeccompSupportDetector
|
| + : public base::RefCountedThreadSafe<SeccompSupportDetector> {
|
| public:
|
| // Starts the detection process. This should be called once per browser
|
| // session. This is safe to call from any thread.
|
| static void StartDetection();
|
|
|
| private:
|
| + friend class base::RefCountedThreadSafe<SeccompSupportDetector>;
|
| +
|
| SeccompSupportDetector();
|
| - ~SeccompSupportDetector() override;
|
| + ~SeccompSupportDetector();
|
|
|
| // Called on the blocking thread pool. This reads the utsname and records
|
| // the kernel version.
|
| void DetectKernelVersion();
|
|
|
| - // Called on the IO thread. This starts a utility process to detect seccomp.
|
| + // Called on the blocking thread pool. This tests whether the system
|
| + // supports PR_SET_SECCOMP.
|
| void DetectSeccomp();
|
|
|
| - // UtilityProcessHostClient:
|
| - void OnProcessCrashed(int exit_code) override;
|
| - bool OnMessageReceived(const IPC::Message& message) override;
|
| -
|
| - void OnDetectPrctl(bool prctl_supported);
|
| -
|
| DISALLOW_COPY_AND_ASSIGN(SeccompSupportDetector);
|
| };
|
|
|
|
|