| Index: chrome/utility/chrome_content_utility_client.cc
|
| diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc
|
| index d82c23bf5479e1b7cf85f27b64a0953c7d635c47..1d78ccc131650825f390805fc8043a5ada89e490 100644
|
| --- a/chrome/utility/chrome_content_utility_client.cc
|
| +++ b/chrome/utility/chrome_content_utility_client.cc
|
| @@ -31,6 +31,10 @@
|
| #include "net/proxy/mojo_proxy_resolver_factory_impl.h"
|
| #endif
|
|
|
| +#if defined(OS_ANDROID) && defined(USE_SECCOMP_BPF)
|
| +#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
|
| +#endif
|
| +
|
| #if defined(OS_WIN)
|
| #include "chrome/utility/font_cache_handler_win.h"
|
| #include "chrome/utility/shell_handler_win.h"
|
| @@ -162,6 +166,10 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
| #if defined(OS_CHROMEOS)
|
| IPC_MESSAGE_HANDLER(ChromeUtilityMsg_CreateZipFile, OnCreateZipFile)
|
| #endif
|
| +#if defined(OS_ANDROID) && defined(USE_SECCOMP_BPF)
|
| + IPC_MESSAGE_HANDLER(ChromeUtilityMsg_DetectSeccompSupport,
|
| + OnDetectSeccompSupport)
|
| +#endif
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -277,6 +285,22 @@ void ChromeContentUtilityClient::OnCreateZipFile(
|
| }
|
| #endif // defined(OS_CHROMEOS)
|
|
|
| +#if defined(OS_ANDROID) && defined(USE_SECCOMP_BPF)
|
| +void ChromeContentUtilityClient::OnDetectSeccompSupport() {
|
| + bool supports_prctl = sandbox::SandboxBPF::SupportsSeccompSandbox(
|
| + sandbox::SandboxBPF::SeccompLevel::SINGLE_THREADED);
|
| + Send(new ChromeUtilityHostMsg_DetectSeccompSupport_ResultPrctl(
|
| + supports_prctl));
|
| +
|
| + bool supports_syscall = sandbox::SandboxBPF::SupportsSeccompSandbox(
|
| + sandbox::SandboxBPF::SeccompLevel::MULTI_THREADED);
|
| + Send(new ChromeUtilityHostMsg_DetectSeccompSupport_ResultSyscall(
|
| + supports_syscall));
|
| +
|
| + ReleaseProcessIfNeeded();
|
| +}
|
| +#endif // defined(OS_ANDROID) && defined(USE_SECCOMP_BPF)
|
| +
|
| void ChromeContentUtilityClient::OnRobustJPEGDecodeImage(
|
| const std::vector<unsigned char>& encoded_data) {
|
| // Our robust jpeg decoding is using IJG libjpeg.
|
|
|