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

Unified Diff: net/proxy/proxy_config_service_linux.cc

Issue 4691001: Make GConf dependency optional. (Closed)
Patch Set: Created 10 years, 1 month 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/chrome_browser.gypi ('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 3d8c3cea23be0f2d4cfac3930e4886b364040cfc..5e548cf745ee59d312f2e0dfb3efb74c37854a5c 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:
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698