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 #ifndef NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ |
6 #define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ | 6 #define NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // Returns the number of blocks needed to store an EntryStore. | 160 // Returns the number of blocks needed to store an EntryStore. |
161 static int NumBlocksForEntry(int key_size); | 161 static int NumBlocksForEntry(int key_size); |
162 | 162 |
163 // Entry interface. | 163 // Entry interface. |
164 void Doom() override; | 164 void Doom() override; |
165 void Close() override; | 165 void Close() override; |
166 std::string GetKey() const override; | 166 std::string GetKey() const override; |
167 base::Time GetLastUsed() const override; | 167 base::Time GetLastUsed() const override; |
168 base::Time GetLastModified() const override; | 168 base::Time GetLastModified() const override; |
169 int32_t GetDataSize(int index) const override; | 169 int32_t GetDataSize(int index) const override; |
| 170 int64_t GetEntrySize() const override; |
170 int ReadData(int index, | 171 int ReadData(int index, |
171 int offset, | 172 int offset, |
172 IOBuffer* buf, | 173 IOBuffer* buf, |
173 int buf_len, | 174 int buf_len, |
174 const CompletionCallback& callback) override; | 175 const CompletionCallback& callback) override; |
175 int WriteData(int index, | 176 int WriteData(int index, |
176 int offset, | 177 int offset, |
177 IOBuffer* buf, | 178 IOBuffer* buf, |
178 int buf_len, | 179 int buf_len, |
179 const CompletionCallback& callback, | 180 const CompletionCallback& callback, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 std::unique_ptr<SparseControl> sparse_; // Support for sparse entries. | 296 std::unique_ptr<SparseControl> sparse_; // Support for sparse entries. |
296 | 297 |
297 net::NetLogWithSource net_log_; | 298 net::NetLogWithSource net_log_; |
298 | 299 |
299 DISALLOW_COPY_AND_ASSIGN(EntryImpl); | 300 DISALLOW_COPY_AND_ASSIGN(EntryImpl); |
300 }; | 301 }; |
301 | 302 |
302 } // namespace disk_cache | 303 } // namespace disk_cache |
303 | 304 |
304 #endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ | 305 #endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ |
OLD | NEW |