summaryrefslogtreecommitdiffstats
path: root/base/linux_util.cc
diff options
context:
space:
mode:
authormattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 23:28:08 +0000
committermattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-17 23:28:08 +0000
commit425be73ff46ed6961322f7f412a2d403b371fc69 (patch)
tree5b2148b4d77238cefbef409b3390e120144ec0d3 /base/linux_util.cc
parent85b893f08d534d5146d94de1863a4e0ac0cbf75c (diff)
downloadchromium_src-425be73ff46ed6961322f7f412a2d403b371fc69.zip
chromium_src-425be73ff46ed6961322f7f412a2d403b371fc69.tar.gz
chromium_src-425be73ff46ed6961322f7f412a2d403b371fc69.tar.bz2
Add proxy config (using gnome-network-preferences)
BUG=11507 TEST=Open options, click change proxy, gnome-network-preferences should launch. If gnome isn't installed, LinuxProxyConfig wiki page should load. Review URL: http://codereview.chromium.org/149785 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/linux_util.cc')
-rw-r--r--base/linux_util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/base/linux_util.cc b/base/linux_util.cc
index 604980b..d8b36ed 100644
--- a/base/linux_util.cc
+++ b/base/linux_util.cc
@@ -59,4 +59,14 @@ std::string GetLinuxDistro() {
return linux_distro;
}
+bool UseGnomeForSettings() {
+ // GNOME_DESKTOP_SESSION_ID being defined is a good indication that
+ // we are probably running under GNOME.
+ // Note: KDE_FULL_SESSION is a corresponding env var to recognize KDE.
+ char* desktop_session;
+ return (getenv("GNOME_DESKTOP_SESSION_ID") ||
+ ((desktop_session = getenv("DESKTOP_SESSION")) &&
+ std::string(desktop_session) == "gnome"));
+}
+
} // namespace base