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

Unified Diff: net/disk_cache/memory/mem_entry_impl.cc

Issue 1304363013: Add a size estimation mechanism to StoragePartitionHttpCacheDataRemover. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Missed some spots again. Created 5 years, 3 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/memory/mem_entry_impl.cc
diff --git a/net/disk_cache/memory/mem_entry_impl.cc b/net/disk_cache/memory/mem_entry_impl.cc
index daa3980144ca569b2e8ef5946f5e1071d665d13d..e638263bee809908ffd7df825d2aa9376685089e 100644
--- a/net/disk_cache/memory/mem_entry_impl.cc
+++ b/net/disk_cache/memory/mem_entry_impl.cc
@@ -183,6 +183,13 @@ int32 MemEntryImpl::GetDataSize(int index) const {
return data_size_[index];
}
+int MemEntryImpl::GetEntrySize() const {
+ int result = 0;
+ for (int i = 0; i < NUM_STREAMS; ++i)
+ result += data_size_[i];
+ return result;
+}
+
int MemEntryImpl::ReadData(int index, int offset, IOBuffer* buf, int buf_len,
const CompletionCallback& callback) {
if (net_log_.IsCapturing()) {

Powered by Google App Engine
This is Rietveld 408576698