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

Unified Diff: content/child/resource_dispatcher_unittest.cc

Issue 1103813002: Make WebURLLoader capable of retaining received buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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.cc ('k') | content/child/shared_memory_received_data_factory.h » ('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 bd5e13d648a7ba7f7acfd9028123c550f02285f8..8cda26f959649c88de546ead9324a048743cca9e 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -77,13 +77,11 @@ class TestRequestPeer : public RequestPeer {
total_encoded_data_length_ += encoded_data_length;
}
- void OnReceivedData(const char* data,
- int data_length,
- int encoded_data_length) override {
+ void OnReceivedData(scoped_ptr<ReceivedData> data) override {
EXPECT_TRUE(received_response_);
EXPECT_FALSE(complete_);
- data_.append(data, data_length);
- total_encoded_data_length_ += encoded_data_length;
+ data_.append(data->payload(), data->length());
+ total_encoded_data_length_ += data->encoded_length();
}
void OnCompletedRequest(int error_code,
@@ -734,9 +732,7 @@ class TimeConversionTest : public ResourceDispatcherTest,
void OnDownloadedData(int len, int encoded_data_length) override {}
- void OnReceivedData(const char* data,
- int data_length,
- int encoded_data_length) override {}
+ void OnReceivedData(scoped_ptr<ReceivedData> data) override {}
void OnCompletedRequest(int error_code,
bool was_ignored_by_handler,
« no previous file with comments | « content/child/resource_dispatcher.cc ('k') | content/child/shared_memory_received_data_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698