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

Unified Diff: base/message_loop/message_pump_libevent.cc

Issue 1950633002: Remove IOObservers from MessageLoopForIO. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review Created 4 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 | « base/message_loop/message_pump_libevent.h ('k') | base/message_loop/message_pump_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_pump_libevent.cc
diff --git a/base/message_loop/message_pump_libevent.cc b/base/message_loop/message_pump_libevent.cc
index d59a234be37c6d1e5da211cb8d59f1532279be9e..fef01da9a657820672e56fd2daa6c3d6b17806c9 100644
--- a/base/message_loop/message_pump_libevent.cc
+++ b/base/message_loop/message_pump_libevent.cc
@@ -13,7 +13,6 @@
#include "base/compiler_specific.h"
#include "base/files/file_util.h"
#include "base/logging.h"
-#include "base/observer_list.h"
#include "base/posix/eintr_wrapper.h"
#include "base/third_party/libevent/event.h"
#include "base/time/time.h"
@@ -93,17 +92,13 @@ void MessagePumpLibevent::FileDescriptorWatcher::OnFileCanReadWithoutBlocking(
// watching the file descriptor.
if (!watcher_)
return;
- pump->WillProcessIOEvent();
watcher_->OnFileCanReadWithoutBlocking(fd);
- pump->DidProcessIOEvent();
}
void MessagePumpLibevent::FileDescriptorWatcher::OnFileCanWriteWithoutBlocking(
int fd, MessagePumpLibevent* pump) {
DCHECK(watcher_);
- pump->WillProcessIOEvent();
watcher_->OnFileCanWriteWithoutBlocking(fd);
- pump->DidProcessIOEvent();
}
MessagePumpLibevent::MessagePumpLibevent()
@@ -199,14 +194,6 @@ bool MessagePumpLibevent::WatchFileDescriptor(int fd,
return true;
}
-void MessagePumpLibevent::AddIOObserver(IOObserver *obs) {
- io_observers_.AddObserver(obs);
-}
-
-void MessagePumpLibevent::RemoveIOObserver(IOObserver *obs) {
- io_observers_.RemoveObserver(obs);
-}
-
// Tell libevent to break out of inner loop.
static void timer_callback(int fd, short events, void *context)
{
@@ -301,14 +288,6 @@ void MessagePumpLibevent::ScheduleDelayedWork(
delayed_work_time_ = delayed_work_time;
}
-void MessagePumpLibevent::WillProcessIOEvent() {
- FOR_EACH_OBSERVER(IOObserver, io_observers_, WillProcessIOEvent());
-}
-
-void MessagePumpLibevent::DidProcessIOEvent() {
- FOR_EACH_OBSERVER(IOObserver, io_observers_, DidProcessIOEvent());
-}
-
bool MessagePumpLibevent::Init() {
int fds[2];
if (pipe(fds)) {
« no previous file with comments | « base/message_loop/message_pump_libevent.h ('k') | base/message_loop/message_pump_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698