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

Unified Diff: net/tools/net_watcher/net_watcher.cc

Issue 25385006: Simplify the macro for this deprecation. g_type_init was deprecated in glib version 2.36. The prev… (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Changed the patch to mirror other code Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/net_watcher/net_watcher.cc
diff --git a/net/tools/net_watcher/net_watcher.cc b/net/tools/net_watcher/net_watcher.cc
index 0a8b4dfbb7d8530bd0df5b6017c465d1d05f0cc1..36920d3b1fc27850af949a866dfb539912e17a2c 100644
--- a/net/tools/net_watcher/net_watcher.cc
+++ b/net/tools/net_watcher/net_watcher.cc
@@ -132,24 +132,12 @@ int main(int argc, char* argv[]) {
base::mac::ScopedNSAutoreleasePool pool;
#endif
#if (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
akalin 2013/10/05 06:24:30 can you also change this if def to match BrowserMa
- // Needed so ProxyConfigServiceLinux can use gconf.
akalin 2013/10/05 06:24:30 can you keep the first two lines?
- // Normally handled by BrowserMainLoop::InitializeToolkit().
- // From glib version 2.36 onwards, g_type_init is implicitly called and it is
- // deprecated.
- // TODO(yael) Simplify this once Ubuntu 10.04 is no longer supported.
-#if defined(G_GNUC_BEGIN_IGNORE_DEPRECATIONS) && \
- defined(G_GNUC_END_IGNORE_DEPRECATIONS)
-#define USE_GLIB_DEPRECATIONS_MACROS
-#endif
-
-#if defined(USE_GLIB_DEPRECATIONS_MACROS)
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
-#endif
+ // 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 !GLIB_CHECK_VERSION(2, 35, 0)
g_type_init();
-#if defined(USE_GLIB_DEPRECATIONS_MACROS)
-G_GNUC_END_IGNORE_DEPRECATIONS
#endif
-#undef USE_GLIB_DEPRECATIONS_MACROS
#endif // (defined(OS_LINUX) || defined(OS_OPENBSD)) && !defined(OS_CHROMEOS)
base::AtExitManager exit_manager;
CommandLine::Init(argc, argv);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698