Chromium Code Reviews| Index: mandoline/services/core_services/main.cc |
| diff --git a/mandoline/services/core_services/main.cc b/mandoline/services/core_services/main.cc |
| index ef8c8477a0e3a8494fbc3061219c48742719dd3b..91f81e5f5cb96325b5d8d4652d80da2b51f2db90 100644 |
| --- a/mandoline/services/core_services/main.cc |
| +++ b/mandoline/services/core_services/main.cc |
| @@ -6,6 +6,30 @@ |
| #include "mojo/application/public/cpp/application_runner.h" |
| #include "third_party/mojo/src/mojo/public/c/system/main.h" |
| +// TODO(erg): Much of this will be the same between mojo applications. Maybe we |
| +// could centralize this code? |
| +#if defined(OS_LINUX) && !defined(OS_ANDROID) |
| +#include "base/rand_util.h" |
| +#include "base/sys_info.h" |
| + |
| +// TODO(erg): Much of this was coppied from zygote_main_linux.cc |
| +extern "C" { |
| +void __attribute__((visibility("default"))) MojoSandboxWarm() { |
| + base::RandUint64(); |
|
jln (very slow on Chromium)
2015/07/29 20:28:04
Do we still want to do that individually even thou
Elliot Glaysher
2015/07/29 21:08:32
We don't do it globally. We do it in the copy of b
|
| + base::SysInfo::AmountOfPhysicalMemory(); |
| + base::SysInfo::MaxSharedMemorySize(); |
| + base::SysInfo::NumberOfProcessors(); |
| + |
| + // TODO(erg): icu does timezone initialization here. |
| + |
| + // TODO(erg): Perform OpenSSL warmup; it wants access to /dev/urandom. |
| + |
| + // TODO(erg): Initialize SkFontConfigInterface; it has its own odd IPC system |
| + // which probably must be ported to mojo. |
| +} |
| +} |
| +#endif // defined(OS_LINUX) && !defined(OS_ANDROID) |
| + |
| MojoResult MojoMain(MojoHandle shell_handle) { |
| mojo::ApplicationRunner runner( |
| new core_services::CoreServicesApplicationDelegate); |