| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // |-----| Dead: - | 52 // |-----| Dead: - |
| 53 // |----------| Live: + | 53 // |----------| Live: + |
| 54 // --|----------| Cache boundary: | (objects outsid
e this mark have been evicted) | 54 // --|----------| Cache boundary: | (objects outsid
e this mark have been evicted) |
| 55 // --|----------++++++++++| | 55 // --|----------++++++++++| |
| 56 // -------|-----+++++++++++++++| | 56 // -------|-----+++++++++++++++| |
| 57 // -------|-----+++++++++++++++|+++++ | 57 // -------|-----+++++++++++++++|+++++ |
| 58 | 58 |
| 59 // Enable this macro to periodically log information about the memory cache. | 59 // Enable this macro to periodically log information about the memory cache. |
| 60 #undef MEMORY_CACHE_STATS | 60 #undef MEMORY_CACHE_STATS |
| 61 | 61 |
| 62 class MemoryCache : public blink::WebThread::TaskObserver { | 62 class MemoryCache FINAL : public blink::WebThread::TaskObserver { |
| 63 WTF_MAKE_NONCOPYABLE(MemoryCache); WTF_MAKE_FAST_ALLOCATED; | 63 WTF_MAKE_NONCOPYABLE(MemoryCache); WTF_MAKE_FAST_ALLOCATED; |
| 64 public: | 64 public: |
| 65 MemoryCache(); | 65 MemoryCache(); |
| 66 virtual ~MemoryCache(); | 66 virtual ~MemoryCache(); |
| 67 | 67 |
| 68 typedef HashMap<String, Resource*> ResourceMap; | 68 typedef HashMap<String, Resource*> ResourceMap; |
| 69 | 69 |
| 70 struct LRUList { | 70 struct LRUList { |
| 71 Resource* m_head; | 71 Resource* m_head; |
| 72 Resource* m_tail; | 72 Resource* m_tail; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 | 213 |
| 214 // Returns the global cache. | 214 // Returns the global cache. |
| 215 MemoryCache* memoryCache(); | 215 MemoryCache* memoryCache(); |
| 216 | 216 |
| 217 // Sets the global cache, used to swap in a test instance. | 217 // Sets the global cache, used to swap in a test instance. |
| 218 void setMemoryCacheForTesting(MemoryCache*); | 218 void setMemoryCacheForTesting(MemoryCache*); |
| 219 | 219 |
| 220 } | 220 } |
| 221 | 221 |
| 222 #endif | 222 #endif |
| OLD | NEW |