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

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: Initial patch set 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
« net/base/network_delegate.h ('K') | « 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..cc4687895d737a1655de7495daef0cd25b464778 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),
@@ -426,6 +427,12 @@ void TestNetworkDelegate::OnSendHeaders(
will_be_intercepted_on_next_error_ = false;
}
+void TestNetworkDelegate::OnNetworkBytesSent(const URLRequest& request,
+ int64_t bytes_sent) {
+ event_order_[request.identifier()] += "OnNetworkBytesSent\n";
+ total_network_bytes_sent_ += bytes_sent;
+}
+
int TestNetworkDelegate::OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
« net/base/network_delegate.h ('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