Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: net/disk_cache/v3/block_bitmaps.h

Issue 17507006: Disk cache v3 ref2 Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Incl IndexTable cl Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/v3/backend_worker.cc ('k') | net/disk_cache/v3/block_bitmaps.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « net/disk_cache/v3/backend_worker.cc ('k') | net/disk_cache/v3/block_bitmaps.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698