summaryrefslogtreecommitdiffstats
path: root/chrome/common/common_glue.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 23:13:39 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-08 23:13:39 +0000
commitac1819a70675204a0682ebf99f56513e23655c30 (patch)
tree5868a66fad6e226749377ab99acea96e82c9bb9a /chrome/common/common_glue.cc
parentf5ad8b6cb60ff81d68dd290a3ac066aa56d54ed5 (diff)
downloadchromium_src-ac1819a70675204a0682ebf99f56513e23655c30.zip
chromium_src-ac1819a70675204a0682ebf99f56513e23655c30.tar.gz
chromium_src-ac1819a70675204a0682ebf99f56513e23655c30.tar.bz2
Allow lang to be blank in the renderer and plugin if running in
single process mode. Review URL: http://codereview.chromium.org/5602 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3073 0039d316-1c4b-4281-b951-d872f2087c98
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;
}