Index: net/disk_cache/simple/simple_entry_format.h |
diff --git a/net/disk_cache/simple/simple_entry_format.h b/net/disk_cache/simple/simple_entry_format.h |
index d06ab1139c53980c54a50347c0bb36279d6a3f28..4df78f376d601c32cc44d352c52677019a065778 100644 |
--- a/net/disk_cache/simple/simple_entry_format.h |
+++ b/net/disk_cache/simple/simple_entry_format.h |
@@ -19,17 +19,23 @@ namespace disk_cache { |
const uint64 kSimpleInitialMagicNumber = GG_UINT64_C(0xfcfb6d1ba7725c30); |
const uint64 kSimpleFinalMagicNumber = GG_UINT64_C(0xf4fa6f45970d41d8); |
-// A file in the Simple cache consists of a SimpleFileHeader followed |
-// by data. |
+// A file containing stream 0 and stream 1 in the Simple cache consists of: |
+// - a SimpleFileHeader. |
+// - the key. |
+// - the data from stream 1. |
+// - a SimpleFileEOF record for stream 1. |
+// - the data from stream 0. |
+// - a SimpleFileEOF record for stream 0. |
-// A file in the Simple cache consists of: |
+// A file containing stream 2 in the Simple cache consists of: |
// - a SimpleFileHeader. |
// - the key. |
// - the data. |
// - at the end, a SimpleFileEOF record. |
-const uint32 kSimpleVersion = 4; |
+const uint32 kSimpleVersion = 5; |
-static const int kSimpleEntryFileCount = 3; |
+static const int kSimpleEntryFileCount = 2; |
+static const int kSimpleEntryStreamCount = 3; |
struct NET_EXPORT_PRIVATE SimpleFileHeader { |
SimpleFileHeader(); |
@@ -38,6 +44,10 @@ struct NET_EXPORT_PRIVATE SimpleFileHeader { |
uint32 version; |
uint32 key_length; |
uint32 key_hash; |
+ // Only used in the file containing stream 0 and stream 1. For stream 2, the |
+ // size is computed from the file size. |
+ uint32 stream_0_size; |
gavinp
2013/09/10 22:20:49
I'm not sure that storing explicit sizes is great.
clamy
2013/09/11 12:46:21
I don't really like the idea of having an offset t
gavinp
2013/09/11 14:22:10
If we write stream 1 size, we're rewriting the hea
clamy
2013/09/16 15:01:17
Done.
|
+ uint32 stream_1_size; |
}; |
struct SimpleFileEOF { |