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

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: 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
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..ca2db959cbe56cf55bc8d421b59c5055a8bfced2 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();
@@ -508,6 +508,11 @@ void TestNetworkDelegate::OnRawBytesRead(const URLRequest& request,
int bytes_read) {
}
+void TestNetworkDelegate::OnNetworkBytesReceived(const URLRequest& request,
+ int64 bytes_received) {
+ total_network_bytes_received_ += bytes_received;
tbansal1 2015/08/17 20:51:17 nit: May be add the event to event_order_ for easi
sclittle 2015/08/17 23:35:14 Done.
+}
+
void TestNetworkDelegate::OnCompleted(URLRequest* request, bool started) {
int req_id = request->identifier();
InitRequestStatesIfNew(req_id);
« net/url_request/url_request_job.cc ('K') | « 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