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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp

Issue 2712833002: DevTools: Show decoded body length for network requests on timeline. (Closed)
Patch Set: 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/platform/loader/fetch/ResourceLoader.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
index ccced5d9ad235180405b77ea63d89947ddc2845f..ef271ff7e6017754cd17f6056682837a66bab7bd 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
@@ -424,7 +424,8 @@ void ResourceLoader::didFinishLoadingFirstPartInMultipart() {
TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
InspectorResourceFinishEvent::data(
m_resource->identifier(), 0, false,
- m_resource->response().encodedDataLength()));
+ m_resource->response().encodedDataLength(),
+ m_resource->response().decodedBodyLength()));
network_instrumentation::endResourceLoad(
m_resource->identifier(),
network_instrumentation::RequestOutcome::Success);
@@ -436,12 +437,15 @@ void ResourceLoader::didFinishLoadingFirstPartInMultipart() {
void ResourceLoader::didFinishLoading(double finishTime,
int64_t encodedDataLength,
int64_t encodedBodyLength) {
- TRACE_EVENT1(
- "devtools.timeline", "ResourceFinish", "data",
- InspectorResourceFinishEvent::data(m_resource->identifier(), finishTime,
- false, encodedDataLength));
m_resource->setEncodedDataLength(encodedDataLength);
m_resource->addToEncodedBodyLength(encodedBodyLength);
+
+ TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
+ InspectorResourceFinishEvent::data(
+ m_resource->identifier(), finishTime, false,
+ m_resource->response().encodedDataLength(),
+ m_resource->response().decodedBodyLength()));
+
m_loader.reset();
network_instrumentation::endResourceLoad(
@@ -472,7 +476,8 @@ void ResourceLoader::handleError(const ResourceError& error) {
TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
InspectorResourceFinishEvent::data(
m_resource->identifier(), 0, true,
- m_resource->response().encodedDataLength()));
+ m_resource->response().encodedDataLength(),
+ m_resource->response().decodedBodyLength()));
m_loader.reset();
network_instrumentation::endResourceLoad(

Powered by Google App Engine
This is Rietveld 408576698