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

Unified Diff: net/http/http_stream_parser.h

Issue 403393003: HTTP retry support. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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/http/http_stream_parser.h
diff --git a/net/http/http_stream_parser.h b/net/http/http_stream_parser.h
index a8d0447a086572ad51f23ffb7ad4a1910a8cdcaf..093baffb9afe6975a174c6ea714f659960a15836 100644
--- a/net/http/http_stream_parser.h
+++ b/net/http/http_stream_parser.h
@@ -75,6 +75,12 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
bool IsConnectionReusable() const;
+ void SetRestartInfo(int64 read_offset, const void* hash, size_t hash_length);
+
+ void GetHash(void* output, size_t hash_length);
+
+ int64 GetReceivedBodyLength() const { return response_body_read_; }
+
int64 received_bytes() const { return received_bytes_; }
void GetSSLInfo(SSLInfo* ssl_info);
@@ -104,6 +110,7 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
private:
class SeekableIOBuffer;
+ class HttpStreamHash;
// FOO_COMPLETE states implement the second half of potentially asynchronous
// operations and don't necessarily mean that FOO is complete.
@@ -209,6 +216,13 @@ class NET_EXPORT_PRIVATE HttpStreamParser {
// closes the connection.
int64 response_body_length_;
+ // Indicates the amount of body data that should be skipped when reading from
+ // a retried request we have already read data from.
+ int64 read_offset_;
+
+ // Hash of content as it is retrieved.
+ scoped_ptr<HttpStreamHash> stream_hash_;
+
// Keep track of the number of response body bytes read so far.
int64 response_body_read_;

Powered by Google App Engine
This is Rietveld 408576698