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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 1362793003: Notify NetworkDelegate when bytes have been sent over the network. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased on master Created 5 years, 3 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 af8d139e64b2738aa08996e88cf80720fc43d720..94086df2a62a1cd671ec7ad5677f3345346a4388 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -330,6 +330,7 @@ TestNetworkDelegate::TestNetworkDelegate()
before_send_headers_count_(0),
headers_received_count_(0),
total_network_bytes_received_(0),
+ total_network_bytes_sent_(0),
has_load_timing_info_before_redirect_(false),
has_load_timing_info_before_auth_(false),
can_access_files_(true),
@@ -512,6 +513,12 @@ void TestNetworkDelegate::OnNetworkBytesReceived(const URLRequest& request,
total_network_bytes_received_ += bytes_received;
}
+void TestNetworkDelegate::OnNetworkBytesSent(const URLRequest& request,
+ int64_t bytes_sent) {
+ event_order_[request.identifier()] += "OnNetworkBytesSent\n";
+ total_network_bytes_sent_ += bytes_sent;
+}
+
void TestNetworkDelegate::OnCompleted(URLRequest* request, bool started) {
int req_id = request->identifier();
InitRequestStatesIfNew(req_id);
« 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