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

Unified Diff: dbus/bus.cc

Issue 2082653002: Use ThreadTaskRunnerHandle::Get() in dbus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus.cc
diff --git a/dbus/bus.cc b/dbus/bus.cc
index 8f787452d6c3ef33243d2586ba3d3b19d8180597..d6e2c5b6401459e6322d1a3d9e593d03ee9ae55e 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -13,6 +13,7 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "dbus/exported_object.h"
#include "dbus/message.h"
@@ -202,8 +203,8 @@ Bus::Bus(const Options& options)
dbus_threads_init_default();
// The origin message loop is unnecessary if the client uses synchronous
// functions only.
- if (base::MessageLoop::current())
- origin_task_runner_ = base::MessageLoop::current()->task_runner();
+ if (base::ThreadTaskRunnerHandle::IsSet())
+ origin_task_runner_ = base::ThreadTaskRunnerHandle::Get();
}
Bus::~Bus() {
« 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