| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 TypeStatistic xslStyleSheets; | 130 TypeStatistic xslStyleSheets; |
| 131 TypeStatistic fonts; | 131 TypeStatistic fonts; |
| 132 TypeStatistic other; | 132 TypeStatistic other; |
| 133 }; | 133 }; |
| 134 | 134 |
| 135 Resource* resourceForURL(const KURL&); | 135 Resource* resourceForURL(const KURL&); |
| 136 | 136 |
| 137 void add(Resource*); | 137 void add(Resource*); |
| 138 void replace(Resource* newResource, Resource* oldResource); | 138 void replace(Resource* newResource, Resource* oldResource); |
| 139 void remove(Resource* resource) { evict(resource); } | 139 void remove(Resource* resource) { evict(resource); } |
| 140 bool contains(Resource*); | 140 bool contains(const Resource*) const; |
| 141 | 141 |
| 142 static KURL removeFragmentIdentifierIfNeeded(const KURL& originalURL); | 142 static KURL removeFragmentIdentifierIfNeeded(const KURL& originalURL); |
| 143 | 143 |
| 144 // Sets the cache's memory capacities, in bytes. These will hold only approx
imately, | 144 // Sets the cache's memory capacities, in bytes. These will hold only approx
imately, |
| 145 // since the decoded cost of resources like scripts and stylesheets is not k
nown. | 145 // since the decoded cost of resources like scripts and stylesheets is not k
nown. |
| 146 // - minDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is under pressure. | 146 // - minDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is under pressure. |
| 147 // - maxDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is not under pressure. | 147 // - maxDeadBytes: The maximum number of bytes that dead resources should c
onsume when the cache is not under pressure. |
| 148 // - totalBytes: The maximum number of bytes that the cache should consume
overall. | 148 // - totalBytes: The maximum number of bytes that the cache should consume
overall. |
| 149 void setCapacities(size_t minDeadBytes, size_t maxDeadBytes, size_t totalByt
es); | 149 void setCapacities(size_t minDeadBytes, size_t maxDeadBytes, size_t totalByt
es); |
| 150 void setDelayBeforeLiveDecodedPrune(double seconds) { m_delayBeforeLiveDecod
edPrune = seconds; } | 150 void setDelayBeforeLiveDecodedPrune(double seconds) { m_delayBeforeLiveDecod
edPrune = seconds; } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 // Returns the global cache. | 243 // Returns the global cache. |
| 244 MemoryCache* memoryCache(); | 244 MemoryCache* memoryCache(); |
| 245 | 245 |
| 246 // Sets the global cache, used to swap in a test instance. | 246 // Sets the global cache, used to swap in a test instance. |
| 247 void setMemoryCacheForTesting(MemoryCache*); | 247 void setMemoryCacheForTesting(MemoryCache*); |
| 248 | 248 |
| 249 } | 249 } |
| 250 | 250 |
| 251 #endif | 251 #endif |
| OLD | NEW |