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

Unified Diff: dbus/bus.cc

Issue 14386016: dbus: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | dbus/bus_unittest.cc » ('j') | 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 cfc833db3c1d23447c488c13e4f901be4f4ddabe..ea0497d45cf8b053102e5b99fa7bfba0283d4c36 100644
--- a/dbus/bus.cc
+++ b/dbus/bus.cc
@@ -50,23 +50,19 @@ class Watch : public base::MessagePumpLibevent::Watcher {
const int file_descriptor = dbus_watch_get_unix_fd(raw_watch_);
const int flags = dbus_watch_get_flags(raw_watch_);
- MessageLoopForIO::Mode mode = MessageLoopForIO::WATCH_READ;
+ base::MessageLoopForIO::Mode mode = base::MessageLoopForIO::WATCH_READ;
if ((flags & DBUS_WATCH_READABLE) && (flags & DBUS_WATCH_WRITABLE))
- mode = MessageLoopForIO::WATCH_READ_WRITE;
+ mode = base::MessageLoopForIO::WATCH_READ_WRITE;
else if (flags & DBUS_WATCH_READABLE)
- mode = MessageLoopForIO::WATCH_READ;
+ mode = base::MessageLoopForIO::WATCH_READ;
else if (flags & DBUS_WATCH_WRITABLE)
- mode = MessageLoopForIO::WATCH_WRITE;
+ mode = base::MessageLoopForIO::WATCH_WRITE;
else
NOTREACHED();
const bool persistent = true; // Watch persistently.
- const bool success = MessageLoopForIO::current()->WatchFileDescriptor(
- file_descriptor,
- persistent,
- mode,
- &file_descriptor_watcher_,
- this);
+ const bool success = base::MessageLoopForIO::current()->WatchFileDescriptor(
+ file_descriptor, persistent, mode, &file_descriptor_watcher_, this);
CHECK(success) << "Unable to allocate memory";
}
@@ -196,8 +192,8 @@ Bus::Bus(const Options& options)
dbus_threads_init_default();
// The origin message loop is unnecessary if the client uses synchronous
// functions only.
- if (MessageLoop::current())
- origin_task_runner_ = MessageLoop::current()->message_loop_proxy();
+ if (base::MessageLoop::current())
+ origin_task_runner_ = base::MessageLoop::current()->message_loop_proxy();
}
Bus::~Bus() {
« no previous file with comments | « no previous file | dbus/bus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698