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

Unified Diff: net/disk_cache/block_files.h

Issue 17816008: Disk cache: Introduce BlockBitmaps for V3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/disk_cache/block_files.cc » ('j') | net/disk_cache/block_files.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/block_files.h
===================================================================
--- net/disk_cache/block_files.h (revision 210990)
+++ net/disk_cache/block_files.h (working copy)
@@ -49,8 +49,12 @@
// Returns true if the current block file should not be used as-is to store
// more records. |block_count| is the number of blocks to allocate.
- bool NeedToGrowBlockFile(int block_count);
+ bool NeedToGrowBlockFile(int block_count) const;
+ // Returns true if this block file can be used to store an extra record of
+ // size |block_count|.
+ bool CanAllocate(int block_count) const;
+
// Returns the number of empty blocks for this file.
int EmptyBlocks() const;
@@ -60,9 +64,8 @@
// Returns the size of the wrapped structure (BlockFileHeader).
int Size() const;
- BlockFileHeader* operator->() { return header_; }
- void operator=(const BlockHeader& other) { header_ = other.header_; }
- BlockFileHeader* Get() { return header_; }
+ // Returns a pointer to the underlying BlockFileHeader.
gavinp 2013/08/05 17:06:15 Is it appropriate to add a TODO(rvargas): Remove t
gavinp 2013/08/26 14:30:56 Do these TODO comments make sense? I was asking as
+ BlockFileHeader* Header();
private:
BlockFileHeader* header_;
« no previous file with comments | « no previous file | net/disk_cache/block_files.cc » ('j') | net/disk_cache/block_files.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698