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

Unified Diff: net/url_request/url_request_test_util.h

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.h
diff --git a/net/url_request/url_request_test_util.h b/net/url_request/url_request_test_util.h
index ffa1b1b4f337c447eba46440b513b5bb093f0e82..04690f79a561a4e9aa683bf4fb8027988a707dae 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -285,6 +285,9 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
}
int before_send_headers_count() const { return before_send_headers_count_; }
int headers_received_count() const { return headers_received_count_; }
+ int64 total_network_bytes_received() const {
+ return total_network_bytes_received_;
+ }
// Last observed proxy in proxy header sent callback.
HostPortPair last_observed_proxy() {
@@ -317,6 +320,8 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
void OnBeforeRedirect(URLRequest* request, const GURL& new_location) override;
void OnResponseStarted(URLRequest* request) override;
void OnRawBytesRead(const URLRequest& request, int bytes_read) override;
+ void OnNetworkBytesReceived(const URLRequest& request,
+ int64 bytes_received) override;
void OnCompleted(URLRequest* request, bool started) override;
void OnURLRequestDestroyed(URLRequest* request) override;
void OnPACScriptError(int line_number, const base::string16& error) override;
@@ -357,6 +362,7 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
int observed_before_proxy_headers_sent_callbacks_;
int before_send_headers_count_;
int headers_received_count_;
+ int64 total_network_bytes_received_;
// Last observed proxy in before proxy header sent callback.
HostPortPair last_observed_proxy_;

Powered by Google App Engine
This is Rietveld 408576698