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

Unified Diff: net/disk_cache/blockfile/block_files.cc

Issue 206453003: Move Preload() code to MappedFile (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just keeping the code cleanup. Created 6 years, 9 months 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
Index: net/disk_cache/blockfile/block_files.cc
diff --git a/net/disk_cache/blockfile/block_files.cc b/net/disk_cache/blockfile/block_files.cc
index 3f4bbf5274c3212d812f5b87ef7502ef65649bb7..ac6114ee746b7b3595ef23a4027d5655fe9c7888 100644
--- a/net/disk_cache/blockfile/block_files.cc
+++ b/net/disk_cache/blockfile/block_files.cc
@@ -508,9 +508,8 @@ bool BlockFiles::OpenBlockFile(int index) {
}
if (index == 0) {
- // Load the links file into memory with a single read.
- scoped_ptr<char[]> buf(new char[file_len]);
- if (!file->Read(buf.get(), file_len, 0))
+ // Load the links file into memory.
+ if (!file->Preload())
return false;
}

Powered by Google App Engine
This is Rietveld 408576698