summaryrefslogtreecommitdiffstats
path: root/base/message_loop.h
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 21:52:15 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 21:52:15 +0000
commit17b891482a081341470ead21ca7eda953d74dd69 (patch)
tree1ca1393109504064e44a31435714a238ca171477 /base/message_loop.h
parent209c36546ae088f1cf76e7f72765ad92b3cdaa2e (diff)
downloadchromium_src-17b891482a081341470ead21ca7eda953d74dd69.zip
chromium_src-17b891482a081341470ead21ca7eda953d74dd69.tar.gz
chromium_src-17b891482a081341470ead21ca7eda953d74dd69.tar.bz2
Switch MessagePumpForIO to use completion ports on Windows.
Cleanup the separation between MessagePumpForUI and MessagePumpForIO, and convert the latter to use Completion Ports instead of MsgWaitForMultipleobjects to sleep when idle. Remove all traces of Windows messages from MessagePumpForIO, remove the transitional API of completion port notifications and remove WatchObject API. Modify all callers of RegisterIOHandler so that they are no longer using RegisterIOContext, and also handle properly the new semantics of completion ports (notifications even when the IO completes immediately). Add a new interface to allow proper cleanup of disk cache (to replace code that was waiting for pending APCs from the destructor). Add a way for the message pump to perform cleanup of abandoned IO. BUG=B/1344358, 3497, 3630 TESt=unit tests R=darin Review URL: http://codereview.chromium.org/8156 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5021 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.h')
-rw-r--r--base/message_loop.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/base/message_loop.h b/base/message_loop.h
index 2d38853..8f16d8e 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -426,7 +426,7 @@ class MessageLoopForUI : public MessageLoop {
protected:
// TODO(rvargas): Make this platform independent.
- base::MessagePumpWin* pump_ui() {
+ base::MessagePumpForUI* pump_ui() {
return static_cast<base::MessagePumpForUI*>(pump_.get());
}
#endif // defined(OS_WIN)
@@ -458,13 +458,12 @@ class MessageLoopForIO : public MessageLoop {
}
#if defined(OS_WIN)
- typedef base::MessagePumpForIO::Watcher Watcher;
typedef base::MessagePumpForIO::IOHandler IOHandler;
+ typedef base::MessagePumpForIO::IOContext IOContext;
// Please see MessagePumpWin for definitions of these methods.
- void WatchObject(HANDLE object, Watcher* watcher);
void RegisterIOHandler(HANDLE file_handle, IOHandler* handler);
- void RegisterIOContext(OVERLAPPED* context, IOHandler* handler);
+ bool WaitForIOCompletion(DWORD timeout, IOHandler* filter);
protected:
// TODO(rvargas): Make this platform independent.