Index: net/disk_cache/v3/block_bitmaps.h |
=================================================================== |
--- net/disk_cache/v3/block_bitmaps.h (revision 0) |
+++ net/disk_cache/v3/block_bitmaps.h (working copy) |
@@ -16,10 +16,6 @@ |
#include "net/disk_cache/addr.h" |
#include "net/disk_cache/mapped_file.h" |
-namespace base { |
-class ThreadChecker; |
-} |
- |
namespace disk_cache { |
// This class handles the set of block-files open by the disk cache. |
@@ -57,45 +53,20 @@ |
bool IsValid(Addr address); |
private: |
- // Set force to true to overwrite the file if it exists. |
- bool CreateBlockFile(int index, FileType file_type, bool force); |
- bool OpenBlockFile(int index); |
- |
// Attemp to grow this file. Fails if the file cannot be extended anymore. |
bool GrowBlockFile(MappedFile* file, BlockFileHeader* header); |
// Returns the appropriate file to use for a new block. |
MappedFile* FileForNewBlock(FileType block_type, int block_count); |
- // Returns the next block file on this chain, creating new files if needed. |
- MappedFile* NextFile(MappedFile* file); |
- |
- // Creates an empty block file and returns its index. |
- int CreateNextBlockFile(FileType block_type); |
- |
- // Removes a chained block file that is now empty. |
- bool RemoveEmptyFile(FileType block_type); |
- |
// Restores the header of a potentially inconsistent file. |
bool FixBlockFileHeader(MappedFile* file); |
// Retrieves stats for the given file index. |
void GetFileStats(int index, int* used_count, int* load); |
- // Returns the filename for a given file index. |
- base::FilePath Name(int index); |
- |
bool init_; |
- char* zero_buffer_; // Buffer to speed-up cleaning deleted entries. |
- base::FilePath path_; // Path to the backing folder. |
- std::vector<MappedFile*> block_files_; // The actual files. |
- scoped_ptr<base::ThreadChecker> thread_checker_; |
- FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_ZeroSizeFile); |
- FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_TruncatedFile); |
- FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_InvalidFile); |
- FRIEND_TEST_ALL_PREFIXES(DiskCacheTest, BlockFiles_Stats); |
- |
DISALLOW_COPY_AND_ASSIGN(BlockFiles); |
}; |