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

Unified Diff: net/disk_cache/sparse_control.h

Issue 155590: Disk cache: Add support for having a sparse entry block that... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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 | « net/disk_cache/rankings.cc ('k') | net/disk_cache/sparse_control.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/sparse_control.h
===================================================================
--- net/disk_cache/sparse_control.h (revision 20517)
+++ net/disk_cache/sparse_control.h (working copy)
@@ -81,13 +81,19 @@
void CloseChild();
std::string GenerateChildKey();
+ // Deletes the current child and continues the current operation (open).
+ bool KillChildAndContinue(const std::string& key, bool fatal);
+
+ // Continues the current operation (open) without a current child.
+ bool ContinueWithoutChild(const std::string& key);
+
// Returns true if the required child is tracked by the parent entry, i.e. it
// was already created.
bool ChildPresent();
- // Starts tracking this child. A new child entry was created so we must set
- // the corresponding bit on the bitmap of children.
- void SetChildBit();
+ // Sets the bit for the current child to the provided |value|. In other words,
+ // starts or stops tracking this child.
+ void SetChildBit(bool value);
// Writes to disk the tracking information for this entry.
void WriteSparseData();
@@ -102,6 +108,10 @@
// the current operation.
void UpdateRange(int result);
+ // Returns the number of bytes stored at |block_index|, if its allocation-bit
+ // is off (because it is not completely filled).
+ int PartialBlockLength(int block_index) const;
+
// Initializes the sparse info for the current child.
void InitChildData();
« no previous file with comments | « net/disk_cache/rankings.cc ('k') | net/disk_cache/sparse_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698