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

Unified Diff: net/disk_cache/storage_block.h

Issue 8658001: Disk cache: Add a hash to the entry's internal data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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
Index: net/disk_cache/storage_block.h
===================================================================
--- net/disk_cache/storage_block.h (revision 110637)
+++ net/disk_cache/storage_block.h (working copy)
@@ -61,6 +61,9 @@
// Returns true if there is data associated with this object.
bool HasData() const;
+ // Returns true if the internal hash is correct.
+ bool VerifyHash() const;
+
// Returns true if this object owns the data buffer, false if it is shared.
bool own_data() const;
@@ -73,6 +76,7 @@
private:
void AllocateData();
void DeleteData();
+ uint32 CalculateHash() const;
T* data_;
MappedFile* file_;

Powered by Google App Engine
This is Rietveld 408576698