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

Unified Diff: base/message_loop.cc

Issue 3094: As an intermediary step towards having a message pump handling IO through com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 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 | « base/message_loop.h ('k') | base/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.cc
===================================================================
--- base/message_loop.cc (revision 2577)
+++ base/message_loop.cc (working copy)
@@ -78,12 +78,15 @@
DCHECK(!current()) << "should only have one message loop per thread";
lazy_tls_ptr.Pointer()->Set(this);
- // TODO(darin): Choose the pump based on the requested type.
#if defined(OS_WIN)
+ // TODO(rvargas): Get rid of the OS guards.
if (type_ == TYPE_DEFAULT) {
pump_ = new base::MessagePumpDefault();
+ } else if (type_ == TYPE_IO) {
+ pump_ = new base::MessagePumpForIO();
} else {
- pump_ = new base::MessagePumpWin();
+ DCHECK(type_ == TYPE_UI);
+ pump_ = new base::MessagePumpForUI();
}
#elif defined(OS_POSIX)
#if defined(OS_MACOSX)
@@ -576,7 +579,7 @@
#if defined(OS_WIN)
void MessageLoopForIO::WatchObject(HANDLE object, Watcher* watcher) {
- pump_win()->WatchObject(object, watcher);
+ pump_io()->WatchObject(object, watcher);
}
#elif defined(OS_POSIX)
« no previous file with comments | « base/message_loop.h ('k') | base/message_pump_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698