OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_H_ | 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_H_ |
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_H_ | 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
(...skipping 29 matching lines...) Expand all Loading... | |
40 | 40 |
41 uint64_t initial_magic_number; | 41 uint64_t initial_magic_number; |
42 uint32_t version; | 42 uint32_t version; |
43 uint32_t key_length; | 43 uint32_t key_length; |
44 uint32_t key_hash; | 44 uint32_t key_hash; |
45 }; | 45 }; |
46 | 46 |
47 struct NET_EXPORT_PRIVATE SimpleFileEOF { | 47 struct NET_EXPORT_PRIVATE SimpleFileEOF { |
48 enum Flags { | 48 enum Flags { |
49 FLAG_HAS_CRC32 = (1U << 0), | 49 FLAG_HAS_CRC32 = (1U << 0), |
50 FLAG_HAS_KEY_SHA256 = (2U << 1), | |
Randy Smith (Not in Mondays)
2016/05/19 19:38:49
Are you intentionally leaving a gap between the bi
gavinp
2016/05/20 01:42:31
Nope, that was a mistake. Thanks.
| |
50 }; | 51 }; |
51 | 52 |
52 SimpleFileEOF(); | 53 SimpleFileEOF(); |
53 | 54 |
54 uint64_t final_magic_number; | 55 uint64_t final_magic_number; |
55 uint32_t flags; | 56 uint32_t flags; |
56 uint32_t data_crc32; | 57 uint32_t data_crc32; |
57 // |stream_size| is only used in the EOF record for stream 0. | 58 // |stream_size| is only used in the EOF record for stream 0. |
58 uint32_t stream_size; | 59 uint32_t stream_size; |
59 }; | 60 }; |
60 | 61 |
61 struct SimpleFileSparseRangeHeader { | 62 struct SimpleFileSparseRangeHeader { |
62 SimpleFileSparseRangeHeader(); | 63 SimpleFileSparseRangeHeader(); |
63 | 64 |
64 uint64_t sparse_range_magic_number; | 65 uint64_t sparse_range_magic_number; |
65 int64_t offset; | 66 int64_t offset; |
66 int64_t length; | 67 int64_t length; |
67 uint32_t data_crc32; | 68 uint32_t data_crc32; |
68 }; | 69 }; |
69 | 70 |
70 } // namespace disk_cache | 71 } // namespace disk_cache |
71 | 72 |
72 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_H_ | 73 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_H_ |
OLD | NEW |