Make GConf dependency optional.

This is upstreaming a Gentoo Linux patch.

BUG=13322
TEST=none

Review URL: http://codereview.chromium.org/4691001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65507 0039d316-1c4b-4281-b951-d872f2087c98
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 @@
 
 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 @@
 
   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 @@
   // 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: