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

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

Issue 7563005: Merge 91858 - Web Inspector: Disable cache option should only clear memory cache, not disable it. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 5 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/WebCore/inspector/InspectorClient.h ('k') | Source/WebKit/chromium/src/InspectorClientImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/InspectorResourceAgent.cpp
===================================================================
--- Source/WebCore/inspector/InspectorResourceAgent.cpp (revision 92267)
+++ Source/WebCore/inspector/InspectorResourceAgent.cpp (working copy)
@@ -51,6 +51,7 @@
#include "InspectorValues.h"
#include "InstrumentingAgents.h"
#include "KURL.h"
+#include "MemoryCache.h"
#include "NetworkResourcesData.h"
#include "Page.h"
#include "ProgressTracker.h"
@@ -442,15 +443,12 @@
return;
m_state->setBoolean(ResourceAgentState::resourceAgentEnabled, true);
m_instrumentingAgents->setInspectorResourceAgent(this);
-
- m_client->setCacheDisabled(m_state->getBoolean(ResourceAgentState::cacheDisabled));
}
void InspectorResourceAgent::disable(ErrorString*)
{
m_state->setBoolean(ResourceAgentState::resourceAgentEnabled, false);
m_instrumentingAgents->setInspectorResourceAgent(0);
- m_client->setCacheDisabled(false);
}
void InspectorResourceAgent::setUserAgentOverride(ErrorString*, const String& userAgent)
@@ -511,12 +509,14 @@
void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled)
{
- m_client->setCacheDisabled(cacheDisabled);
m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled);
}
void InspectorResourceAgent::mainFrameNavigated(DocumentLoader* loader)
{
+ if (m_state->getBoolean(ResourceAgentState::cacheDisabled))
+ memoryCache()->evictResources();
+
m_resourcesData->clear(m_pageAgent->loaderId(loader));
}
« no previous file with comments | « Source/WebCore/inspector/InspectorClient.h ('k') | Source/WebKit/chromium/src/InspectorClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698