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

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

Issue 2326743003: Do not call MemoryCache::prune() when a client/observer is removed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove justReleasedResource Created 4 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 | third_party/WebKit/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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/MemoryCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698