Chromium Code Reviews| Index: Source/core/fetch/MemoryCache.h |
| diff --git a/Source/core/fetch/MemoryCache.h b/Source/core/fetch/MemoryCache.h |
| index 16ff2a12a37fa3d6bcca84ff7dc70aa24ebe7d9c..4c43802cdf98ad8ee2544b0fe8c46ee8fe7bd790 100644 |
| --- a/Source/core/fetch/MemoryCache.h |
| +++ b/Source/core/fetch/MemoryCache.h |
| @@ -169,7 +169,8 @@ public: |
| TypeStatistic other; |
| }; |
| - Resource* resourceForURL(const KURL&); |
| + Resource* resourceForURL(const String& cacheIdentifier, const KURL&); |
|
Mike West
2014/10/24 12:43:00
If you make |cacheIdentifier| the second argument,
nhiroki
2014/10/27 14:30:13
Done.
|
| + WillBeHeapVector<Member<Resource>> resourcesForURL(const KURL&); |
| void add(Resource*); |
| void replace(Resource* newResource, Resource* oldResource); |
| @@ -178,6 +179,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 +255,8 @@ private: |
| bool evict(MemoryCacheEntry*); |
| + MemoryCacheEntry* getEntryForResource(const Resource*) const; |
| + |
| static void removeURLFromCacheInternal(ExecutionContext*, const KURL&); |
| bool m_inPruneResources; |
| @@ -281,7 +286,9 @@ 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; |
| + typedef WillBeHeapHashMap<String, OwnPtrWillBeMember<ResourceMap>> ResourceMapIndex; |
|
Mike West
2014/10/24 12:43:00
Nit: These should be converted to the new `using`
nhiroki
2014/10/27 14:30:13
Done.
|
| + ResourceMap* getResourceMap(const String& cacheIdentifier); |
| + ResourceMapIndex m_resources; |
|
Mike West
2014/10/24 12:43:00
Nit: Perhaps `m_resourceMaps`, now?
nhiroki
2014/10/27 14:30:13
Done.
|
| #if ENABLE(OILPAN) |
| // Unlike m_allResources, m_liveResources is a set of Resource objects which |