| Index: net/disk_cache/v3/block_bitmaps.h
|
| ===================================================================
|
| --- net/disk_cache/v3/block_bitmaps.h (revision 232523)
|
| +++ net/disk_cache/v3/block_bitmaps.h (working copy)
|
| @@ -8,9 +8,12 @@
|
| #define NET_DISK_CACHE_V3_BLOCK_BITMAPS_H_
|
|
|
| #include "base/files/file_path.h"
|
| +#include "base/gtest_prod_util.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "net/base/net_export.h"
|
| #include "net/disk_cache/addr.h"
|
| #include "net/disk_cache/block_files.h"
|
| +#include "net/disk_cache/mapped_file.h"
|
|
|
| namespace disk_cache {
|
|
|
| @@ -22,7 +25,7 @@
|
| // regions in those files used to store data.
|
| class NET_EXPORT_PRIVATE BlockBitmaps {
|
| public:
|
| - BlockBitmaps();
|
| + explicit BlockBitmaps(BackendImplV3* backend);
|
| ~BlockBitmaps();
|
|
|
| void Init(const BlockFilesBitmaps& bitmaps);
|
| @@ -49,6 +52,9 @@
|
| // Returns the header number that stores a given address.
|
| int GetHeaderNumber(Addr address);
|
|
|
| + // Returns the number of entry blocks for the given file type.
|
| + int EmptyBlocksForType(int first_file);
|
| +
|
| // Returns the appropriate header to use for a new block.
|
| int HeaderNumberForNewBlock(FileType block_type, int block_count);
|
|
|
| @@ -56,6 +62,8 @@
|
| void GetFileStats(int index, int* used_count, int* load);
|
|
|
| BlockFilesBitmaps bitmaps_;
|
| + BackendImplV3* backend_;
|
| + int empty_counts_[kFirstAdditionalBlockFileV3];
|
|
|
| DISALLOW_COPY_AND_ASSIGN(BlockBitmaps);
|
| };
|
|
|