diff options
Diffstat (limited to 'net/disk_cache/file_win.cc')
-rw-r--r-- | net/disk_cache/file_win.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/net/disk_cache/file_win.cc b/net/disk_cache/file_win.cc index 7613783..c2e00b7 100644 --- a/net/disk_cache/file_win.cc +++ b/net/disk_cache/file_win.cc @@ -72,6 +72,11 @@ MyOverlapped::~MyOverlapped() { namespace disk_cache { +// Used from WaitForPendingIO() when the cache is being destroyed. +MessageLoopForIO::IOHandler* GetFileIOHandler() { + return Singleton<CompletionHandler>::get(); +} + File::File(base::PlatformFile file) : init_(true), mixed_(true), platform_file_(INVALID_HANDLE_VALUE), sync_platform_file_(file) { @@ -265,14 +270,4 @@ size_t File::GetLength() { return static_cast<size_t>(size.LowPart); } -// Static. -void File::WaitForPendingIO(int* num_pending_io) { - while (*num_pending_io) { - // Asynchronous IO operations may be in flight and the completion may end - // up calling us back so let's wait for them. - MessageLoopForIO::IOHandler* handler = Singleton<CompletionHandler>::get(); - MessageLoopForIO::current()->WaitForIOCompletion(100, handler); - } -} - } // namespace disk_cache |