| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // since the decoded cost of resources like scripts and stylesheets is not k
nown. | 180 // since the decoded cost of resources like scripts and stylesheets is not k
nown. |
| 181 // - minDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is under pressure. | 181 // - minDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is under pressure. |
| 182 // - maxDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is not under pressure. | 182 // - maxDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is not under pressure. |
| 183 // - totalBytes: The maximum number of bytes that the cache should consume
overall. | 183 // - totalBytes: The maximum number of bytes that the cache should consume
overall. |
| 184 void setCapacities(size_t minDeadBytes, size_t maxDeadBytes, size_t totalByt
es); | 184 void setCapacities(size_t minDeadBytes, size_t maxDeadBytes, size_t totalByt
es); |
| 185 void setDelayBeforeLiveDecodedPrune(double seconds) { m_delayBeforeLiveDecod
edPrune = seconds; } | 185 void setDelayBeforeLiveDecodedPrune(double seconds) { m_delayBeforeLiveDecod
edPrune = seconds; } |
| 186 void setMaxPruneDeferralDelay(double seconds) { m_maxPruneDeferralDelay = se
conds; } | 186 void setMaxPruneDeferralDelay(double seconds) { m_maxPruneDeferralDelay = se
conds; } |
| 187 | 187 |
| 188 void evictResources(); | 188 void evictResources(); |
| 189 | 189 |
| 190 void prune(Resource* justReleasedResource = 0); | 190 void prune(); |
| 191 | 191 |
| 192 // Called to adjust a resource's size, lru list position, and access count. | 192 // Called to adjust a resource's size, lru list position, and access count. |
| 193 void update(Resource*, size_t oldSize, size_t newSize, bool wasAccessed = fa
lse); | 193 void update(Resource*, size_t oldSize, size_t newSize, bool wasAccessed = fa
lse); |
| 194 void updateForAccess(Resource* resource) { update(resource, resource->size()
, resource->size(), true); } | 194 void updateForAccess(Resource* resource) { update(resource, resource->size()
, resource->size(), true); } |
| 195 void updateDecodedResource(Resource*, UpdateReason); | 195 void updateDecodedResource(Resource*, UpdateReason); |
| 196 | 196 |
| 197 void makeLive(Resource*); | 197 void makeLive(Resource*); |
| 198 void makeDead(Resource*); | 198 void makeDead(Resource*); |
| 199 | 199 |
| 200 void removeURLFromCache(const KURL&); | 200 void removeURLFromCache(const KURL&); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 // Returns the global cache. | 296 // Returns the global cache. |
| 297 CORE_EXPORT MemoryCache* memoryCache(); | 297 CORE_EXPORT MemoryCache* memoryCache(); |
| 298 | 298 |
| 299 // Sets the global cache, used to swap in a test instance. Returns the old | 299 // Sets the global cache, used to swap in a test instance. Returns the old |
| 300 // MemoryCache object. | 300 // MemoryCache object. |
| 301 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 301 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
| 302 | 302 |
| 303 } // namespace blink | 303 } // namespace blink |
| 304 | 304 |
| 305 #endif | 305 #endif |
| OLD | NEW |