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

Unified Diff: net/base/network_delegate_impl.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/base/network_delegate_impl.h
diff --git a/net/base/network_delegate_impl.h b/net/base/network_delegate_impl.h
index 1f1c779d2d9e88f95bbb251bb4a8e2de32376436..b5e97ce8c3c11df25265d172cf8e7326aedcdb75 100644
--- a/net/base/network_delegate_impl.h
+++ b/net/base/network_delegate_impl.h
@@ -118,6 +118,14 @@ class NET_EXPORT NetworkDelegateImpl : public NetworkDelegate {
// Called every time we read raw bytes.
void OnRawBytesRead(const URLRequest& request, int bytes_read) override;
+ // Called when bytes are received from the network, such as after receiving
+ // headers or reading raw response bytes. |bytes_received| is the number of
+ // bytes measured at the application layer that have been received over the
+ // network since the last time OnNetworkBytesReceived was called.
+ // |bytes_received| will always be greater than 0.
+ void OnNetworkBytesReceived(const URLRequest& request,
+ int64 bytes_received) override;
+
// Indicates that the URL request has been completed or failed.
// |started| indicates whether the request has been started. If false,
// some information like the socket address is not available.

Powered by Google App Engine
This is Rietveld 408576698