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

Unified Diff: net/http/mock_http_cache.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
« net/disk_cache/simple/simple_backend_impl.cc ('K') | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/mock_http_cache.cc
diff --git a/net/http/mock_http_cache.cc b/net/http/mock_http_cache.cc
index d939a3d8f9692f9f6c8eeddeda0e97dd1ccc38ca..882ab09811670f59dc19c3892c9ff132a2dd70cd 100644
--- a/net/http/mock_http_cache.cc
+++ b/net/http/mock_http_cache.cc
@@ -91,6 +91,14 @@ int32 MockDiskEntry::GetDataSize(int index) const {
return static_cast<int32>(data_[index].size());
}
+int MockDiskEntry::GetEntrySize() const {
+ int result = 0;
+ for (int i = 0; i < kNumCacheEntryDataIndices; ++i) {
+ result += GetDataSize(i);
+ }
+ return result;
+}
+
int MockDiskEntry::ReadData(int index,
int offset,
IOBuffer* buf,
@@ -477,6 +485,13 @@ int MockDiskCache::DoomEntriesSince(const base::Time initial_time,
return ERR_NOT_IMPLEMENTED;
}
+int MockDiskCache::CalculateSizeOfEntriesBetween(
+ base::Time initial_time,
+ base::Time end_time,
+ const CompletionCallback& callback) {
+ return ERR_NOT_IMPLEMENTED;
+}
+
class MockDiskCache::NotImplementedIterator : public Iterator {
public:
int OpenNextEntry(disk_cache::Entry** next_entry,
« net/disk_cache/simple/simple_backend_impl.cc ('K') | « net/http/mock_http_cache.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698