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

Unified Diff: dbus/bus.cc

Issue 14985008: dbus: adding PostTaskToDBusThreadAndReply (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove a blank line. Created 7 years, 7 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 | « dbus/bus.h ('k') | 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 0d170ff818508aec62079fc11e252196c0afef86..fafacd3e7dac64f5d76d1d412c03341a1ec1f6e3 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -775,6 +775,24 @@ void Bus::ProcessAllIncomingDataIfAny() {
}
}
+void Bus::PostTaskToDBusThreadAndReply(
+ const tracked_objects::Location& from_here,
+ const base::Closure& task,
+ const base::Closure& reply) {
+ AssertOnOriginThread();
+
+ if (dbus_task_runner_.get()) {
+ if (!dbus_task_runner_->PostTaskAndReply(from_here, task, reply)) {
+ LOG(WARNING) << "Failed to post a task to the D-Bus thread message loop";
+ }
+ } else {
+ DCHECK(origin_task_runner_.get());
+ if (!origin_task_runner_->PostTaskAndReply(from_here, task, reply)) {
+ LOG(WARNING) << "Failed to post a task to the origin message loop";
+ }
+ }
+}
+
void Bus::PostTaskToOriginThread(const tracked_objects::Location& from_here,
const base::Closure& task) {
DCHECK(origin_task_runner_.get());
« no previous file with comments | « dbus/bus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698