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

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: Removed empty cronet OnRawBytesRead implementation 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
« 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 ffa1b1b4f337c447eba46440b513b5bb093f0e82..924635ee1ac35547a68c453c965a34ea85e33877 100644
--- a/net/url_request/url_request_test_util.h
+++ b/net/url_request/url_request_test_util.h
@@ -5,6 +5,7 @@
#ifndef NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
#define NET_URL_REQUEST_URL_REQUEST_TEST_UTIL_H_
+#include <stdint.h>
#include <stdlib.h>
#include <map>
@@ -285,6 +286,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_t total_network_bytes_received() const {
+ return total_network_bytes_received_;
+ }
// Last observed proxy in proxy header sent callback.
HostPortPair last_observed_proxy() {
@@ -316,7 +320,8 @@ class TestNetworkDelegate : public NetworkDelegateImpl {
GURL* allowed_unsafe_redirect_url) override;
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_t 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_t total_network_bytes_received_;
// 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