| 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..57f01e4e4e12775782953711384494d7b572e3ff 100644
|
| --- a/chrome/utility/chrome_content_utility_client.cc
|
| +++ b/chrome/utility/chrome_content_utility_client.cc
|
| @@ -29,6 +29,8 @@
|
| #if !defined(OS_ANDROID)
|
| #include "chrome/utility/profile_import_handler.h"
|
| #include "net/proxy/mojo_proxy_resolver_factory_impl.h"
|
| +#else
|
| +#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h"
|
| #endif
|
|
|
| #if defined(OS_WIN)
|
| @@ -162,6 +164,10 @@ bool ChromeContentUtilityClient::OnMessageReceived(
|
| #if defined(OS_CHROMEOS)
|
| IPC_MESSAGE_HANDLER(ChromeUtilityMsg_CreateZipFile, OnCreateZipFile)
|
| #endif
|
| +#if defined(OS_ANDROID)
|
| + IPC_MESSAGE_HANDLER(ChromeUtilityMsg_DetectSeccompSupport,
|
| + OnDetectSeccompSupport)
|
| +#endif
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
|
|
| @@ -277,6 +283,19 @@ void ChromeContentUtilityClient::OnCreateZipFile(
|
| }
|
| #endif // defined(OS_CHROMEOS)
|
|
|
| +#if defined(OS_ANDROID)
|
| +void ChromeContentUtilityClient::OnDetectSeccompSupport() {
|
| + bool supports_prctl = sandbox::SandboxBPF::SupportsSeccompSandbox(
|
| + sandbox::SandboxBPF::SeccompLevel::SINGLE_THREADED);
|
| + bool supports_syscall = sandbox::SandboxBPF::SupportsSeccompSandbox(
|
| + sandbox::SandboxBPF::SeccompLevel::MULTI_THREADED);
|
| +
|
| + Send(new ChromeUtilityHostMsg_DetectSeccompSupport_Result(
|
| + supports_prctl, supports_syscall));
|
| + ReleaseProcessIfNeeded();
|
| +}
|
| +#endif // defined(OS_ANDROID)
|
| +
|
| void ChromeContentUtilityClient::OnRobustJPEGDecodeImage(
|
| const std::vector<unsigned char>& encoded_data) {
|
| // Our robust jpeg decoding is using IJG libjpeg.
|
|
|