Home | History | Annotate | Download | only in renderer_host

Lines Matching defs:cache

32 // Maybe this cache should be redesigned to simply prefer smaller objects to
41 // could make an assertion like "worse case, there are two tabs in the cache".
74 // Expires the given |backing_store| from |cache|.
75 void ExpireBackingStoreAt(BackingStoreCache* cache,
77 cache->Erase(backing_store);
80 size_t ExpireLastBackingStore(BackingStoreCache* cache) {
81 if (cache->size() < 1)
86 BackingStoreCache::iterator entry = --cache->rbegin().base();
88 ExpireBackingStoreAt(cache, entry);
93 // Given a request for |size|, first free from the large cache (until there's
94 // only one item left) and then do the same from the small cache if we still
97 BackingStoreCache* cache =
99 while (size > 0 && cache->size() > 1) {
100 size_t entry_size = ExpireLastBackingStore(cache);
131 // have removed the old one in the RemoveBackingStore above, and the cache
137 BackingStoreCache* cache;
142 // won't ever cache more than 5 tabs, so they pay a smaller memory cost.
145 cache = large_cache;
147 cache = small_cache;
152 cache->Put(host, backing_store);
247 BackingStoreCache* cache = large_cache;
248 BackingStoreCache::iterator it = cache->Peek(host);
249 if (it == cache->end()) {
250 cache = small_cache;
251 it = cache->Peek(host);
252 if (it == cache->end())
255 cache->Erase(it);