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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp

Issue 2611183007: PlzNavigate: Fix for the http/tests/inspector/resource-har-conversion.html layout test failure. (Closed)
Patch Set: Fix line endings Created 3 years, 11 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: third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
index d0a5abc9d1a71af13d059d74f18a060abc84bdd0..4fd0a6e6e1cd8576e11bd923bb1708148f38ad0d 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -1425,6 +1425,9 @@ Response InspectorNetworkAgent::emulateNetworkConditions(
}
Response InspectorNetworkAgent::setCacheDisabled(bool cacheDisabled) {
+ // TODO(ananta)
+ // We should extract network cache state into a global entity which can be
+ // queried from FrameLoader and other places.
m_state->setBoolean(NetworkAgentState::cacheDisabled, cacheDisabled);
if (cacheDisabled)
memoryCache()->evictResources();
@@ -1512,6 +1515,12 @@ bool InspectorNetworkAgent::fetchResourceContent(Document* document,
return false;
}
+bool InspectorNetworkAgent::cacheDisabled() {
+ return m_state->booleanProperty(NetworkAgentState::networkAgentEnabled,
+ false) &&
+ m_state->booleanProperty(NetworkAgentState::cacheDisabled, false);
+}
+
void InspectorNetworkAgent::removeFinishedReplayXHRFired(TimerBase*) {
m_replayXHRsToBeDeleted.clear();
}

Powered by Google App Engine
This is Rietveld 408576698