| 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_BLOCKFILE_INDEX_TABLE_V3_H_ | 5 #ifndef NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_ |
| 6 #define NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_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 <stddef.h> |
| 21 #include <stdint.h> | 22 #include <stdint.h> |
| 22 | 23 |
| 23 #include <vector> | 24 #include <vector> |
| 24 | 25 |
| 25 #include "base/macros.h" | 26 #include "base/macros.h" |
| 26 #include "base/memory/ref_counted.h" | 27 #include "base/memory/ref_counted.h" |
| 27 #include "base/memory/scoped_ptr.h" | 28 #include "base/memory/scoped_ptr.h" |
| 28 #include "base/time/time.h" | 29 #include "base/time/time.h" |
| 29 #include "net/base/net_export.h" | 30 #include "net/base/net_export.h" |
| 30 #include "net/disk_cache/blockfile/addr.h" | 31 #include "net/disk_cache/blockfile/addr.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 int extra_bits_; // How many bits are in mask_ above the default value. | 276 int extra_bits_; // How many bits are in mask_ above the default value. |
| 276 bool modified_; | 277 bool modified_; |
| 277 bool small_table_; | 278 bool small_table_; |
| 278 | 279 |
| 279 DISALLOW_COPY_AND_ASSIGN(IndexTable); | 280 DISALLOW_COPY_AND_ASSIGN(IndexTable); |
| 280 }; | 281 }; |
| 281 | 282 |
| 282 } // namespace disk_cache | 283 } // namespace disk_cache |
| 283 | 284 |
| 284 #endif // NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_ | 285 #endif // NET_DISK_CACHE_BLOCKFILE_INDEX_TABLE_V3_H_ |
| OLD | NEW |