Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1994)

Unified Diff: base/linux_util.cc

Issue 149785: Add proxy config (using gnome-network-preferences) (Closed)
Patch Set: use new forground tab Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/linux_util.h ('k') | chrome/app/resources/locale_settings.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/linux_util.cc
diff --git a/base/linux_util.cc b/base/linux_util.cc
index 604980b2b51abc73dcfb8a03a7d544b07850c2df..d8b36ed697b595ee2a56b942e0f61b58038e21cc 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
« no previous file with comments | « base/linux_util.h ('k') | chrome/app/resources/locale_settings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698