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

Side by Side Diff: net/disk_cache/addr.h

Issue 2891022: Disk cache: Read the index and data_0 files in a single... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // This is an internal class that handles the address of a cache record. 5 // This is an internal class that handles the address of a cache record.
6 // See net/disk_cache/disk_cache.h for the public interface of the cache. 6 // See net/disk_cache/disk_cache.h for the public interface of the cache.
7 7
8 #ifndef NET_DISK_CACHE_ADDR_H_ 8 #ifndef NET_DISK_CACHE_ADDR_H_
9 #define NET_DISK_CACHE_ADDR_H_ 9 #define NET_DISK_CACHE_ADDR_H_
10 10
11 #include "net/disk_cache/disk_format.h" 11 #include "net/disk_cache/disk_format.h"
12 12
13 namespace disk_cache { 13 namespace disk_cache {
14 14
15 enum FileType { 15 enum FileType {
16 EXTERNAL = 0, 16 EXTERNAL = 0,
17 RANKINGS = 1, 17 RANKINGS = 1,
18 BLOCK_256, 18 BLOCK_256,
19 BLOCK_1K, 19 BLOCK_1K,
20 BLOCK_4K, 20 BLOCK_4K,
21 }; 21 };
22 22
23 const int kMaxBlockSize = 4096 * 4; 23 const int kMaxBlockSize = 4096 * 4;
24 const int kMaxBlockFile = 255; 24 const int kMaxBlockFile = 255;
25 const int kMaxNumBlocks = 4; 25 const int kMaxNumBlocks = 4;
26 const int kFirstAdditionlBlockFile = 4; 26 const int kFirstAdditionalBlockFile = 4;
27 27
28 // Defines a storage address for a cache record 28 // Defines a storage address for a cache record
29 // 29 //
30 // Header: 30 // Header:
31 // 1000 0000 0000 0000 0000 0000 0000 0000 : initialized bit 31 // 1000 0000 0000 0000 0000 0000 0000 0000 : initialized bit
32 // 0111 0000 0000 0000 0000 0000 0000 0000 : file type 32 // 0111 0000 0000 0000 0000 0000 0000 0000 : file type
33 // 33 //
34 // File type values: 34 // File type values:
35 // 0 = separate file on disk 35 // 0 = separate file on disk
36 // 1 = rankings block file 36 // 1 = rankings block file
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 static const uint32 kFileSelectorOffset = 16; 128 static const uint32 kFileSelectorOffset = 16;
129 static const uint32 kStartBlockMask = 0x0000FFFF; 129 static const uint32 kStartBlockMask = 0x0000FFFF;
130 static const uint32 kFileNameMask = 0x0FFFFFFF; 130 static const uint32 kFileNameMask = 0x0FFFFFFF;
131 131
132 CacheAddr value_; 132 CacheAddr value_;
133 }; 133 };
134 134
135 } // namespace disk_cache 135 } // namespace disk_cache
136 136
137 #endif // NET_DISK_CACHE_ADDR_H_ 137 #endif // NET_DISK_CACHE_ADDR_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | net/disk_cache/backend_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698