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

Unified Diff: net/disk_cache/block_files.cc

Issue 149306: Disk cache: Add explicit support for eviction / deletion... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « no previous file | net/disk_cache/disk_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/block_files.cc
===================================================================
--- net/disk_cache/block_files.cc (revision 20076)
+++ net/disk_cache/block_files.cc (working copy)
@@ -261,7 +261,10 @@
}
MappedFile* BlockFiles::GetFile(Addr address) {
- CHECK(block_files_.size() >= 4);
+ DCHECK(block_files_.size() >= 4);
+ DCHECK(address.is_block_file() || !address.is_initialized());
+ if (!address.is_initialized())
+ return NULL;
int file_index = address.FileNumber();
if (static_cast<unsigned int>(file_index) >= block_files_.size() ||
« no previous file with comments | « no previous file | net/disk_cache/disk_format.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698