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

Unified Diff: chrome/renderer/security_filter_peer.cc

Issue 2510333002: Send encoded_body_length to renderer when response completed (2/3) (Closed)
Patch Set: rebase 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 | « chrome/renderer/security_filter_peer.h ('k') | content/child/ftp_directory_listing_response_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/security_filter_peer.cc
diff --git a/chrome/renderer/security_filter_peer.cc b/chrome/renderer/security_filter_peer.cc
index bfbdfa1710677af04330940304fd4a70675e7716..318f8e54e7370c4bb44378d438911d1e43570319 100644
--- a/chrome/renderer/security_filter_peer.cc
+++ b/chrome/renderer/security_filter_peer.cc
@@ -134,25 +134,26 @@ void BufferedPeer::OnCompletedRequest(int error_code,
bool was_ignored_by_handler,
bool stale_copy_in_cache,
const base::TimeTicks& completion_time,
- int64_t total_transfer_size) {
+ int64_t total_transfer_size,
+ int64_t encoded_body_size) {
// Give sub-classes a chance at altering the data.
if (error_code != net::OK || !DataReady()) {
// Pretend we failed to load the resource.
original_peer_->OnReceivedResponse(response_info_);
original_peer_->OnCompletedRequest(net::ERR_ABORTED, false,
stale_copy_in_cache, completion_time,
- total_transfer_size);
+ total_transfer_size, encoded_body_size);
return;
}
original_peer_->OnReceivedResponse(response_info_);
if (!data_.empty()) {
original_peer_->OnReceivedData(base::MakeUnique<content::FixedReceivedData>(
- data_.data(), data_.size(), -1, 0));
+ data_.data(), data_.size(), -1));
}
original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler,
stale_copy_in_cache, completion_time,
- total_transfer_size);
+ total_transfer_size, encoded_body_size);
}
////////////////////////////////////////////////////////////////////////////////
@@ -181,15 +182,17 @@ void ReplaceContentPeer::OnCompletedRequest(
bool was_ignored_by_handler,
bool stale_copy_in_cache,
const base::TimeTicks& completion_time,
- int64_t total_transfer_size) {
+ int64_t total_transfer_size,
+ int64_t encoded_body_size) {
content::ResourceResponseInfo info;
ProcessResponseInfo(info, &info, mime_type_);
info.content_length = static_cast<int>(data_.size());
original_peer_->OnReceivedResponse(info);
if (!data_.empty()) {
original_peer_->OnReceivedData(base::MakeUnique<content::FixedReceivedData>(
- data_.data(), data_.size(), -1, 0));
+ data_.data(), data_.size(), -1));
}
original_peer_->OnCompletedRequest(net::OK, false, stale_copy_in_cache,
- completion_time, total_transfer_size);
+ completion_time, total_transfer_size,
+ encoded_body_size);
}
« no previous file with comments | « chrome/renderer/security_filter_peer.h ('k') | content/child/ftp_directory_listing_response_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698