Chromium Code Reviews| Index: net/base/network_delegate.h |
| diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h |
| index e7ee9644be80a1878408be8329ce96a037e0e761..b460f383e229d2076dbb913c8ca007a2e0b24bdd 100644 |
| --- a/net/base/network_delegate.h |
| +++ b/net/base/network_delegate.h |
| @@ -5,6 +5,7 @@ |
| #ifndef NET_BASE_NETWORK_DELEGATE_H_ |
| #define NET_BASE_NETWORK_DELEGATE_H_ |
| +#include <stdint.h> |
| #include <string> |
| #include "base/callback.h" |
| @@ -86,6 +87,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { |
| const GURL& new_location); |
| void NotifyResponseStarted(URLRequest* request); |
| void NotifyRawBytesRead(const URLRequest& request, int bytes_read); |
| + void NotifyNetworkBytesReceived(const URLRequest& request, int64 bytes_read); |
|
tbansal1
2015/08/17 20:51:17
|bytes_read| or |bytes_received|? I believe you ar
bengr
2015/08/17 21:30:39
FWIW, I like "received" and "sent".
sclittle
2015/08/17 23:35:13
Changed to bytes_received.
|
| void NotifyCompleted(URLRequest* request, bool started); |
| void NotifyURLRequestDestroyed(URLRequest* request); |
| void NotifyPACScriptError(int line_number, const base::string16& error); |
| @@ -201,6 +203,14 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { |
| // Called every time we read raw bytes. |
| virtual void OnRawBytesRead(const URLRequest& request, int bytes_read) = 0; |
| + // Called when bytes are received from the network, such as after receiving |
|
tbansal1
2015/08/17 20:51:17
Would this also get triggered on requests that are
sclittle
2015/08/17 23:35:13
I've added a comment here. Right now, this would i
|
| + // headers or reading raw response bytes. |bytes_received| is the number of |
| + // bytes measured at the application layer that have been received over the |
|
bengr
2015/08/17 21:30:39
It's work some more comment space to be ultra spec
sclittle
2015/08/17 23:35:13
I've added some more detail here, but I'm not exac
|
| + // network since the last time OnNetworkBytesReceived was called. |
| + // |bytes_received| will always be greater than 0. |
| + virtual void OnNetworkBytesReceived(const URLRequest& request, |
| + int64 bytes_received) = 0; |
| + |
| // 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. |