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

Unified Diff: content/child/resource_dispatcher.cc

Issue 2105713002: Render process changes for ResourceTiming sizes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@resource_timing_sizes_browser_process
Patch Set: Initialise encoded_body_length for sync XHR to data: URLs Created 4 years, 5 months 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 | « content/child/resource_dispatcher.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher.cc
diff --git a/content/child/resource_dispatcher.cc b/content/child/resource_dispatcher.cc
index 28d35f29d6501bfdc04407f62224deb937e456f5..2c4b075bbe16786921a9f9e13749d0be7933c929 100644
--- a/content/child/resource_dispatcher.cc
+++ b/content/child/resource_dispatcher.cc
@@ -248,7 +248,8 @@ void ResourceDispatcher::OnReceivedInlinedDataChunk(
DCHECK(!request_info->buffer.get());
std::unique_ptr<RequestPeer::ReceivedData> received_data(
- new content::FixedReceivedData(data, encoded_data_length));
+ new content::FixedReceivedData(data, encoded_data_length,
+ encoded_body_length));
request_info->peer->OnReceivedData(std::move(received_data));
}
@@ -279,8 +280,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);
+ request_info->received_data_factory->Create(
+ data_offset, data_length, encoded_data_length, encoded_body_length);
// |data| takes care of ACKing.
send_ack = false;
request_info->peer->OnReceivedData(std::move(data));
@@ -573,6 +574,7 @@ void ResourceDispatcher::StartSync(const RequestInfo& request_info,
response->data.swap(result.data);
response->download_file_path = result.download_file_path;
response->socket_address = result.socket_address;
+ response->encoded_body_length = result.encoded_body_length;
}
int ResourceDispatcher::StartAsync(const RequestInfo& request_info,
« no previous file with comments | « content/child/resource_dispatcher.h ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698