OLD | NEW |
1 // Copyright (c) 2012 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/files/file_path.h" | 7 #include "base/files/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/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" |
12 | 12 |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Structure used for asynchronous operations. | 15 // Structure used for asynchronous operations. |
16 struct MyOverlapped { | 16 struct MyOverlapped { |
17 MyOverlapped(disk_cache::File* file, size_t offset, | 17 MyOverlapped(disk_cache::File* file, size_t offset, |
18 disk_cache::FileIOCallback* callback); | 18 disk_cache::FileIOCallback* callback); |
19 ~MyOverlapped() {} | 19 ~MyOverlapped() {} |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 base::MessageLoopForIO::current()->WaitForIOCompletion(100, handler); | 266 base::MessageLoopForIO::current()->WaitForIOCompletion(100, handler); |
267 } | 267 } |
268 } | 268 } |
269 | 269 |
270 // Static. | 270 // Static. |
271 void File::DropPendingIO() { | 271 void File::DropPendingIO() { |
272 // Nothing to do here. | 272 // Nothing to do here. |
273 } | 273 } |
274 | 274 |
275 } // namespace disk_cache | 275 } // namespace disk_cache |
OLD | NEW |