Index: net/disk_cache/mapped_file.h |
=================================================================== |
--- net/disk_cache/mapped_file.h (revision 199883) |
+++ net/disk_cache/mapped_file.h (working copy) |
@@ -8,7 +8,6 @@ |
#define NET_DISK_CACHE_MAPPED_FILE_H_ |
#include "net/base/net_export.h" |
-#include "net/disk_cache/disk_format.h" |
#include "net/disk_cache/file.h" |
#include "net/disk_cache/file_block.h" |
@@ -31,6 +30,11 @@ |
// will be mapped in memory. |
void* Init(const base::FilePath& name, size_t size); |
+ // Performs object initialization without actually mapping any portion of the |
+ // file. It assumes that the bitmap and header (of the related block file) are |
+ // mapped somewhere else. |
+ bool InitNoMap(const base::FilePath& name); |
+ |
void* buffer() const { |
return buffer_; |
} |
@@ -39,6 +43,11 @@ |
bool Load(const FileBlock* block); |
bool Store(const FileBlock* block); |
+ // Asynchronous versions of Load/Store, following the semantics of File::Read |
+ // and File::Write. |
+ bool Load(const FileBlock* block, FileIOCallback* callback, bool* completed); |
+ bool Store(const FileBlock* block, FileIOCallback* callback, bool* completed); |
+ |
// Flush the memory-mapped section to disk (synchronously). |
void Flush(); |