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

Unified Diff: net/disk_cache/simple/simple_disk_format.cc

Issue 13731002: Cache Backend Proxy to intercept all cache events from the IO thread. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: trivial net.gyp merge Created 7 years, 8 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/simple/simple_disk_format.h ('k') | net/disk_cache/tracing_cache_backend.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/simple/simple_disk_format.cc
diff --git a/net/disk_cache/simple/simple_disk_format.cc b/net/disk_cache/simple/simple_disk_format.cc
index 9e6beea193686c14c6ae7ef611b3a9d149621117..1b7a159a7fd793abd2735734ad5566a95352ce7e 100644
--- a/net/disk_cache/simple/simple_disk_format.cc
+++ b/net/disk_cache/simple/simple_disk_format.cc
@@ -12,6 +12,11 @@
namespace disk_cache {
+SimpleFileHeader::SimpleFileHeader() {
+ // Make hashing repeatable: leave no padding bytes untouched.
+ memset(this, 0, sizeof(*this));
+}
+
std::string GetEntryHashForKey(const std::string& key) {
const std::string sha_hash = base::SHA1HashString(key);
const std::string key_hash = base::StringPrintf(
« no previous file with comments | « net/disk_cache/simple/simple_disk_format.h ('k') | net/disk_cache/tracing_cache_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698