| Index: Source/core/fetch/ResourceLoader.cpp
|
| diff --git a/Source/core/fetch/ResourceLoader.cpp b/Source/core/fetch/ResourceLoader.cpp
|
| index 2096e9044a06e99b20687e914c4522c138f36c69..f371aba8b00fd32aaee3571f4a821e3316104e1c 100644
|
| --- a/Source/core/fetch/ResourceLoader.cpp
|
| +++ b/Source/core/fetch/ResourceLoader.cpp
|
| @@ -188,7 +188,7 @@ void ResourceLoader::didDownloadData(blink::WebURLLoader*, int length, int encod
|
| m_resource->didDownloadData(length);
|
| }
|
|
|
| -void ResourceLoader::didFinishLoadingOnePart(double finishTime)
|
| +void ResourceLoader::didFinishLoadingOnePart(double finishTime, int64 encodedDataLength)
|
| {
|
| // If load has been cancelled after finishing (which could happen with a
|
| // JavaScript that changes the window location), do nothing.
|
| @@ -198,7 +198,7 @@ void ResourceLoader::didFinishLoadingOnePart(double finishTime)
|
| if (m_notifiedLoadComplete)
|
| return;
|
| m_notifiedLoadComplete = true;
|
| - m_host->didFinishLoading(m_resource, finishTime);
|
| + m_host->didFinishLoading(m_resource, finishTime, encodedDataLength);
|
| }
|
|
|
| void ResourceLoader::didChangePriority(ResourceLoadPriority loadPriority)
|
| @@ -352,7 +352,7 @@ void ResourceLoader::didReceiveResponse(blink::WebURLLoader*, const blink::WebUR
|
| // Since a subresource loader does not load multipart sections progressively, data was delivered to the loader all at once.
|
| // After the first multipart section is complete, signal to delegates that this load is "finished"
|
| m_host->subresourceLoaderFinishedLoadingOnePart(this);
|
| - didFinishLoadingOnePart(0);
|
| + didFinishLoadingOnePart(0, blink::WebURLLoaderClient::kUnknownEncodedDataLength);
|
| }
|
|
|
| if (m_resource->response().httpStatusCode() < 400 || m_resource->shouldIgnoreHTTPStatusCodeErrors())
|
| @@ -390,7 +390,7 @@ void ResourceLoader::didReceiveData(blink::WebURLLoader*, const char* data, int
|
| m_resource->appendData(data, length);
|
| }
|
|
|
| -void ResourceLoader::didFinishLoading(blink::WebURLLoader*, double finishTime)
|
| +void ResourceLoader::didFinishLoading(blink::WebURLLoader*, double finishTime, int64 encodedDataLength)
|
| {
|
| RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse || m_connectionState == ConnectionStateReceivingData);
|
| m_connectionState = ConnectionStateFinishedLoading;
|
| @@ -402,7 +402,7 @@ void ResourceLoader::didFinishLoading(blink::WebURLLoader*, double finishTime)
|
| RefPtr<ResourceLoader> protect(this);
|
| ResourcePtr<Resource> protectResource(m_resource);
|
| m_state = Finishing;
|
| - didFinishLoadingOnePart(finishTime);
|
| + didFinishLoadingOnePart(finishTime, encodedDataLength);
|
| m_resource->finish(finishTime);
|
|
|
| // If the load has been cancelled by a delegate in response to didFinishLoad(), do not release
|
| @@ -469,9 +469,10 @@ void ResourceLoader::requestSynchronously()
|
| if (m_state == Terminated)
|
| return;
|
| RefPtr<ResourceLoadInfo> resourceLoadInfo = responseOut.toResourceResponse().resourceLoadInfo();
|
| - m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), resourceLoadInfo ? resourceLoadInfo->encodedDataLength : -1);
|
| + int64 encodedDataLength = resourceLoadInfo ? resourceLoadInfo->encodedDataLength : blink::WebURLLoaderClient::kUnknownEncodedDataLength;
|
| + m_host->didReceiveData(m_resource, dataOut.data(), dataOut.size(), encodedDataLength);
|
| m_resource->setResourceBuffer(dataOut);
|
| - didFinishLoading(0, monotonicallyIncreasingTime());
|
| + didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
|
| }
|
|
|
| }
|
|
|