Remove unnecessary call to the deprecated g_thread_init().

g_thread_init() has been deprecated since glib 2.32. This CL removes the
unnecessary call to g_thread_init(), so that we can later migrate to
glib 2.34. It also replaces dbus_g_thread_init(), which calls the
deprecated g_thread_supported(), with dbus_threads_init_default()
directly.

BUG=chromium:253025
TEST=Tested the following:
1. Build and run unit tests.
2. chrome://histograms shows that CrOS metrics are being collected.

Change-Id: I9c191d1926928caa8a704db03024f48f6c1cb383
Reviewed-on: https://gerrit.chromium.org/gerrit/59683
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
This commit is contained in:
Ben Chan 2013-06-22 06:29:36 -07:00 committed by ChromeBot
parent d92d18c935
commit 6f59842fb1
1 changed files with 1 additions and 2 deletions

View File

@ -298,9 +298,8 @@ void MetricsDaemon::Init(bool testing, MetricsLibraryInterface* metrics_lib,
if (testing)
return;
g_thread_init(NULL);
g_type_init();
dbus_g_thread_init();
dbus_threads_init_default();
DBusError error;
dbus_error_init(&error);