Index: Source/core/fetch/MemoryCache.h |
diff --git a/Source/core/fetch/MemoryCache.h b/Source/core/fetch/MemoryCache.h |
index 16ff2a12a37fa3d6bcca84ff7dc70aa24ebe7d9c..70825547d3b88a3e78133df5d42f46864546c458 100644 |
--- a/Source/core/fetch/MemoryCache.h |
+++ b/Source/core/fetch/MemoryCache.h |
@@ -170,6 +170,8 @@ public: |
}; |
Resource* resourceForURL(const KURL&); |
+ Resource* resourceForURL(const KURL&, const String& cacheIdentifier); |
+ WillBeHeapVector<Member<Resource>> resourcesForURL(const KURL&); |
void add(Resource*); |
void replace(Resource* newResource, Resource* oldResource); |
@@ -178,6 +180,8 @@ public: |
static KURL removeFragmentIdentifierIfNeeded(const KURL& originalURL); |
+ static String defaultCacheIdentifier(); |
+ |
// Sets the cache's memory capacities, in bytes. These will hold only approximately, |
// since the decoded cost of resources like scripts and stylesheets is not known. |
// - minDeadBytes: The maximum number of bytes that dead resources should consume when the cache is under pressure. |
@@ -252,6 +256,8 @@ private: |
bool evict(MemoryCacheEntry*); |
+ MemoryCacheEntry* getEntryForResource(const Resource*) const; |
+ |
static void removeURLFromCacheInternal(ExecutionContext*, const KURL&); |
bool m_inPruneResources; |
@@ -280,8 +286,10 @@ private: |
// A URL-based map of all resources that are in the cache (including the freshest version of objects that are currently being |
// referenced by a Web page). |
- typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<MemoryCacheEntry>> ResourceMap; |
- ResourceMap m_resources; |
+ using ResourceMap = WillBeHeapHashMap<String, OwnPtrWillBeMember<MemoryCacheEntry>>; |
+ using ResourceMapIndex = WillBeHeapHashMap<String, OwnPtrWillBeMember<ResourceMap>>; |
+ ResourceMap* ensureResourceMap(const String& cacheIdentifier); |
+ ResourceMapIndex m_resourceMaps; |
#if ENABLE(OILPAN) |
// Unlike m_allResources, m_liveResources is a set of Resource objects which |