Chromium Code Reviews| Index: net/base/network_delegate.h |
| diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h |
| index 3a29e26c9f7695a2b7a83fe59bb73f695c6ebf97..5ec43dd9b1e6aae2c1426f658285cb21ddb07bcb 100644 |
| --- a/net/base/network_delegate.h |
| +++ b/net/base/network_delegate.h |
| @@ -78,6 +78,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { |
| HttpRequestHeaders* headers); |
| void NotifySendHeaders(URLRequest* request, |
| const HttpRequestHeaders& headers); |
| + void NotifyNetworkBytesSent(const URLRequest& request, int64_t bytes_sent); |
|
mmenke
2015/09/24 21:30:24
While I see you put this roughly in the order it's
sclittle
2015/09/24 22:20:42
Done.
|
| int NotifyHeadersReceived( |
| URLRequest* request, |
| const CompletionCallback& callback, |
| @@ -173,6 +174,16 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe { |
| virtual void OnSendHeaders(URLRequest* request, |
| const HttpRequestHeaders& headers) = 0; |
| + // Called when bytes are sent over the network, such as when sending request |
| + // headers or uploading request body bytes. This includes localhost requests. |
| + // |bytes_sent| is the number of bytes measured at the application layer that |
| + // have been sent over the network for this request since the last time |
| + // OnNetworkBytesSent was called. |bytes_sent| will always be greater than 0. |
| + // Currently, this is only implemented for HTTP transactions, and |bytes_sent| |
| + // does not include TLS overhead or TCP retransmits. |
| + virtual void OnNetworkBytesSent(const URLRequest& request, |
| + int64_t bytes_sent) = 0; |
| + |
| // Called for HTTP requests when the headers have been received. |
| // |original_response_headers| contains the headers as received over the |
| // network, these must not be modified. |override_response_headers| can be set |