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

Unified Diff: content/child/web_url_loader_impl.cc

Issue 2519843002: Update ResourceResponse::encodedDataLength when response is completed (Closed)
Patch Set: Update ResourceResponse::encodedDataLength when response is completed 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
« no previous file with comments | « no previous file | content/child/web_url_loader_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2e47f6e43e0a4520ea8ea502dc05389541120e0c..669f69018d8bb938d74bef3b73cea09232ec1dbf 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698