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

Unified Diff: Source/core/testing/Internals.cpp

Issue 640463003: MemoryCache: Enable MemoryCache to have multiple isolated resource maps (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remake 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index b98434a4f89d5d3944e552b9fe5c4b9236ed41e7..c383ff4a2c5a1d810d068f201e394ff0bde2cb4d 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -354,7 +354,10 @@ bool Internals::isLoadingFromMemoryCache(const String& url)
{
if (!contextDocument())
return false;
- Resource* resource = memoryCache()->resourceForURL(contextDocument()->completeURL(url));
+ // FIXME: There is no way to get the right cache key here. This function is
+ // only used for testing, so the default identifier should be ok for now.
Mike West 2014/10/24 12:43:00 Doesn't this mean you're not going to get the corr
nhiroki 2014/10/27 14:30:13 I found the way to get the key here, so removed th
+ const String cacheIdentifier = MemoryCache::defaultCacheIdentifier();
+ Resource* resource = memoryCache()->resourceForURL(cacheIdentifier, contextDocument()->completeURL(url));
return resource && resource->status() == Resource::Cached;
}
« Source/core/fetch/ResourceFetcher.cpp ('K') | « Source/core/loader/ImageLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698