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

Unified Diff: content/child/resource_dispatcher.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
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index e242b5eda9421e57bec96e99eb7c88e344dd1d98..0ae3ab8b37841ca6beb70f28f263bbd5aaa8795e 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -327,10 +327,8 @@ void ResourceDispatcher::OnReceivedInlinedDataChunk(
DCHECK(!request_info->buffer.get());
- std::unique_ptr<RequestPeer::ReceivedData> received_data(
- new content::FixedReceivedData(data, encoded_data_length,
- encoded_body_length));
- request_info->peer->OnReceivedData(std::move(received_data));
+ request_info->peer->OnReceivedData(
+ base::MakeUnique<content::FixedReceivedData>(data, encoded_data_length));
}
void ResourceDispatcher::OnReceivedData(int request_id,
@@ -360,8 +358,8 @@ void ResourceDispatcher::OnReceivedData(int request_id,
}
std::unique_ptr<RequestPeer::ReceivedData> data =
- request_info->received_data_factory->Create(
- data_offset, data_length, encoded_data_length, encoded_body_length);
+ request_info->received_data_factory->Create(data_offset, data_length,
+ encoded_data_length);
// |data| takes care of ACKing.
send_ack = false;
request_info->peer->OnReceivedData(std::move(data));
@@ -466,7 +464,8 @@ void ResourceDispatcher::OnRequestComplete(
request_complete_data.was_ignored_by_handler,
request_complete_data.exists_in_cache,
renderer_completion_time,
- request_complete_data.encoded_data_length);
+ request_complete_data.encoded_data_length,
+ request_complete_data.encoded_body_length);
}
bool ResourceDispatcher::RemovePendingRequest(int request_id) {
« no previous file with comments | « content/child/ftp_directory_listing_response_delegate.cc ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698