OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) | 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) |
3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> | 3 Copyright (C) 2001 Dirk Mueller <mueller@kde.org> |
4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 4 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
5 | 5 |
6 This library is free software; you can redistribute it and/or | 6 This library is free software; you can redistribute it and/or |
7 modify it under the terms of the GNU Library General Public | 7 modify it under the terms of the GNU Library General Public |
8 License as published by the Free Software Foundation; either | 8 License as published by the Free Software Foundation; either |
9 version 2 of the License, or (at your option) any later version. | 9 version 2 of the License, or (at your option) any later version. |
10 | 10 |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 void prune(Resource* justReleasedResource = 0); | 192 void prune(Resource* justReleasedResource = 0); |
193 | 193 |
194 // Called to adjust a resource's size, lru list position, and access count. | 194 // Called to adjust a resource's size, lru list position, and access count. |
195 void update(Resource*, size_t oldSize, size_t newSize, bool wasAccessed = fa
lse); | 195 void update(Resource*, size_t oldSize, size_t newSize, bool wasAccessed = fa
lse); |
196 void updateForAccess(Resource* resource) { update(resource, resource->size()
, resource->size(), true); } | 196 void updateForAccess(Resource* resource) { update(resource, resource->size()
, resource->size(), true); } |
197 void updateDecodedResource(Resource*, UpdateReason); | 197 void updateDecodedResource(Resource*, UpdateReason); |
198 | 198 |
199 void makeLive(Resource*); | 199 void makeLive(Resource*); |
200 void makeDead(Resource*); | 200 void makeDead(Resource*); |
201 | 201 |
202 // This should be called when a Resource object is created. | |
203 void registerLiveResource(Resource&); | |
204 // This should be called when a Resource object becomes unnecesarry. | |
205 void unregisterLiveResource(Resource&); | |
206 | |
207 void removeURLFromCache(const KURL&); | 202 void removeURLFromCache(const KURL&); |
208 | 203 |
209 Statistics getStatistics(); | 204 Statistics getStatistics(); |
210 | 205 |
211 size_t minDeadCapacity() const { return m_minDeadCapacity; } | 206 size_t minDeadCapacity() const { return m_minDeadCapacity; } |
212 size_t maxDeadCapacity() const { return m_maxDeadCapacity; } | 207 size_t maxDeadCapacity() const { return m_maxDeadCapacity; } |
213 size_t capacity() const { return m_capacity; } | 208 size_t capacity() const { return m_capacity; } |
214 size_t liveSize() const { return m_liveSize; } | 209 size_t liveSize() const { return m_liveSize; } |
215 size_t deadSize() const { return m_deadSize; } | 210 size_t deadSize() const { return m_deadSize; } |
216 | 211 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 // Returns the global cache. | 304 // Returns the global cache. |
310 CORE_EXPORT MemoryCache* memoryCache(); | 305 CORE_EXPORT MemoryCache* memoryCache(); |
311 | 306 |
312 // Sets the global cache, used to swap in a test instance. Returns the old | 307 // Sets the global cache, used to swap in a test instance. Returns the old |
313 // MemoryCache object. | 308 // MemoryCache object. |
314 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 309 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
315 | 310 |
316 } // namespace blink | 311 } // namespace blink |
317 | 312 |
318 #endif | 313 #endif |
OLD | NEW |