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

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

Issue 2460573002: Disable memory caching of XHRs (Closed)
Patch Set: reload-from-cache test uses <script> Created 4 years, 1 month 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 c17e69117ea17014ca9062fd36ce5a304cc3c926..887df16f5a2c6fe45f7c7842a97e634976d28c74 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -752,6 +752,16 @@ void InspectorNetworkAgent::didFinishLoading(unsigned long identifier,
double monotonicFinishTime,
int64_t encodedDataLength) {
String requestId = IdentifiersFactory::requestId(identifier);
+ NetworkResourcesData::ResourceData const* resourceData =
+ m_resourcesData->data(requestId);
+ if (resourceData &&
+ (!resourceData->cachedResource() ||
+ resourceData->cachedResource()->getDataBufferingPolicy() ==
+ DoNotBufferData ||
+ isErrorStatusCode(resourceData->httpStatusCode()))) {
+ m_resourcesData->maybeAddResourceData(requestId, "", 0);
+ }
+
m_resourcesData->maybeDecodeDataToContent(requestId);
if (!monotonicFinishTime)
monotonicFinishTime = monotonicallyIncreasingTime();

Powered by Google App Engine
This is Rietveld 408576698