Chromium Code Reviews| Index: net/http/http_stream_base.h |
| diff --git a/net/http/http_stream_base.h b/net/http/http_stream_base.h |
| index 76e57ef8ff883bba74882792597f4b934116e67f..c6a99056a60e104715537f71a0c5df40b795365d 100644 |
| --- a/net/http/http_stream_base.h |
| +++ b/net/http/http_stream_base.h |
| @@ -122,6 +122,9 @@ class NET_EXPORT_PRIVATE HttpStreamBase { |
| // Get the total number of bytes received from network for this stream. |
| virtual int64 GetTotalReceivedBytes() const = 0; |
| + // Get the total number of body bytes received from network for this stream. |
| + virtual int64 GetReceivedBodyLength() const = 0; |
|
mmenke
2014/07/22 14:57:41
Why are these in the HttpStreamBase class, and not
jonnyr
2014/07/23 08:43:05
I could not do this in HttpNetworkTransaction sinc
mmenke
2014/07/23 15:08:40
I'm not following why this doesn't work. In HttpN
|
| + |
| // Populates the connection establishment part of |load_timing_info|, and |
| // socket ID. |load_timing_info| must have all null times when called. |
| // Returns false and does nothing if there is no underlying connection, either |
| @@ -156,6 +159,16 @@ class NET_EXPORT_PRIVATE HttpStreamBase { |
| // Called when the priority of the parent transaction changes. |
| virtual void SetPriority(RequestPriority priority) = 0; |
| + // If restarting a request where a part of the body has already been |
| + // received, set where we should start reading from, previous content length |
| + // and hash of previous response. |
| + virtual void SetRestartInfo(int64 read_offset, const void* hash, |
| + size_t hash_length) = 0; |
| + |
| + // If restarting a request where a part of the body has already been received, |
| + // retrieve the hash so that this can be verified on retry. |
| + virtual void GetHash(void* output, size_t hash_length) = 0; |
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(HttpStreamBase); |
| }; |