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

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

Issue 2519893002: Stop dispatching encoded-data-length on each data chunk arrival (Closed)
Patch Set: fix 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/loader/FrameFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index 674c7b563a7d2e1bad1a90bd4378bcf1bae9137b..32eb08afea9a4ec3c3e6c3fb2159865210508fcc 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -413,25 +413,21 @@ void FrameFetchContext::dispatchDidReceiveResponse(
void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier,
const char* data,
- int dataLength,
- int encodedDataLength) {
- TRACE_EVENT1(
- "devtools.timeline", "ResourceReceivedData", "data",
- InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength));
+ int dataLength) {
+ TRACE_EVENT1("devtools.timeline", "ResourceReceivedData", "data",
+ InspectorReceiveDataEvent::data(identifier, frame()));
frame()->loader().progress().incrementProgress(identifier, dataLength);
InspectorInstrumentation::didReceiveData(frame(), identifier, data,
- dataLength, encodedDataLength);
+ dataLength);
}
void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier,
int dataLength,
int encodedDataLength) {
- TRACE_EVENT1(
- "devtools.timeline", "ResourceReceivedData", "data",
- InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength));
+ TRACE_EVENT1("devtools.timeline", "ResourceReceivedData", "data",
+ InspectorReceiveDataEvent::data(identifier, frame()));
frame()->loader().progress().incrementProgress(identifier, dataLength);
- InspectorInstrumentation::didReceiveData(frame(), identifier, 0, dataLength,
- encodedDataLength);
+ InspectorInstrumentation::didReceiveData(frame(), identifier, 0, dataLength);
}
void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier,
@@ -449,11 +445,13 @@ void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier,
void FrameFetchContext::dispatchDidFail(unsigned long identifier,
const ResourceError& error,
+ int64_t encodedDataLength,
bool isInternalRequest) {
TRACE_EVENT1("devtools.timeline", "ResourceFinish", "data",
InspectorResourceFinishEvent::data(identifier, 0, true));
frame()->loader().progress().completeProgress(identifier);
- InspectorInstrumentation::didFailLoading(frame(), identifier, error);
+ InspectorInstrumentation::didFailLoading(frame(), identifier, error,
+ encodedDataLength);
// Notification to FrameConsole should come AFTER InspectorInstrumentation
// call, DevTools front-end relies on this.
if (!isInternalRequest)
@@ -481,7 +479,7 @@ void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache(
}
if (resource->encodedSize() > 0)
- dispatchDidReceiveData(identifier, 0, resource->encodedSize(), 0);
+ dispatchDidReceiveData(identifier, 0, resource->encodedSize());
dispatchDidFinishLoading(identifier, 0, 0);
}

Powered by Google App Engine
This is Rietveld 408576698