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

Unified Diff: content/child/resource_dispatcher_unittest.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 | « content/child/resource_dispatcher.cc ('k') | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/resource_dispatcher_unittest.cc
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 02ae8fde6e4af1e534b0a1fcc07d42bd1f83a06d..1bf9e349b2f896a7748d982e2f6633daf14de13e 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -104,7 +104,8 @@ class TestRequestPeer : public RequestPeer {
bool was_ignored_by_handler,
bool stale_copy_in_cache,
const base::TimeTicks& completion_time,
- int64_t total_transfer_size) override {
+ int64_t total_transfer_size,
+ int64_t encoded_body_size) override {
if (context_->cancelled)
return;
EXPECT_TRUE(context_->received_response);
@@ -544,15 +545,16 @@ class TestResourceDispatcherDelegate : public ResourceDispatcherDelegate {
bool was_ignored_by_handler,
bool stale_copy_in_cache,
const base::TimeTicks& completion_time,
- int64_t total_transfer_size) override {
+ int64_t total_transfer_size,
+ int64_t encoded_body_size) override {
original_peer_->OnReceivedResponse(response_info_);
if (!data_.empty()) {
original_peer_->OnReceivedData(base::MakeUnique<FixedReceivedData>(
- data_.data(), data_.size(), -1, data_.size()));
+ data_.data(), data_.size(), -1));
}
- original_peer_->OnCompletedRequest(error_code, was_ignored_by_handler,
- stale_copy_in_cache, completion_time,
- total_transfer_size);
+ original_peer_->OnCompletedRequest(
+ error_code, was_ignored_by_handler, stale_copy_in_cache,
+ completion_time, total_transfer_size, encoded_body_size);
}
private:
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/shared_memory_data_consumer_handle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698