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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "net/disk_cache/blockfile/disk_format.h" | 9 #include "net/disk_cache/blockfile/disk_format.h" |
10 #include "net/disk_cache/blockfile/storage_block-inl.h" | 10 #include "net/disk_cache/blockfile/storage_block-inl.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 // Returns the number of blocks needed to store an EntryStore. | 146 // Returns the number of blocks needed to store an EntryStore. |
147 static int NumBlocksForEntry(int key_size); | 147 static int NumBlocksForEntry(int key_size); |
148 | 148 |
149 // Entry interface. | 149 // Entry interface. |
150 void Doom() override; | 150 void Doom() override; |
151 void Close() override; | 151 void Close() override; |
152 std::string GetKey() const override; | 152 std::string GetKey() const override; |
153 base::Time GetLastUsed() const override; | 153 base::Time GetLastUsed() const override; |
154 base::Time GetLastModified() const override; | 154 base::Time GetLastModified() const override; |
155 int32 GetDataSize(int index) const override; | 155 int32 GetDataSize(int index) const override; |
| 156 int GetEntrySize() const override; |
156 int ReadData(int index, | 157 int ReadData(int index, |
157 int offset, | 158 int offset, |
158 IOBuffer* buf, | 159 IOBuffer* buf, |
159 int buf_len, | 160 int buf_len, |
160 const CompletionCallback& callback) override; | 161 const CompletionCallback& callback) override; |
161 int WriteData(int index, | 162 int WriteData(int index, |
162 int offset, | 163 int offset, |
163 IOBuffer* buf, | 164 IOBuffer* buf, |
164 int buf_len, | 165 int buf_len, |
165 const CompletionCallback& callback, | 166 const CompletionCallback& callback, |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. | 282 scoped_ptr<SparseControl> sparse_; // Support for sparse entries. |
282 | 283 |
283 net::BoundNetLog net_log_; | 284 net::BoundNetLog net_log_; |
284 | 285 |
285 DISALLOW_COPY_AND_ASSIGN(EntryImpl); | 286 DISALLOW_COPY_AND_ASSIGN(EntryImpl); |
286 }; | 287 }; |
287 | 288 |
288 } // namespace disk_cache | 289 } // namespace disk_cache |
289 | 290 |
290 #endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ | 291 #endif // NET_DISK_CACHE_BLOCKFILE_ENTRY_IMPL_H_ |
OLD | NEW |