Index: net/disk_cache/simple/simple_entry_impl.cc |
diff --git a/net/disk_cache/simple/simple_entry_impl.cc b/net/disk_cache/simple/simple_entry_impl.cc |
index d817cdeda3d22ca3e093e643e9bb0c373a8149c0..cb393cbec5ce088d23d3e8687e2349d7509afd0b 100644 |
--- a/net/disk_cache/simple/simple_entry_impl.cc |
+++ b/net/disk_cache/simple/simple_entry_impl.cc |
@@ -270,6 +270,10 @@ void SimpleEntryImpl::EntryOperationComplete( |
// |entry| must have had Close() called while this operation was in flight. |
// Since the simple cache now only supports one pending entry operation in |
// flight at a time, it's safe to now call Close() on |sync_entry|. |
+ |
+ // TODO(felipeg): In this case, how do update the entry size in the total |
+ // cache size ? |
gavinp
2013/04/09 15:27:37
sync_entry->data_size(i) still works at this point
felipeg
2013/04/09 16:24:35
Done.
|
+ |
WorkerPool::PostTask(FROM_HERE, |
base::Bind(&SimpleSynchronousEntry::Close, |
base::Unretained(sync_entry)), |
@@ -286,8 +290,12 @@ void SimpleEntryImpl::SetSynchronousData() { |
// filesystems not being accurate. |
last_used_ = synchronous_entry_->last_used(); |
last_modified_ = synchronous_entry_->last_modified(); |
- for (int i = 0; i < kSimpleEntryFileCount; ++i) |
+ uint64 total_entry_size = 0; |
+ for (int i = 0; i < kSimpleEntryFileCount; ++i) { |
data_size_[i] = synchronous_entry_->data_size(i); |
+ total_entry_size += data_size_[i]; |
gavinp
2013/04/09 15:40:19
Maybe add SimpleSynchronousEntry::GetFileSize()?
felipeg
2013/04/09 16:24:35
Done.
|
+ } |
+ index_->UpdateEntrySize(key_, total_entry_size); |
} |
} // namespace disk_cache |