diff options
Diffstat (limited to 'src/core/content_main_delegate_qt.cpp')
-rw-r--r-- | src/core/content_main_delegate_qt.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp index 38f66d641..8284029a0 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -139,10 +139,15 @@ content::ContentRendererClient *ContentMainDelegateQt::CreateContentRendererClie { #if defined(OS_LINUX) base::CommandLine *parsedCommandLine = base::CommandLine::ForCurrentProcess(); - - if (parsedCommandLine->HasSwitch(switches::kLang)) { - const std::string &locale = parsedCommandLine->GetSwitchValueASCII(switches::kLang); - ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale); + std::string process_type = parsedCommandLine->GetSwitchValueASCII(switches::kProcessType); + bool no_sandbox = parsedCommandLine->HasSwitch(switches::kNoSandbox); + + // Reload locale if the renderer process is sandboxed + if (process_type == switches::kRendererProcess && !no_sandbox) { + if (parsedCommandLine->HasSwitch(switches::kLang)) { + const std::string &locale = parsedCommandLine->GetSwitchValueASCII(switches::kLang); + ui::ResourceBundle::GetSharedInstance().ReloadLocaleResources(locale); + } } #endif |