OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #ifndef NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
6 #define NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 6 #define NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "net/disk_cache/disk_cache.h" | 10 #include "net/disk_cache/disk_cache.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, | 61 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, |
62 net::CompletionCallback* completion_callback); | 62 net::CompletionCallback* completion_callback); |
63 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, | 63 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, |
64 net::CompletionCallback* completion_callback, | 64 net::CompletionCallback* completion_callback, |
65 bool truncate); | 65 bool truncate); |
66 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, | 66 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
67 net::CompletionCallback* completion_callback); | 67 net::CompletionCallback* completion_callback); |
68 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, | 68 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
69 net::CompletionCallback* completion_callback); | 69 net::CompletionCallback* completion_callback); |
70 virtual int GetAvailableRange(int64 offset, int len, int64* start); | 70 virtual int GetAvailableRange(int64 offset, int len, int64* start); |
| 71 virtual int GetAvailableRange(int64 offset, int len, int64* start, |
| 72 CompletionCallback* callback); |
71 virtual void CancelSparseIO() {} | 73 virtual void CancelSparseIO() {} |
72 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback); | 74 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback); |
73 | 75 |
74 // Performs the initialization of a EntryImpl that will be added to the | 76 // Performs the initialization of a EntryImpl that will be added to the |
75 // cache. | 77 // cache. |
76 bool CreateEntry(const std::string& key); | 78 bool CreateEntry(const std::string& key); |
77 | 79 |
78 // Permanently destroys this entry. | 80 // Permanently destroys this entry. |
79 void InternalDoom(); | 81 void InternalDoom(); |
80 | 82 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 base::Time last_used_; | 158 base::Time last_used_; |
157 MemBackendImpl* backend_; // Back pointer to the cache. | 159 MemBackendImpl* backend_; // Back pointer to the cache. |
158 bool doomed_; // True if this entry was removed from the cache. | 160 bool doomed_; // True if this entry was removed from the cache. |
159 | 161 |
160 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); | 162 DISALLOW_EVIL_CONSTRUCTORS(MemEntryImpl); |
161 }; | 163 }; |
162 | 164 |
163 } // namespace disk_cache | 165 } // namespace disk_cache |
164 | 166 |
165 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ | 167 #endif // NET_DISK_CACHE_MEM_ENTRY_IMPL_H_ |
OLD | NEW |