summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 22:43:19 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 22:43:19 +0000
commit53a1593319d54ffc522ffc3cfa4e7316773685b6 (patch)
tree2ccd871e5660453847e6ad69c3023c98df2cd642 /base
parent1b2158c787edd0fdc8fc8e06d196e631b14c38fd (diff)
downloadchromium_src-53a1593319d54ffc522ffc3cfa4e7316773685b6.zip
chromium_src-53a1593319d54ffc522ffc3cfa4e7316773685b6.tar.gz
chromium_src-53a1593319d54ffc522ffc3cfa4e7316773685b6.tar.bz2
Merge 33132 - Properly detect KDE4 on newer systems (e.g. [K]Ubuntu 9.04).
BUG=25938 TEST=try to configure proxy settings on KDE4 when $DESKTOP_SESSION=kde, it should work Review URL: http://codereview.chromium.org/427013 TBR=mdm@chromium.org Review URL: http://codereview.chromium.org/444006 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/linux_util.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/base/linux_util.cc b/base/linux_util.cc
index 4b5d0bc..dce4248d 100644
--- a/base/linux_util.cc
+++ b/base/linux_util.cc
@@ -227,8 +227,13 @@ DesktopEnvironment GetDesktopEnvironment(EnvironmentVariableGetter* env) {
return DESKTOP_ENVIRONMENT_GNOME;
else if (desktop_session == "kde4")
return DESKTOP_ENVIRONMENT_KDE4;
- else if (desktop_session == "kde")
+ else if (desktop_session == "kde") {
+ // This may mean KDE4 on newer systems, so we have to check.
+ std::string dummy;
+ if (env->Getenv("KDE_SESSION_VERSION", &dummy))
+ return DESKTOP_ENVIRONMENT_KDE4;
return DESKTOP_ENVIRONMENT_KDE3;
+ }
}
// Fall back on some older environment variables.