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

Unified Diff: dbus/bus.h

Issue 24554002: dbus: Replace PostTaskTo*Thread methods with Get*TaskRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | « chromeos/dbus/shill_client_unittest_base.cc ('k') | dbus/bus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dbus/bus.h
diff --git a/dbus/bus.h b/dbus/bus.h
index 2e6db70174c6fade7a56a0057d6eff24f1ab6990..12621d30936e4428186f0a6b9b3b6165f305bbfe 100644
--- a/dbus/bus.h
+++ b/dbus/bus.h
@@ -23,6 +23,7 @@
namespace base {
class SequencedTaskRunner;
class SingleThreadTaskRunner;
+class TaskRunner;
}
namespace tracked_objects {
@@ -529,32 +530,11 @@ class CHROME_DBUS_EXPORT Bus : public base::RefCountedThreadSafe<Bus> {
// BLOCKING CALL.
virtual void UnregisterObjectPath(const ObjectPath& object_path);
- // Posts |task| to the task runner of the D-Bus thread. On completion, |reply|
- // is posted to the origin thread.
- virtual void PostTaskToDBusThreadAndReply(
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- const base::Closure& reply);
-
- // Posts the task to the task runner of the thread that created the bus.
- virtual void PostTaskToOriginThread(
- const tracked_objects::Location& from_here,
- const base::Closure& task);
-
- // Posts the task to the task runner of the D-Bus thread. If D-Bus
- // thread is not supplied, the task runner of the origin thread will be
- // used.
- virtual void PostTaskToDBusThread(
- const tracked_objects::Location& from_here,
- const base::Closure& task);
-
- // Posts the delayed task to the task runner of the D-Bus thread. If
- // D-Bus thread is not supplied, the task runner of the origin thread
- // will be used.
- virtual void PostDelayedTaskToDBusThread(
- const tracked_objects::Location& from_here,
- const base::Closure& task,
- base::TimeDelta delay);
+ // Returns the task runner of the D-Bus thread.
+ virtual base::TaskRunner* GetDBusTaskRunner();
+
+ // Returns the task runner of the thread that created the bus.
+ virtual base::TaskRunner* GetOriginTaskRunner();
// Returns true if the bus has the D-Bus thread.
virtual bool HasDBusThread();
« no previous file with comments | « chromeos/dbus/shill_client_unittest_base.cc ('k') | dbus/bus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698