summaryrefslogtreecommitdiffstats
path: root/net/proxy/proxy_config_service_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/proxy/proxy_config_service_linux.cc')
-rw-r--r--net/proxy/proxy_config_service_linux.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index 3d8c3ce..5e548cf 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -6,7 +6,9 @@
#include <errno.h>
#include <fcntl.h>
+#if defined(USE_GCONF)
#include <gconf/gconf-client.h>
+#endif
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
@@ -185,6 +187,7 @@ namespace {
const int kDebounceTimeoutMilliseconds = 250;
+#if defined(USE_GCONF)
// This is the "real" gconf version that actually uses gconf.
class GConfSettingGetterImplGConf
: public ProxyConfigServiceLinux::GConfSettingGetter {
@@ -419,6 +422,7 @@ class GConfSettingGetterImplGConf
DISALLOW_COPY_AND_ASSIGN(GConfSettingGetterImplGConf);
};
+#endif // defined(USE_GCONF)
// This is the KDE version that reads kioslaverc and simulates gconf.
// Doing this allows the main Delegate code, as well as the unit tests
@@ -1064,7 +1068,9 @@ ProxyConfigServiceLinux::Delegate::Delegate(base::Environment* env_var_getter)
// Figure out which GConfSettingGetterImpl to use, if any.
switch (base::nix::GetDesktopEnvironment(env_var_getter)) {
case base::nix::DESKTOP_ENVIRONMENT_GNOME:
+#if defined(USE_GCONF)
gconf_getter_.reset(new GConfSettingGetterImplGConf());
+#endif
break;
case base::nix::DESKTOP_ENVIRONMENT_KDE3:
case base::nix::DESKTOP_ENVIRONMENT_KDE4: