Chromium Code Reviews| Index: net/disk_cache/backend_impl.cc |
| diff --git a/net/disk_cache/backend_impl.cc b/net/disk_cache/backend_impl.cc |
| index b03ecda7bc2bb0ee54fb0645a153e5f567e7246e..295330e9baaa9f2f6e2f4e7414c8294725616063 100644 |
| --- a/net/disk_cache/backend_impl.cc |
| +++ b/net/disk_cache/backend_impl.cc |
| @@ -682,6 +682,15 @@ void BackendImpl::SyncEndEnumeration(void* iter) { |
| reinterpret_cast<Rankings::Iterator*>(iter)); |
| } |
| +void BackendImpl::SyncOnExternalCacheHit(const std::string& key) { |
| + uint32 hash = Hash(key); |
| + bool error; |
| + EntryImpl* cache_entry = MatchEntry(key, hash, false, Addr(), &error); |
| + if (cache_entry) { |
| + UpdateRank(cache_entry, false); |
| + } |
|
rvargas (doing something else)
2011/07/28 22:27:01
Leaking the entry.
We should also check that this
|
| +} |
| + |
| EntryImpl* BackendImpl::OpenEntryImpl(const std::string& key) { |
| if (disabled_) |
| return NULL; |
| @@ -1356,6 +1365,10 @@ void BackendImpl::GetStats(StatsItems* stats) { |
| stats_.GetItems(stats); |
| } |
| +void BackendImpl::OnExternalCacheHit(const std::string& key) { |
| + background_queue_.OnExternalCacheHit(key); |
| +} |
| + |
| // ------------------------------------------------------------------------ |
| // We just created a new file so we're going to write the header and set the |