diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/content_main_delegate_qt.cpp | 13 | ||||
-rw-r--r-- | src/core/resource_bundle_qt.cpp | 3 |
2 files changed, 11 insertions, 5 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 diff --git a/src/core/resource_bundle_qt.cpp b/src/core/resource_bundle_qt.cpp index 5f5cead96..cc3c1de06 100644 --- a/src/core/resource_bundle_qt.cpp +++ b/src/core/resource_bundle_qt.cpp @@ -75,7 +75,8 @@ bool ResourceBundle::LocaleDataPakExists(const std::string& locale) #if defined(OS_LINUX) base::CommandLine *parsed_command_line = base::CommandLine::ForCurrentProcess(); std::string process_type = parsed_command_line->GetSwitchValueASCII(switches::kProcessType); - if (process_type == switches::kRendererProcess) { + bool no_sandbox = parsed_command_line->HasSwitch(switches::kNoSandbox); + if (process_type == switches::kRendererProcess && !no_sandbox) { // The Renderer Process is sandboxed thus only one locale is available in it. // The particular one is passed by the --lang command line option. if (!parsed_command_line->HasSwitch(switches::kLang) || parsed_command_line->GetSwitchValueASCII(switches::kLang) != locale) |