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

Unified Diff: Source/core/fetch/Resource.h

Issue 179943002: MemoryCache: make sure that Resources are evicted only when they can be deleted (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/MemoryCacheTest.cpp ('k') | Source/core/fetch/Resource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/Resource.h
diff --git a/Source/core/fetch/Resource.h b/Source/core/fetch/Resource.h
index 3098eebb13406c0c9497eb91fc510b2d59520165..34b89278be995f26dc516dfe0ff2fed22c70e3d0 100644
--- a/Source/core/fetch/Resource.h
+++ b/Source/core/fetch/Resource.h
@@ -197,8 +197,8 @@ public:
// Returns cached metadata of the given type associated with this resource.
CachedMetadata* cachedMetadata(unsigned dataTypeID) const;
- bool canDelete() const { return !hasClients() && !m_loader && !m_preloadCount && !m_handleCount && !m_protectorCount && !m_resourceToRevalidate && !m_proxyResource; }
- bool hasOneHandle() const { return m_handleCount == 1; }
+ bool canDelete() const;
+ bool hasOneHandleApartFromCache() const;
// List of acceptable MIME types separated by ",".
// A MIME type may contain a wildcard, e.g. "text/*".
@@ -342,6 +342,8 @@ private:
bool unlock();
+ bool hasRightHandleCountApartFromCache(unsigned targetCount) const;
+
void failBeforeStarting();
String m_fragmentIdentifierForRequest;
« no previous file with comments | « Source/core/fetch/MemoryCacheTest.cpp ('k') | Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698