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

Unified Diff: net/disk_cache/mapped_file_win.cc

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/mapped_file.h ('k') | net/disk_cache/storage_block.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/mapped_file_win.cc
===================================================================
--- net/disk_cache/mapped_file_win.cc (revision 232523)
+++ net/disk_cache/mapped_file_win.cc (working copy)
@@ -28,14 +28,26 @@
view_size_ = size;
// Make sure we detect hardware failures reading the headers.
- size_t temp_len = size ? size : 4096;
+ /*size_t temp_len = size ? size : 4096;
scoped_ptr<char[]> temp(new char[temp_len]);
if (!Read(temp.get(), temp_len, 0))
- return NULL;
+ return NULL;*/
return buffer_;
}
+bool MappedFile::InitNoMap(const base::FilePath& name) {
+ DCHECK(!init_);
+ if (init_ || !File::Init(name))
+ return false;
+
+ buffer_ = NULL;
+ section_ = NULL;
+ view_size_ = 0;
+ init_ = true;
+ return true;
+}
+
MappedFile::~MappedFile() {
if (!init_)
return;
« no previous file with comments | « net/disk_cache/mapped_file.h ('k') | net/disk_cache/storage_block.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698