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

Unified Diff: net/disk_cache/blockfile/entry_impl_v3.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/blockfile/entry_impl_v3.cc
diff --git a/net/disk_cache/blockfile/entry_impl_v3.cc b/net/disk_cache/blockfile/entry_impl_v3.cc
index 73719364829fb761998f0f765ebc86c9e0081be5..a4cac30b1844c99a80347393d3d1a21fed174f5b 100644
--- a/net/disk_cache/blockfile/entry_impl_v3.cc
+++ b/net/disk_cache/blockfile/entry_impl_v3.cc
@@ -521,6 +521,13 @@ int32 EntryImplV3::GetDataSize(int index) const {
return entry->Data()->data_size[index];
}
+int EntryImplV3::GetEntrySize() const {
+ int result = 0;
+ for (int i = 0; i < kNumStreams; ++i)
+ result += GetDataSize(i);
+ return result;
+}
+
int EntryImplV3::ReadData(int index, int offset, IOBuffer* buf, int buf_len,
const CompletionCallback& callback) {
if (callback.is_null())
@@ -1419,6 +1426,10 @@ int32 EntryImplV3::GetDataSize(int index) const {
return 0;
}
+int EntryImplV3::GetEntrySize() const {
+ return 0;
+}
+
int EntryImplV3::ReadData(int index, int offset, IOBuffer* buf, int buf_len,
const CompletionCallback& callback) {
return net::ERR_FAILED;

Powered by Google App Engine
This is Rietveld 408576698