| Index: mojo/runner/init.cc
|
| diff --git a/mojo/runner/init.cc b/mojo/runner/init.cc
|
| index 2c7d289894796ff5a3107fb15cb7a4d10feee3c9..90312bb18d4185cf38c613244365041d0f1ea64c 100644
|
| --- a/mojo/runner/init.cc
|
| +++ b/mojo/runner/init.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/command_line.h"
|
| #include "base/debug/debugger.h"
|
| #include "base/files/file_path.h"
|
| +#include "base/i18n/icu_util.h"
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| #include "base/strings/string_split.h"
|
| @@ -60,5 +61,27 @@ void WaitForDebuggerIfNecessary() {
|
| }
|
| }
|
|
|
| +void CallLibraryEarlyInitialization(base::NativeLibrary app_library) {
|
| + // Do whatever warming that the mojo application wants.
|
| + typedef void (*LibraryEarlyInitFunction)(base::PlatformFile);
|
| + LibraryEarlyInitFunction init_function =
|
| + reinterpret_cast<LibraryEarlyInitFunction>(
|
| + base::GetFunctionPointerFromNativeLibrary(app_library,
|
| + "InitializeBase"));
|
| + if (init_function) {
|
| + // Get the ICU data that we prewarmed in the runner and then pass it to
|
| + // the copy of icu in the mojo binary that we're running.
|
| + //
|
| + // TODO(erg): To get this working on android, we need to pass the
|
| + // region around too. However, we can't just pass non-POD data types
|
| + // between loadable modules.
|
| + base::PlatformFile icu_file = base::i18n::OpenIcuDataFile();
|
| + init_function(icu_file);
|
| + }
|
| +
|
| + // TODO(erg): All chromium binaries load base. We might want to make a
|
| + // general system for other people.
|
| +}
|
| +
|
| } // namespace runner
|
| } // namespace mojo
|
|
|