| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 // from MemoryCacheLRUList. | 76 // from MemoryCacheLRUList. |
| 77 class MemoryCacheEntry final : public GarbageCollectedFinalized<MemoryCacheEntry
> { | 77 class MemoryCacheEntry final : public GarbageCollectedFinalized<MemoryCacheEntry
> { |
| 78 public: | 78 public: |
| 79 static MemoryCacheEntry* create(Resource* resource) | 79 static MemoryCacheEntry* create(Resource* resource) |
| 80 { | 80 { |
| 81 return new MemoryCacheEntry(resource); | 81 return new MemoryCacheEntry(resource); |
| 82 } | 82 } |
| 83 DECLARE_TRACE(); | 83 DECLARE_TRACE(); |
| 84 void dispose(); | 84 void dispose(); |
| 85 | 85 |
| 86 RefPtrWillBeMember<Resource> m_resource; | 86 Member<Resource> m_resource; |
| 87 bool m_inLiveDecodedResourcesList; | 87 bool m_inLiveDecodedResourcesList; |
| 88 unsigned m_accessCount; | 88 unsigned m_accessCount; |
| 89 MemoryCacheLiveResourcePriority m_liveResourcePriority; | 89 MemoryCacheLiveResourcePriority m_liveResourcePriority; |
| 90 double m_lastDecodedAccessTime; // Used as a thrash guard | 90 double m_lastDecodedAccessTime; // Used as a thrash guard |
| 91 | 91 |
| 92 Member<MemoryCacheEntry> m_previousInLiveResourcesList; | 92 Member<MemoryCacheEntry> m_previousInLiveResourcesList; |
| 93 Member<MemoryCacheEntry> m_nextInLiveResourcesList; | 93 Member<MemoryCacheEntry> m_nextInLiveResourcesList; |
| 94 Member<MemoryCacheEntry> m_previousInAllResourcesList; | 94 Member<MemoryCacheEntry> m_previousInAllResourcesList; |
| 95 Member<MemoryCacheEntry> m_nextInAllResourcesList; | 95 Member<MemoryCacheEntry> m_nextInAllResourcesList; |
| 96 | 96 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 TypeStatistic images; | 168 TypeStatistic images; |
| 169 TypeStatistic cssStyleSheets; | 169 TypeStatistic cssStyleSheets; |
| 170 TypeStatistic scripts; | 170 TypeStatistic scripts; |
| 171 TypeStatistic xslStyleSheets; | 171 TypeStatistic xslStyleSheets; |
| 172 TypeStatistic fonts; | 172 TypeStatistic fonts; |
| 173 TypeStatistic other; | 173 TypeStatistic other; |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 Resource* resourceForURL(const KURL&); | 176 Resource* resourceForURL(const KURL&); |
| 177 Resource* resourceForURL(const KURL&, const String& cacheIdentifier); | 177 Resource* resourceForURL(const KURL&, const String& cacheIdentifier); |
| 178 WillBeHeapVector<RawPtrWillBeMember<Resource>> resourcesForURL(const KURL&); | 178 HeapVector<Member<Resource>> resourcesForURL(const KURL&); |
| 179 | 179 |
| 180 void add(Resource*); | 180 void add(Resource*); |
| 181 void remove(Resource*); | 181 void remove(Resource*); |
| 182 bool contains(const Resource*) const; | 182 bool contains(const Resource*) const; |
| 183 | 183 |
| 184 static KURL removeFragmentIdentifierIfNeeded(const KURL& originalURL); | 184 static KURL removeFragmentIdentifierIfNeeded(const KURL& originalURL); |
| 185 | 185 |
| 186 static String defaultCacheIdentifier(); | 186 static String defaultCacheIdentifier(); |
| 187 | 187 |
| 188 // Sets the cache's memory capacities, in bytes. These will hold only approx
imately, | 188 // Sets the cache's memory capacities, in bytes. These will hold only approx
imately, |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // Returns the global cache. | 319 // Returns the global cache. |
| 320 CORE_EXPORT MemoryCache* memoryCache(); | 320 CORE_EXPORT MemoryCache* memoryCache(); |
| 321 | 321 |
| 322 // Sets the global cache, used to swap in a test instance. Returns the old | 322 // Sets the global cache, used to swap in a test instance. Returns the old |
| 323 // MemoryCache object. | 323 // MemoryCache object. |
| 324 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); | 324 CORE_EXPORT MemoryCache* replaceMemoryCacheForTesting(MemoryCache*); |
| 325 | 325 |
| 326 } // namespace blink | 326 } // namespace blink |
| 327 | 327 |
| 328 #endif | 328 #endif |
| OLD | NEW |