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

Unified Diff: net/proxy/proxy_config_service_linux.cc

Issue 2015243002: Add calls to g_type_init (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static call to g_type_init in //net Created 4 years, 6 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 | « build/linux/system.gyp ('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 ac2c42d36be345df7efbc9073c5a1921dd18cdb8..db65567a3ecb5f10b96a4a6cb6f01bb664dd3b57 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -243,6 +243,7 @@ class SettingGetterImplGConf : public ProxyConfigServiceLinux::SettingGetter {
DCHECK(!client_);
DCHECK(!task_runner_.get());
task_runner_ = glib_task_runner;
+
client_ = gconf_client_get_default();
if (!client_) {
// It's not clear whether/when this can return NULL.
@@ -813,6 +814,13 @@ bool SettingGetterImplGSettings::LoadAndCheckVersion(
VLOG(1) << "Cannot load gio library. Will fall back to gconf.";
return false;
}
+
+ // g_type_init will be deprecated in 2.36. 2.35 is the development
+ // version for 2.36, hence do not call g_type_init starting 2.35.
+ // http://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
+ if (libgio_loader_.glib_check_version(2, 35, 0)) {
+ libgio_loader_.g_type_init();
+ }
}
GSettings* client = NULL;
« no previous file with comments | « build/linux/system.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698