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

Unified Diff: chrome/renderer/renderer_main.cc

Issue 6592065: Pass around preferred language to font fallback selection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the reference bug number of webkit bugzilla in comments. Created 9 years, 9 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 | « no previous file | chrome/renderer/renderer_sandbox_support_linux.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/renderer_main.cc
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc
index 012ac43c9c7bb287928a53fc8a7a083ad4eebc86..2243f8eda7b1d0dc1acb51d7b3e3589d34c379e1 100644
--- a/chrome/renderer/renderer_main.cc
+++ b/chrome/renderer/renderer_main.cc
@@ -9,6 +9,7 @@
#include "base/command_line.h"
#include "base/debug/trace_event.h"
+#include "base/i18n/rtl.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/metrics/field_trial.h"
#include "base/message_loop.h"
@@ -33,6 +34,7 @@
#include "grit/generated_resources.h"
#include "net/base/net_module.h"
#include "ui/base/system_monitor/system_monitor.h"
+#include "ui/base/ui_base_switches.h"
#include "ui/gfx/gfx_module.h"
#if defined(OS_MACOSX)
@@ -215,6 +217,18 @@ int RendererMain(const MainFunctionParams& parameters) {
InitCrashReporter();
#endif
+#if defined(OS_CHROMEOS)
+ // As Zygote process starts up earlier than browser process gets its own
+ // locale (at login time for Chrome OS), we have to set the ICU default
+ // locale for renderer process here.
+ // ICU locale will be used for fallback font selection etc.
+ if (parsed_command_line.HasSwitch(switches::kLang)) {
+ const std::string locale =
+ parsed_command_line.GetSwitchValueASCII(switches::kLang);
+ base::i18n::SetICUDefaultLocale(locale);
+ }
+#endif
+
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider);
« no previous file with comments | « no previous file | chrome/renderer/renderer_sandbox_support_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698