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

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

Issue 267393003: DevTools: Load document (html) content from disk cache in page agent enabling. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/inspector/InspectorResourceAgent.cpp
diff --git a/Source/core/inspector/InspectorResourceAgent.cpp b/Source/core/inspector/InspectorResourceAgent.cpp
index d53640c8abffa34e8c78f0130c6e29ee9251fa6a..5d5054fd70333e85da12f9c6b70fac6ac9a02c3d 100644
--- a/Source/core/inspector/InspectorResourceAgent.cpp
+++ b/Source/core/inspector/InspectorResourceAgent.cpp
@@ -788,27 +788,6 @@ void InspectorResourceAgent::frameClearedScheduledNavigation(LocalFrame* frame)
m_frameNavigationInitiatorMap.remove(m_pageAgent->frameId(frame));
}
-bool InspectorResourceAgent::fetchResourceContent(LocalFrame* frame, const KURL& url, String* content, bool* base64Encoded)
-{
- // First try to fetch content from the cached resource.
- Resource* cachedResource = frame->document()->fetcher()->cachedResource(url);
- if (!cachedResource)
- cachedResource = memoryCache()->resourceForURL(url);
- if (cachedResource && InspectorPageAgent::cachedResourceContent(cachedResource, content, base64Encoded))
- return true;
-
- // Then fall back to resource data.
- Vector<NetworkResourcesData::ResourceData*> resources = m_resourcesData->resources();
- for (Vector<NetworkResourcesData::ResourceData*>::iterator it = resources.begin(); it != resources.end(); ++it) {
- if ((*it)->url() == url) {
- *content = (*it)->content();
- *base64Encoded = (*it)->base64Encoded();
- return true;
- }
- }
- return false;
-}
-
InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent)
: InspectorBaseAgent<InspectorResourceAgent>("Network")
, m_pageAgent(pageAgent)

Powered by Google App Engine
This is Rietveld 408576698