Chromium Code Reviews| 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 cfe23e75cf70066caf36a89ec77b05ded1f5af03..9153fea32ccddcc9dec1e94bfd5c59a0564a1e2e 100644 |
| --- a/net/disk_cache/memory/mem_entry_impl.cc |
| +++ b/net/disk_cache/memory/mem_entry_impl.cc |
| @@ -253,6 +253,12 @@ int MemEntryImpl::ReadyForSparseIO(const CompletionCallback& callback) { |
| return net::OK; |
| } |
| +size_t MemEntryImpl::EstimateMemoryUsage() const { |
| + return base::trace_event::EstimateMemoryUsage(data_) + |
| + base::trace_event::EstimateMemoryUsage(key_) + |
| + base::trace_event::EstimateMemoryUsage(children_); |
|
xunjieli
2017/02/27 18:51:31
I suppose the |children_| entries are accounted fo
jkarlin
2017/02/28 13:10:50
Ah, you're right. Switched to using GetStorageSize
xunjieli
2017/02/28 14:51:23
Ah, sorry for the confusion, the previous patchset
jkarlin
2017/02/28 15:50:54
Done.
|
| +} |
| + |
| // ------------------------------------------------------------------------ |
| MemEntryImpl::MemEntryImpl(MemBackendImpl* backend, |