Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: net/disk_cache/blockfile/entry_impl.h

Issue 2591743002: Implement a method to get the total size of a cache entry (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/blockfile/entry_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/blockfile/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698