Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Side by Side Diff: Source/core/fetch/MemoryCache.h

Issue 660723002: MemoryCache: Remove ENABLE(ASSERT) checks for readability (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix for review comments Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 MemoryCacheLRUList* lruListFor(unsigned accessCount, size_t); 227 MemoryCacheLRUList* lruListFor(unsigned accessCount, size_t);
228 228
229 #ifdef MEMORY_CACHE_STATS 229 #ifdef MEMORY_CACHE_STATS
230 void dumpStats(Timer<MemoryCache>*); 230 void dumpStats(Timer<MemoryCache>*);
231 void dumpLRULists(bool includeLive) const; 231 void dumpLRULists(bool includeLive) const;
232 #endif 232 #endif
233 233
234 // Calls to put the cached resource into and out of LRU lists. 234 // Calls to put the cached resource into and out of LRU lists.
235 void insertInLRUList(MemoryCacheEntry*, MemoryCacheLRUList*); 235 void insertInLRUList(MemoryCacheEntry*, MemoryCacheLRUList*);
236 void removeFromLRUList(MemoryCacheEntry*, MemoryCacheLRUList*); 236 void removeFromLRUList(MemoryCacheEntry*, MemoryCacheLRUList*);
237 bool containedInLRUList(MemoryCacheEntry*, MemoryCacheLRUList*);
237 238
238 // Track decoded resources that are in the cache and referenced by a Web pag e. 239 // Track decoded resources that are in the cache and referenced by a Web pag e.
239 void insertInLiveDecodedResourcesList(MemoryCacheEntry*); 240 void insertInLiveDecodedResourcesList(MemoryCacheEntry*);
240 void removeFromLiveDecodedResourcesList(MemoryCacheEntry*); 241 void removeFromLiveDecodedResourcesList(MemoryCacheEntry*);
242 bool containedInLiveDecodedResourcesList(MemoryCacheEntry*);
241 243
242 size_t liveCapacity() const; 244 size_t liveCapacity() const;
243 size_t deadCapacity() const; 245 size_t deadCapacity() const;
244 246
245 // pruneDeadResources() - Flush decoded and encoded data from resources not referenced by Web pages. 247 // pruneDeadResources() - Flush decoded and encoded data from resources not referenced by Web pages.
246 // pruneLiveResources() - Flush decoded data from resources still referenced by Web pages. 248 // pruneLiveResources() - Flush decoded data from resources still referenced by Web pages.
247 void pruneDeadResources(); // Automatically decide how much to prune. 249 void pruneDeadResources(); // Automatically decide how much to prune.
248 void pruneLiveResources(); 250 void pruneLiveResources();
249 void pruneNow(double currentTime); 251 void pruneNow(double currentTime);
250 252
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // Returns the global cache. 301 // Returns the global cache.
300 MemoryCache* memoryCache(); 302 MemoryCache* memoryCache();
301 303
302 // Sets the global cache, used to swap in a test instance. Returns the old 304 // Sets the global cache, used to swap in a test instance. Returns the old
303 // MemoryCache object. 305 // MemoryCache object.
304 PassOwnPtrWillBeRawPtr<MemoryCache> replaceMemoryCacheForTesting(PassOwnPtrWillB eRawPtr<MemoryCache>); 306 PassOwnPtrWillBeRawPtr<MemoryCache> replaceMemoryCacheForTesting(PassOwnPtrWillB eRawPtr<MemoryCache>);
305 307
306 } 308 }
307 309
308 #endif 310 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698