Chromium Code Reviews| 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 049c2e27133a05c7fed4fc1962116c16e9474ea6..7b4ed4ea9b1926f1463cafccf741db6042863792 100644 |
| --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
| +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp |
| @@ -413,14 +413,21 @@ void FrameFetchContext::dispatchDidReceiveResponse( |
| void FrameFetchContext::dispatchDidReceiveData(unsigned long identifier, |
| const char* data, |
| - int dataLength, |
| - int encodedDataLength) { |
| + int dataLength) { |
| + TRACE_EVENT1("devtools.timeline", "ResourceReceivedData", "data", |
|
dgozman
2016/12/06 18:29:31
Let's not report this one - it doesn't bring any i
yhirano
2016/12/07 12:00:16
Done.
|
| + InspectorReceiveDataEvent::data(identifier, frame(), 0)); |
| + frame()->loader().progress().incrementProgress(identifier, dataLength); |
| + InspectorInstrumentation::didReceiveData(frame(), identifier, data, |
| + dataLength); |
| +} |
| + |
| +void FrameFetchContext::dispatchDidReceiveEncodedData(unsigned long identifier, |
| + int encodedDataLength) { |
| TRACE_EVENT1( |
| "devtools.timeline", "ResourceReceivedData", "data", |
| InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength)); |
| - frame()->loader().progress().incrementProgress(identifier, dataLength); |
| - InspectorInstrumentation::didReceiveData(frame(), identifier, data, |
| - dataLength, encodedDataLength); |
| + InspectorInstrumentation::didReceiveEncodedDataLength(frame(), identifier, |
| + encodedDataLength); |
| } |
| void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier, |
| @@ -430,8 +437,9 @@ void FrameFetchContext::dispatchDidDownloadData(unsigned long identifier, |
| "devtools.timeline", "ResourceReceivedData", "data", |
| InspectorReceiveDataEvent::data(identifier, frame(), encodedDataLength)); |
| frame()->loader().progress().incrementProgress(identifier, dataLength); |
| - InspectorInstrumentation::didReceiveData(frame(), identifier, 0, dataLength, |
| - encodedDataLength); |
| + InspectorInstrumentation::didReceiveData(frame(), identifier, 0, dataLength); |
| + InspectorInstrumentation::didReceiveEncodedDataLength(frame(), identifier, |
| + encodedDataLength); |
| } |
| void FrameFetchContext::dispatchDidFinishLoading(unsigned long identifier, |
| @@ -449,6 +457,7 @@ 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)); |
| @@ -483,7 +492,7 @@ void FrameFetchContext::dispatchDidLoadResourceFromMemoryCache( |
| } |
| if (resource->encodedSize() > 0) |
| - dispatchDidReceiveData(identifier, 0, resource->encodedSize(), 0); |
| + dispatchDidReceiveData(identifier, 0, resource->encodedSize()); |
| dispatchDidFinishLoading(identifier, 0, 0); |
| } |