summaryrefslogtreecommitdiffstats
path: root/chrome/common/common_glue.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/common_glue.cc')
-rw-r--r--chrome/common/common_glue.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/common/common_glue.cc b/chrome/common/common_glue.cc
index 9c2489a..30b1e4f 100644
--- a/chrome/common/common_glue.cc
+++ b/chrome/common/common_glue.cc
@@ -27,11 +27,14 @@ bool IsPluginRunningInRendererProcess() {
std::wstring GetWebKitLocale() {
// The browser process should have passed the locale to the renderer via the
- // --lang command line flag.
+ // --lang command line flag. In single process mode, this will return the
+ // wrong value. TODO(tc): Fix this for single process mode.
CommandLine parsed_command_line;
const std::wstring& lang =
parsed_command_line.GetSwitchValue(switches::kLang);
- DCHECK(!lang.empty());
+ DCHECK(!lang.empty() ||
+ (!parsed_command_line.HasSwitch(switches::kRendererProcess) &&
+ !parsed_command_line.HasSwitch(switches::kPluginProcess)));
return lang;
}