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_ENTRY_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_ENTRY_IMPL_H_ |
6 #define NET_DISK_CACHE_ENTRY_IMPL_H_ | 6 #define NET_DISK_CACHE_ENTRY_IMPL_H_ |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "net/disk_cache/disk_cache.h" | 9 #include "net/disk_cache/disk_cache.h" |
10 #include "net/disk_cache/storage_block.h" | 10 #include "net/disk_cache/storage_block.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, | 41 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, |
42 net::CompletionCallback* completion_callback); | 42 net::CompletionCallback* completion_callback); |
43 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, | 43 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, |
44 net::CompletionCallback* completion_callback, | 44 net::CompletionCallback* completion_callback, |
45 bool truncate); | 45 bool truncate); |
46 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, | 46 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
47 net::CompletionCallback* completion_callback); | 47 net::CompletionCallback* completion_callback); |
48 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, | 48 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
49 net::CompletionCallback* completion_callback); | 49 net::CompletionCallback* completion_callback); |
50 virtual int GetAvailableRange(int64 offset, int len, int64* start); | 50 virtual int GetAvailableRange(int64 offset, int len, int64* start); |
| 51 virtual void CancelSparseIO(); |
| 52 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback); |
51 | 53 |
52 inline CacheEntryBlock* entry() { | 54 inline CacheEntryBlock* entry() { |
53 return &entry_; | 55 return &entry_; |
54 } | 56 } |
55 | 57 |
56 inline CacheRankingsBlock* rankings() { | 58 inline CacheRankingsBlock* rankings() { |
57 return &node_; | 59 return &node_; |
58 } | 60 } |
59 | 61 |
60 uint32 GetHash(); | 62 uint32 GetHash(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. | 186 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. |
185 bool doomed_; // True if this entry was removed from the cache. | 187 bool doomed_; // True if this entry was removed from the cache. |
186 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. | 188 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. |
187 | 189 |
188 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); | 190 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); |
189 }; | 191 }; |
190 | 192 |
191 } // namespace disk_cache | 193 } // namespace disk_cache |
192 | 194 |
193 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ | 195 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ |
OLD | NEW |