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

Unified Diff: net/disk_cache/entry_impl.cc

Issue 15772003: Disk Cache: Make Stats independent of the backend implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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/entry_impl.cc
===================================================================
--- net/disk_cache/entry_impl.cc (revision 201602)
+++ net/disk_cache/entry_impl.cc (working copy)
@@ -1181,8 +1181,7 @@
if (!backend_->CreateExternalFile(address))
return false;
} else {
- int num_blocks = (size + Addr::BlockSizeForFileType(file_type) - 1) /
- Addr::BlockSizeForFileType(file_type);
+ int num_blocks = Addr::RequiredBlocks(size, file_type);
if (!backend_->CreateBlock(file_type, num_blocks, address))
return false;

Powered by Google App Engine
This is Rietveld 408576698