Make |track_| in MediaStreamTrack const. and a couple of other cosmetic changes.
[chromium-blink-merge.git] / net / disk_cache / simple / simple_entry_format_history.h
blobf7b818a59e9418121ee13d62208ec61232780c98
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_HISTORY_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_HISTORY_H_
8 #include "base/basictypes.h"
9 #include "base/port.h"
10 #include "net/base/net_export.h"
12 namespace disk_cache {
14 namespace simplecache_v5 {
16 const uint64 kSimpleInitialMagicNumber = GG_UINT64_C(0xfcfb6d1ba7725c30);
17 const uint64 kSimpleFinalMagicNumber = GG_UINT64_C(0xf4fa6f45970d41d8);
19 // A file containing stream 0 and stream 1 in the Simple cache consists of:
20 // - a SimpleFileHeader.
21 // - the key.
22 // - the data from stream 1.
23 // - a SimpleFileEOF record for stream 1.
24 // - the data from stream 0.
25 // - a SimpleFileEOF record for stream 0.
27 // A file containing stream 2 in the Simple cache consists of:
28 // - a SimpleFileHeader.
29 // - the key.
30 // - the data.
31 // - at the end, a SimpleFileEOF record.
32 static const int kSimpleEntryFileCount = 2;
33 static const int kSimpleEntryStreamCount = 3;
35 struct NET_EXPORT_PRIVATE SimpleFileHeader {
36 SimpleFileHeader();
38 uint64 initial_magic_number;
39 uint32 version;
40 uint32 key_length;
41 uint32 key_hash;
44 struct NET_EXPORT_PRIVATE SimpleFileEOF {
45 enum Flags {
46 FLAG_HAS_CRC32 = (1U << 0),
49 SimpleFileEOF();
51 uint64 final_magic_number;
52 uint32 flags;
53 uint32 data_crc32;
54 // |stream_size| is only used in the EOF record for stream 0.
55 uint32 stream_size;
58 } // namespace simplecache_v5
60 } // namespace disk_cache
62 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_FORMAT_HISTORY_H_