Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(324)

Unified Diff: content/app/content_main_runner.cc

Issue 317833006: [ICU] Avoid reading ICU data files in render process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/common/content_descriptors.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/content_main_runner.cc
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 8c767321132a4e139bebbc9c7303906a1dda3410..3d1f748b7d42cf237fb75c5cdd9df35d9ceb0c20 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -50,6 +50,10 @@
#include "ui/base/ui_base_paths.h"
#include "ui/base/ui_base_switches.h"
+#if defined(OS_ANDROID)
+#include "content/public/common/content_descriptors.h"
+#endif
+
#if defined(USE_TCMALLOC)
#include "third_party/tcmalloc/chromium/src/gperftools/malloc_extension.h"
#if defined(TYPE_PROFILING)
@@ -703,7 +707,16 @@ class ContentMainRunnerImpl : public ContentMainRunner {
RegisterPathProvider();
RegisterContentSchemes(true);
+#if defined(OS_ANDROID)
+ int icudata_fd = base::GlobalDescriptors::GetInstance()->MaybeGet(
+ kAndroidICUDataDescriptor);
+ if (icudata_fd != -1)
+ CHECK(base::i18n::InitializeICUWithFileDescriptor(icudata_fd));
+ else
+ CHECK(base::i18n::InitializeICU());
+#else
CHECK(base::i18n::InitializeICU());
+#endif
InitializeStatsTable(command_line);
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/common/content_descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698