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

Unified Diff: net/disk_cache/disk_format_base.h

Issue 17507006: Disk cache v3 ref2 Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Incl IndexTable cl Created 7 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
« no previous file with comments | « net/disk_cache/disk_cache_test_util.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/disk_format_base.h
===================================================================
--- net/disk_cache/disk_format_base.h (revision 232523)
+++ net/disk_cache/disk_format_base.h (working copy)
@@ -33,6 +33,7 @@
const uint32 kBlockMagic = 0xC104CAC3;
const int kBlockHeaderSize = 8192; // Two pages: almost 64k entries
const int kMaxBlocks = (kBlockHeaderSize - 80) * 8;
+const int kNumExtraBlocks = 1024;
// Bitmap to track used blocks on a block-file.
typedef uint32 AllocBitmap[kMaxBlocks / 32];
@@ -44,8 +45,12 @@
// instance, an entry of 3 blocks is an entry of type 3. We also keep track of
// where did we find the last entry of that type (to avoid searching the bitmap
// from the beginning every time).
+//
+// The only difference between versions 2 and 3 is that the latter stores the
+// header and allocation file in a dedicated file, and the data in another file,
+// instead of using a single file for both things (as does version 2).
// This Structure is the header of a block-file:
-struct BlockFileHeader {
+struct NET_EXPORT_PRIVATE BlockFileHeader {
uint32 magic;
uint32 version;
int16 this_file; // Index of this file.
« no previous file with comments | « net/disk_cache/disk_cache_test_util.cc ('k') | net/disk_cache/entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698