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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2519893002: Stop dispatching encoded-data-length on each data chunk arrival (Closed)
Patch Set: fix Created 4 years 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/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index cb7b2cccaaab98ed31825e0f51f7e26352b45a12..f01175213fe370d73cca859988c5a5922a5aa33b 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -1187,7 +1187,9 @@ void ResourceFetcher::didFailLoading(Resource* resource,
m_resourceTimingInfoMap.take(const_cast<Resource*>(resource));
bool isInternalRequest = resource->options().initiatorInfo.name ==
FetchInitiatorTypeNames::internal;
- context().dispatchDidFail(resource->identifier(), error, isInternalRequest);
+ context().dispatchDidFail(resource->identifier(), error,
+ resource->response().encodedDataLength(),
+ isInternalRequest);
resource->error(error);
context().didLoadResource(resource);
@@ -1261,8 +1263,9 @@ void ResourceFetcher::didReceiveData(const Resource* resource,
const char* data,
int dataLength,
int encodedDataLength) {
- context().dispatchDidReceiveData(resource->identifier(), data, dataLength,
- encodedDataLength);
+ context().dispatchDidReceiveData(resource->identifier(), data, dataLength);
+ context().dispatchDidReceiveEncodedData(resource->identifier(),
+ encodedDataLength);
}
void ResourceFetcher::didDownloadData(const Resource* resource,

Powered by Google App Engine
This is Rietveld 408576698