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

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: PS5 again 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 1c9fd3a59b1b6274383c87e2b2060006e5405300..f939efddcdecbe300f5956befd877cc5546a7c38 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -1186,7 +1186,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);
@@ -1260,8 +1262,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,
@@ -1275,8 +1278,7 @@ void ResourceFetcher::acceptDataFromThreadedReceiver(unsigned long identifier,
const char* data,
int dataLength,
int encodedDataLength) {
- context().dispatchDidReceiveData(identifier, data, dataLength,
- encodedDataLength);
+ context().dispatchDidReceiveData(identifier, data, dataLength);
dgozman 2016/11/30 18:02:17 dispatchDidReceiveEncodedData here as well?
yhirano 2016/12/01 10:33:10 This is not used and will be removed shortly.
}
void ResourceFetcher::moveResourceLoaderToNonBlocking(ResourceLoader* loader) {

Powered by Google App Engine
This is Rietveld 408576698