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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 1284993005: Notify NetworkDelegate when bytes have been received over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed empty cronet OnRawBytesRead implementation Created 5 years, 4 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 | « net/url_request/url_request_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index 49df5712ad0f395ec25838a4d56e584f68222232..269203489f9f8c64580acec3836c3647a933ac19 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -327,13 +327,13 @@ TestNetworkDelegate::TestNetworkDelegate()
observed_before_proxy_headers_sent_callbacks_(0),
before_send_headers_count_(0),
headers_received_count_(0),
+ total_network_bytes_received_(0),
has_load_timing_info_before_redirect_(false),
has_load_timing_info_before_auth_(false),
can_access_files_(true),
first_party_only_cookies_enabled_(false),
cancel_request_with_policy_violating_referrer_(false),
- will_be_intercepted_on_next_error_(false) {
-}
+ will_be_intercepted_on_next_error_(false) {}
TestNetworkDelegate::~TestNetworkDelegate() {
for (std::map<int, int>::iterator i = next_states_.begin();
@@ -504,8 +504,10 @@ void TestNetworkDelegate::OnResponseStarted(URLRequest* request) {
}
}
-void TestNetworkDelegate::OnRawBytesRead(const URLRequest& request,
- int bytes_read) {
+void TestNetworkDelegate::OnNetworkBytesReceived(const URLRequest& request,
+ int64_t bytes_received) {
+ event_order_[request.identifier()] += "OnNetworkBytesReceived\n";
+ total_network_bytes_received_ += bytes_received;
}
void TestNetworkDelegate::OnCompleted(URLRequest* request, bool started) {
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698