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

Unified Diff: net/url_request/url_request_test_util.h

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_job.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.h
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index 924635ee1ac35547a68c453c965a34ea85e33877..09d44df254d0d5d50531537b16deac77e6aa7755 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -289,6 +289,7 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
int64_t total_network_bytes_received() const {
return total_network_bytes_received_;
}
+ int64_t total_network_bytes_sent() const { return total_network_bytes_sent_; }
// Last observed proxy in proxy header sent callback.
HostPortPair last_observed_proxy() {
@@ -322,6 +323,8 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
void OnResponseStarted(URLRequest* request) override;
void OnNetworkBytesReceived(const URLRequest& request,
int64_t bytes_received) override;
+ void OnNetworkBytesSent(const URLRequest& request,
+ int64_t bytes_sent) override;
void OnCompleted(URLRequest* request, bool started) override;
void OnURLRequestDestroyed(URLRequest* request) override;
void OnPACScriptError(int line_number, const base::string16& error) override;
@@ -363,6 +366,7 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
int before_send_headers_count_;
int headers_received_count_;
int64_t total_network_bytes_received_;
+ int64_t total_network_bytes_sent_;
// Last observed proxy in before proxy header sent callback.
HostPortPair last_observed_proxy_;
« no previous file with comments | « net/url_request/url_request_job.cc ('k') | net/url_request/url_request_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698