Chromium Code Reviews| Index: Source/core/loader/cache/MemoryCache.h |
| diff --git a/Source/core/loader/cache/MemoryCache.h b/Source/core/loader/cache/MemoryCache.h |
| index 8da416cdead5183fdec701c372d8d55552698bba..9e2d1a34856689dfceed92e7bdcf5146f18f09aa 100644 |
| --- a/Source/core/loader/cache/MemoryCache.h |
| +++ b/Source/core/loader/cache/MemoryCache.h |
| @@ -119,6 +119,7 @@ public: |
| // - maxDeadBytes: The maximum number of bytes that dead resources should consume when the cache is not under pressure. |
| // - totalBytes: The maximum number of bytes that the cache should consume overall. |
| void setCapacities(unsigned minDeadBytes, unsigned maxDeadBytes, unsigned totalBytes); |
| + void setDelayBeforeLiveDecodedPrune(unsigned seconds) { m_delayBeforeLiveDecodedPrune = seconds; } |
| void evictResources(); |
| @@ -173,6 +174,8 @@ private: |
| unsigned m_capacity; |
| unsigned m_minDeadCapacity; |
| unsigned m_maxDeadCapacity; |
| + unsigned m_delayBeforeLiveDecodedPrune; |
| + double m_deadDecodedDataDeletionInterval; |
| unsigned m_liveSize; // The number of bytes currently consumed by "live" resources in the cache. |
| unsigned m_deadSize; // The number of bytes currently consumed by "dead" resources in the cache. |
| @@ -182,8 +185,9 @@ private: |
| // waiting to die when the clients referencing them go away. |
| Vector<LRUList, 32> m_allResources; |
| - // List just for live resources with decoded data. Access to this list is based off of painting the resource. |
| - LRUList m_liveDecodedResources; |
| + // Lists just for live resources with decoded data. Access to this list is based off of painting the resource. |
| + // The lists are ordered by decode priority, with higher indices having higher priorities. |
| + LRUList m_liveDecodedResources[3]; |
|
Nate Chapin
2013/07/26 17:05:12
Boo magic numbers :(
Maybe add a value to the enu
|
| // A URL-based map of all resources that are in the cache (including the freshest version of objects that are currently being |
| // referenced by a Web page). |