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

Side by Side Diff: net/disk_cache/blockfile/disk_format_v3.h

Issue 399313006: Move bit_cast from base/macros.h to its own header (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compile after r368203 Created 4 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/blockfile/bitmap.h ('k') | net/disk_cache/blockfile/index_table_v3.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // The cache is stored on disk as a collection of block-files, plus an index 5 // The cache is stored on disk as a collection of block-files, plus an index
6 // plus a collection of external files. 6 // plus a collection of external files.
7 // 7 //
8 // Any data blob bigger than kMaxBlockSize (disk_cache/addr.h) will be stored in 8 // Any data blob bigger than kMaxBlockSize (disk_cache/addr.h) will be stored in
9 // a separate file named f_xxx where x is a hexadecimal number. Shorter data 9 // a separate file named f_xxx where x is a hexadecimal number. Shorter data
10 // will be stored as a series of blocks on a block-file. In any case, CacheAddr 10 // will be stored as a series of blocks on a block-file. In any case, CacheAddr
(...skipping 28 matching lines...) Expand all
39 // backup files for cache bitmaps, used to detect entries out of date. 39 // backup files for cache bitmaps, used to detect entries out of date.
40 // 40 //
41 // Although cache files are to be consumed on the same machine that creates 41 // Although cache files are to be consumed on the same machine that creates
42 // them, if files are to be moved accross machines, little endian storage is 42 // them, if files are to be moved accross machines, little endian storage is
43 // assumed. 43 // assumed.
44 44
45 #ifndef NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_ 45 #ifndef NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_
46 #define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_ 46 #define NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_
47 47
48 #include <stdint.h> 48 #include <stdint.h>
49 #include <string.h>
49 50
50 #include "net/disk_cache/blockfile/disk_format_base.h" 51 #include "net/disk_cache/blockfile/disk_format_base.h"
51 52
52 namespace disk_cache { 53 namespace disk_cache {
53 54
54 const int kBaseTableLen = 0x400; 55 const int kBaseTableLen = 0x400;
55 const uint32_t kIndexMagicV3 = 0xC103CAC3; 56 const uint32_t kIndexMagicV3 = 0xC103CAC3;
56 const uint32_t kVersion3 = 0x30000; // Version 3.0. 57 const uint32_t kVersion3 = 0x30000; // Version 3.0.
57 58
58 // Flags for a given cache. 59 // Flags for a given cache.
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 int32_t key_len; 239 int32_t key_len;
239 uint64_t last_access_time; 240 uint64_t last_access_time;
240 uint32_t long_hash[5]; 241 uint32_t long_hash[5];
241 uint32_t self_hash; 242 uint32_t self_hash;
242 }; 243 };
243 static_assert(sizeof(ShortEntryRecord) == 48, "bad ShortEntryRecord"); 244 static_assert(sizeof(ShortEntryRecord) == 48, "bad ShortEntryRecord");
244 245
245 } // namespace disk_cache 246 } // namespace disk_cache
246 247
247 #endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_ 248 #endif // NET_DISK_CACHE_BLOCKFILE_DISK_FORMAT_V3_H_
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/bitmap.h ('k') | net/disk_cache/blockfile/index_table_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698