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

Unified Diff: net/proxy/proxy_config_service_linux.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 | « chrome/browser/gtk/options/advanced_contents_gtk.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_config_service_linux.cc
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index f85e450e698a0bb21db78ed9388ca7e4430bcf49..eef6d9768c37f4090c43a3df5b4fd2c476423162 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -7,6 +7,7 @@
#include <gconf/gconf-client.h>
#include <stdlib.h>
+#include "base/linux_util.h"
#include "base/logging.h"
#include "base/string_tokenizer.h"
#include "base/string_util.h"
@@ -535,13 +536,6 @@ ProxyConfigServiceLinux::Delegate::Delegate(
}
bool ProxyConfigServiceLinux::Delegate::ShouldTryGConf() {
- // 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.
- std::string dummy, desktop_session;
- return env_var_getter_->Getenv("GNOME_DESKTOP_SESSION_ID", &dummy)
- || (env_var_getter_->Getenv("DESKTOP_SESSION", &desktop_session)
- && desktop_session == "gnome");
// I (sdoyon) would have liked to prioritize environment variables
// and only fallback to gconf if env vars were unset. But
// gnome-terminal "helpfully" sets http_proxy and no_proxy, and it
@@ -549,6 +543,7 @@ bool ProxyConfigServiceLinux::Delegate::ShouldTryGConf() {
// mislead us.
//
// We could introduce a CHROME_PROXY_OBEY_ENV_VARS variable...??
+ return base::UseGnomeForSettings();
}
void ProxyConfigServiceLinux::Delegate::SetupAndFetchInitialConfig(
« no previous file with comments | « chrome/browser/gtk/options/advanced_contents_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698