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 // See net/disk_cache/disk_cache.h for the public interface of the cache. | 5 // See net/disk_cache/disk_cache.h for the public interface of the cache. |
6 | 6 |
7 #ifndef NET_DISK_CACHE_FILE_H_ | 7 #ifndef NET_DISK_CACHE_FILE_H_ |
8 #define NET_DISK_CACHE_FILE_H_ | 8 #define NET_DISK_CACHE_FILE_H_ |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/platform_file.h" | 11 #include "base/platform_file.h" |
12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
13 | 13 |
| 14 namespace base { |
14 class FilePath; | 15 class FilePath; |
| 16 } |
15 | 17 |
16 namespace disk_cache { | 18 namespace disk_cache { |
17 | 19 |
18 // This interface is used to support asynchronous ReadData and WriteData calls. | 20 // This interface is used to support asynchronous ReadData and WriteData calls. |
19 class FileIOCallback { | 21 class FileIOCallback { |
20 public: | 22 public: |
21 // Notified of the actual number of bytes read or written. This value is | 23 // Notified of the actual number of bytes read or written. This value is |
22 // negative if an error occurred. | 24 // negative if an error occurred. |
23 virtual void OnFileIOComplete(int bytes_copied) = 0; | 25 virtual void OnFileIOComplete(int bytes_copied) = 0; |
24 | 26 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 bool mixed_; | 86 bool mixed_; |
85 base::PlatformFile platform_file_; // Regular, asynchronous IO handle. | 87 base::PlatformFile platform_file_; // Regular, asynchronous IO handle. |
86 base::PlatformFile sync_platform_file_; // Synchronous IO handle. | 88 base::PlatformFile sync_platform_file_; // Synchronous IO handle. |
87 | 89 |
88 DISALLOW_COPY_AND_ASSIGN(File); | 90 DISALLOW_COPY_AND_ASSIGN(File); |
89 }; | 91 }; |
90 | 92 |
91 } // namespace disk_cache | 93 } // namespace disk_cache |
92 | 94 |
93 #endif // NET_DISK_CACHE_FILE_H_ | 95 #endif // NET_DISK_CACHE_FILE_H_ |
OLD | NEW |