OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // See net/disk_cache/disk_cache.h for the public interface. | 5 // See net/disk_cache/disk_cache.h for the public interface. |
6 | 6 |
7 #ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ | 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ |
8 #define NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ | 8 #define NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ |
9 | 9 |
10 #include <stdint.h> | 10 #include <stdint.h> |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool ValidateCounters() const; | 74 bool ValidateCounters() const; |
75 | 75 |
76 // Returns the identifiers of this and the next file (0 if there is none). | 76 // Returns the identifiers of this and the next file (0 if there is none). |
77 int FileId() const; | 77 int FileId() const; |
78 int NextFileId() const; | 78 int NextFileId() const; |
79 | 79 |
80 // Returns the size of the wrapped structure (BlockFileHeader). | 80 // Returns the size of the wrapped structure (BlockFileHeader). |
81 int Size() const; | 81 int Size() const; |
82 | 82 |
83 // Returns a pointer to the underlying BlockFileHeader. | 83 // Returns a pointer to the underlying BlockFileHeader. |
84 // TODO(rvargas): This may be removed with the support for V2. | |
85 BlockFileHeader* Header(); | 84 BlockFileHeader* Header(); |
86 | 85 |
87 private: | 86 private: |
88 BlockFileHeader* header_; | 87 BlockFileHeader* header_; |
89 }; | 88 }; |
90 | 89 |
91 typedef std::vector<BlockHeader> BlockFilesBitmaps; | 90 typedef std::vector<BlockHeader> BlockFilesBitmaps; |
92 | 91 |
93 // This class handles the set of block-files open by the disk cache. | 92 // This class handles the set of block-files open by the disk cache. |
94 class NET_EXPORT_PRIVATE BlockFiles { | 93 class NET_EXPORT_PRIVATE BlockFiles { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile); | 162 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile); |
164 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile); | 163 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile); |
165 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats); | 164 FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats); |
166 | 165 |
167 DISALLOW_COPY_AND_ASSIGN(BlockFiles); | 166 DISALLOW_COPY_AND_ASSIGN(BlockFiles); |
168 }; | 167 }; |
169 | 168 |
170 } // namespace disk_cache | 169 } // namespace disk_cache |
171 | 170 |
172 #endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ | 171 #endif // NET_DISK_CACHE_BLOCKFILE_BLOCK_FILES_H_ |
OLD | NEW |