OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_V3_INDEX_TABLE_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_ |
rvargas (doing something else)
2014/02/11 03:21:28
no v3
| |
6 #define NET_DISK_CACHE_V3_INDEX_TABLE_H_ | 6 #define NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_ |
7 | 7 |
8 // The IndexTable class is in charge of handling all the details about the main | 8 // The IndexTable class is in charge of handling all the details about the main |
9 // index table of the cache. It provides methods to locate entries in the cache, | 9 // index table of the cache. It provides methods to locate entries in the cache, |
10 // create new entries and modify existing entries. It hides the fact that the | 10 // create new entries and modify existing entries. It hides the fact that the |
11 // table is backed up across multiple physical files, and that the files can | 11 // table is backed up across multiple physical files, and that the files can |
12 // grow and be remapped while the cache is in use. However, note that this class | 12 // grow and be remapped while the cache is in use. However, note that this class |
13 // doesn't do any direct management of the backing files, and it operates only | 13 // doesn't do any direct management of the backing files, and it operates only |
14 // with the tables in memory. | 14 // with the tables in memory. |
15 // | 15 // |
16 // When the current index needs to grow, the backend is notified so that files | 16 // When the current index needs to grow, the backend is notified so that files |
17 // are extended and remapped as needed. After that, the IndexTable should be | 17 // are extended and remapped as needed. After that, the IndexTable should be |
18 // re-initialized with the new structures. Note that the IndexTable instance is | 18 // re-initialized with the new structures. Note that the IndexTable instance is |
19 // still functional while the backend performs file IO. | 19 // still functional while the backend performs file IO. |
20 | 20 |
21 #include <vector> | 21 #include <vector> |
22 | 22 |
23 #include "base/basictypes.h" | 23 #include "base/basictypes.h" |
24 #include "base/memory/ref_counted.h" | 24 #include "base/memory/ref_counted.h" |
25 #include "base/memory/scoped_ptr.h" | 25 #include "base/memory/scoped_ptr.h" |
26 #include "base/time/time.h" | 26 #include "base/time/time.h" |
27 #include "net/base/net_export.h" | 27 #include "net/base/net_export.h" |
28 #include "net/disk_cache/addr.h" | 28 #include "net/disk_cache/blockfile/addr.h" |
29 #include "net/disk_cache/bitmap.h" | 29 #include "net/disk_cache/blockfile/bitmap.h" |
30 #include "net/disk_cache/v3/disk_format_v3.h" | 30 #include "net/disk_cache/blockfile/disk_format_v3.h" |
31 | 31 |
32 namespace net { | 32 namespace net { |
33 class IOBuffer; | 33 class IOBuffer; |
34 } | 34 } |
35 | 35 |
36 namespace disk_cache { | 36 namespace disk_cache { |
37 | 37 |
38 class BackendImplV3; | 38 class BackendImplV3; |
39 struct InitResult; | 39 struct InitResult; |
40 | 40 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
269 uint32 mask_; // Binary mask to map a hash to the hash table. | 269 uint32 mask_; // Binary mask to map a hash to the hash table. |
270 int extra_bits_; // How many bits are in mask_ above the default value. | 270 int extra_bits_; // How many bits are in mask_ above the default value. |
271 bool modified_; | 271 bool modified_; |
272 bool small_table_; | 272 bool small_table_; |
273 | 273 |
274 DISALLOW_COPY_AND_ASSIGN(IndexTable); | 274 DISALLOW_COPY_AND_ASSIGN(IndexTable); |
275 }; | 275 }; |
276 | 276 |
277 } // namespace disk_cache | 277 } // namespace disk_cache |
278 | 278 |
279 #endif // NET_DISK_CACHE_V3_INDEX_TABLE_H_ | 279 #endif // NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_ |
OLD | NEW |