| 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 int GetAvailableRange(int64 offset, int len, int64* start, |
| 52 CompletionCallback* callback); |
| 51 virtual void CancelSparseIO(); | 53 virtual void CancelSparseIO(); |
| 52 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback); | 54 virtual int ReadyForSparseIO(net::CompletionCallback* completion_callback); |
| 53 | 55 |
| 54 inline CacheEntryBlock* entry() { | 56 inline CacheEntryBlock* entry() { |
| 55 return &entry_; | 57 return &entry_; |
| 56 } | 58 } |
| 57 | 59 |
| 58 inline CacheRankingsBlock* rankings() { | 60 inline CacheRankingsBlock* rankings() { |
| 59 return &node_; | 61 return &node_; |
| 60 } | 62 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. | 188 int unreported_size_[kNumStreams]; // Bytes not reported yet to the backend. |
| 187 bool doomed_; // True if this entry was removed from the cache. | 189 bool doomed_; // True if this entry was removed from the cache. |
| 188 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. | 190 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. |
| 189 | 191 |
| 190 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); | 192 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); |
| 191 }; | 193 }; |
| 192 | 194 |
| 193 } // namespace disk_cache | 195 } // namespace disk_cache |
| 194 | 196 |
| 195 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ | 197 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ |
| OLD | NEW |