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

Unified Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 174523002: Reland "Move MemoryCache implementation details out of Resource" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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
« Source/core/fetch/Resource.cpp ('K') | « Source/core/frame/ImageBitmapTest.cpp ('k') | no next file » | 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 ea683bc22044a4f969904d3896843d56baa9088b..1fe309cf2734bc5d23d7bb02ae81cb8a8c99f272 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -716,6 +716,8 @@ void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled)
m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled);
if (cacheDisabled)
memoryCache()->evictResources();
+ for (Frame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tree().traverseNext())
+ frame->document()->fetcher()->garbageCollectDocumentResources();
}
void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, const String& frameId, const String& url, const RefPtr<JSONObject>* requestHeaders, PassRefPtr<LoadResourceForFrontendCallback> prpCallback)
« Source/core/fetch/Resource.cpp ('K') | « Source/core/frame/ImageBitmapTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698