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

Unified Diff: Source/core/inspector/InspectorResourceAgent.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: tweak variable names 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
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorResourceAgent.cpp
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
index f215026c2ef9511a17d0289edbb220be73eecb9e..d54273b5259436bc850cc8c05324b4f8041b7abb 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -739,9 +739,7 @@ void InspectorResourceAgent::replayXHR(ErrorString*, const String& requestId)
RefPtrWillBeRawPtr<XMLHttpRequest> xhr = XMLHttpRequest::create(executionContext);
- Resource* cachedResource = memoryCache()->resourceForURL(xhrReplayData->url());
- if (cachedResource)
- memoryCache()->remove(cachedResource);
+ memoryCache()->removeURLFromCache(executionContext, xhrReplayData->url());
xhr->open(xhrReplayData->method(), xhrReplayData->url(), xhrReplayData->async(), IGNORE_EXCEPTION);
HTTPHeaderMap::const_iterator end = xhrReplayData->headers().end();
@@ -857,7 +855,7 @@ bool InspectorResourceAgent::fetchResourceContent(Document* document, const KURL
// First try to fetch content from the cached resource.
Resource* cachedResource = document->fetcher()->cachedResource(url);
if (!cachedResource)
- cachedResource = memoryCache()->resourceForURL(url);
+ cachedResource = memoryCache()->resourceForURL(url, document->fetcher()->getCacheIdentifier());
if (cachedResource && InspectorPageAgent::cachedResourceContent(cachedResource, content, base64Encoded))
return true;
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698