| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/disk_cache/file.h" | 5 #include "net/disk_cache/file.h" |
| 6 | 6 |
| 7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
| 8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| 11 #include "net/disk_cache/disk_cache.h" | 11 #include "net/disk_cache/disk_cache.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 // Static. | 257 // Static. |
| 258 void File::WaitForPendingIO(int* num_pending_io) { | 258 void File::WaitForPendingIO(int* num_pending_io) { |
| 259 while (*num_pending_io) { | 259 while (*num_pending_io) { |
| 260 // Asynchronous IO operations may be in flight and the completion may end | 260 // Asynchronous IO operations may be in flight and the completion may end |
| 261 // up calling us back so let's wait for them. | 261 // up calling us back so let's wait for them. |
| 262 MessageLoopForIO::IOHandler* handler = g_completion_handler.Pointer(); | 262 MessageLoopForIO::IOHandler* handler = g_completion_handler.Pointer(); |
| 263 MessageLoopForIO::current()->WaitForIOCompletion(100, handler); | 263 MessageLoopForIO::current()->WaitForIOCompletion(100, handler); |
| 264 } | 264 } |
| 265 } | 265 } |
| 266 | 266 |
| 267 // Static. |
| 268 void File::DropPendingIO() { |
| 269 // Nothing to do here. |
| 270 } |
| 271 |
| 267 } // namespace disk_cache | 272 } // namespace disk_cache |
| OLD | NEW |