Index: chrome/app/chrome_main_delegate.cc |
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc |
index 168b32e9883ab402090cd3b268de83123403f838..a97a3c328e11918f680df11ae05ed706bd835d63 100644 |
--- a/chrome/app/chrome_main_delegate.cc |
+++ b/chrome/app/chrome_main_delegate.cc |
@@ -84,6 +84,7 @@ |
#endif |
#if defined(OS_ANDROID) |
+#include "base/i18n/icu_util.h" |
#include "chrome/common/descriptors_android.h" |
#else |
// Diagnostics is only available on non-android platforms. |
@@ -666,6 +667,20 @@ void ChromeMainDelegate::PreSandboxStartup() { |
base::CPU cpu_info; |
#endif |
+#if defined(OS_ANDROID) |
+ if (process_type.empty()) { |
+ // Browser process loads ICU data using file names. |
+ CHECK(base::i18n::InitializeICU()); |
+ } else { |
+ // Render processes load ICU data using file descriptor. |
+ int icu_data_fd = base::GlobalDescriptors::GetInstance()->MaybeGet( |
+ kAndroidICUDataDescriptor); |
+ CHECK(icu_data_fd != -1); |
+ CHECK(base::i18n::InitializeICU(icu_data_fd)); |
+ } |
+#endif |
jungshik at Google
2014/06/05 23:40:38
What about other implementations of content_main_d
Feng Qian
2014/06/06 17:40:31
I can move logic into content_main_runner.cc.
On
|
+ |
+ |
// Initialize the user data dir for any process type that needs it. |
if (chrome::ProcessNeedsProfileDir(process_type)) |
InitializeUserDataDir(); |