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

Unified Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp

Issue 2712833002: DevTools: Show decoded body length for network requests on timeline. (Closed)
Patch Set: rebaseline Created 3 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
Index: third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index dc641a6aded042f8c6ee8d9a1520c12dbaad2d49..bfd00d84b91bccdff7b9236db8d2f7ae6299e5ef 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -491,10 +491,12 @@ void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier,
void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier,
double finishTime,
- int64_t encodedDataLength) {
- TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
- InspectorResourceFinishEvent::data(identifier, finishTime, false,
- encodedDataLength));
+ int64_t encodedDataLength,
+ int64_t decodedBodyLength) {
+ TRACE_EVENT1(
+ "devtools.timeline", "ResourceFinish", "data",
+ InspectorResourceFinishEvent::data(identifier, finishTime, false,
+ encodedDataLength, decodedBodyLength));
frame()->loader().progress().completeProgress(identifier);
InspectorInstrumentation::didFinishLoading(frame(), identifier, finishTime,
encodedDataLength);
@@ -508,7 +510,7 @@ void FrameFetchContext::dispatchDidFail(unsigned long identifier,
bool isInternalRequest) {
TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
InspectorResourceFinishEvent::data(identifier, 0, true,
- encodedDataLength));
+ encodedDataLength, 0));
frame()->loader().progress().completeProgress(identifier);
InspectorInstrumentation::didFailLoading(frame(), identifier, error);
// Notification to FrameConsole should come AFTER InspectorInstrumentation
@@ -542,7 +544,8 @@ void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(
if (resource->encodedSize() > 0)
dispatchDidReceiveData(identifier, 0, resource->encodedSize());
- dispatchDidFinishLoading(identifier, 0, 0);
+ dispatchDidFinishLoading(identifier, 0, 0,
+ resource->response().decodedBodyLength());
}
bool FrameFetchContext::shouldLoadNewResource(Resource::Type type) const {
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.h ('k') | third_party/WebKit/Source/core/loader/PingLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698