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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 2519843002: Update ResourceResponse::encodedDataLength when response is completed (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: content/child/web_url_loader_impl.cc
diff --git a/content/child/web_url_loader_impl.cc b/content/child/web_url_loader_impl.cc
index 9d7e50acc8552af0fadbfd032b7735e6fc9ab906..fc1f44aefafc48f28288080f8fa36cd61a6d4220 100644
--- a/content/child/web_url_loader_impl.cc
+++ b/content/child/web_url_loader_impl.cc
@@ -855,10 +855,10 @@ void WebURLLoaderImpl::Context::OnCompletedRequest(
this, TRACE_EVENT_FLAG_FLOW_IN);
if (error_code != net::OK) {
- client_->didFail(
- loader_,
- CreateWebURLError(request_.url(), stale_copy_in_cache, error_code,
- was_ignored_by_handler));
+ client_->didFail(loader_,
+ CreateWebURLError(request_.url(), stale_copy_in_cache,
+ error_code, was_ignored_by_handler),
+ total_transfer_size);
} else {
client_->didFinishLoading(loader_,
(completion_time - TimeTicks()).InSecondsF(),
@@ -887,8 +887,9 @@ void WebURLLoaderImpl::Context::CancelBodyStreaming() {
}
if (client_) {
// TODO(yhirano): Set |stale_copy_in_cache| appropriately if possible.
- client_->didFail(
- loader_, CreateWebURLError(request_.url(), false, net::ERR_ABORTED));
+ client_->didFail(loader_,
+ CreateWebURLError(request_.url(), false, net::ERR_ABORTED),
+ WebURLLoaderClient::kUnknownEncodedDataLength);
}
// Notify the browser process that the request is canceled.
« no previous file with comments | « no previous file | content/child/web_url_loader_impl_unittest.cc » ('j') | third_party/WebKit/Source/core/fetch/Resource.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698