| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 15 matching lines...) Expand all Loading... |
| 26 virtual void Close(); | 26 virtual void Close(); |
| 27 virtual std::string GetKey() const; | 27 virtual std::string GetKey() const; |
| 28 virtual base::Time GetLastUsed() const; | 28 virtual base::Time GetLastUsed() const; |
| 29 virtual base::Time GetLastModified() const; | 29 virtual base::Time GetLastModified() const; |
| 30 virtual int32 GetDataSize(int index) const; | 30 virtual int32 GetDataSize(int index) const; |
| 31 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, | 31 virtual int ReadData(int index, int offset, net::IOBuffer* buf, int buf_len, |
| 32 net::CompletionCallback* completion_callback); | 32 net::CompletionCallback* completion_callback); |
| 33 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, | 33 virtual int WriteData(int index, int offset, net::IOBuffer* buf, int buf_len, |
| 34 net::CompletionCallback* completion_callback, | 34 net::CompletionCallback* completion_callback, |
| 35 bool truncate); | 35 bool truncate); |
| 36 virtual int ReadSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
| 37 net::CompletionCallback* completion_callback); |
| 38 virtual int WriteSparseData(int64 offset, net::IOBuffer* buf, int buf_len, |
| 39 net::CompletionCallback* completion_callback); |
| 40 virtual int GetAvailableRange(int64 offset, int len, int64* start); |
| 36 | 41 |
| 37 inline CacheEntryBlock* entry() { | 42 inline CacheEntryBlock* entry() { |
| 38 return &entry_; | 43 return &entry_; |
| 39 } | 44 } |
| 40 | 45 |
| 41 inline CacheRankingsBlock* rankings() { | 46 inline CacheRankingsBlock* rankings() { |
| 42 return &node_; | 47 return &node_; |
| 43 } | 48 } |
| 44 | 49 |
| 45 uint32 GetHash(); | 50 uint32 GetHash(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 scoped_refptr<File> files_[NUM_STREAMS + 1]; // Files to store external user | 148 scoped_refptr<File> files_[NUM_STREAMS + 1]; // Files to store external user |
| 144 // data and key. | 149 // data and key. |
| 145 int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend. | 150 int unreported_size_[NUM_STREAMS]; // Bytes not reported yet to the backend. |
| 146 bool doomed_; // True if this entry was removed from the cache. | 151 bool doomed_; // True if this entry was removed from the cache. |
| 147 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); | 152 DISALLOW_EVIL_CONSTRUCTORS(EntryImpl); |
| 148 }; | 153 }; |
| 149 | 154 |
| 150 } // namespace disk_cache | 155 } // namespace disk_cache |
| 151 | 156 |
| 152 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ | 157 #endif // NET_DISK_CACHE_ENTRY_IMPL_H_ |
| OLD | NEW |