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

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: 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
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..1d6911ce9b303acdf4872a89ef5a4e029a8b5299 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() {
@@ -312,6 +313,8 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
HttpRequestHeaders* headers) override;
void OnSendHeaders(URLRequest* request,
const HttpRequestHeaders& headers) override;
+ void OnNetworkBytesSent(const URLRequest& request,
+ int64_t bytes_sent) override;
int OnHeadersReceived(
URLRequest* request,
const CompletionCallback& callback,
@@ -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_;

Powered by Google App Engine
This is Rietveld 408576698