summaryrefslogtreecommitdiff
path: root/chromium/net/disk_cache/simple/simple_entry_impl.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/disk_cache/simple/simple_entry_impl.cc')
-rw-r--r--chromium/net/disk_cache/simple/simple_entry_impl.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/net/disk_cache/simple/simple_entry_impl.cc b/chromium/net/disk_cache/simple/simple_entry_impl.cc
index 147350d3714..594e50f6180 100644
--- a/chromium/net/disk_cache/simple/simple_entry_impl.cc
+++ b/chromium/net/disk_cache/simple/simple_entry_impl.cc
@@ -599,6 +599,13 @@ int SimpleEntryImpl::ReadyForSparseIO(const CompletionCallback& callback) {
return net::OK;
}
+void SimpleEntryImpl::SetLastUsedTimeForTest(base::Time time) {
+ // Note that we do not update |last_used_| here as it gets overwritten
+ // by UpdateDataFromEntryStat with the current time. It would be more involved
+ // to make that value stick and is not needed by the current tests.
+ backend_->index()->SetLastUsedTimeForTest(entry_hash_, time);
+}
+
size_t SimpleEntryImpl::EstimateMemoryUsage() const {
// TODO(xunjieli): crbug.com/669108. It'd be nice to have the rest of |entry|
// measured, but the ownership of SimpleSynchronousEntry isn't straightforward