Index: net/http/http_response_headers.h |
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h |
index deba3b6d974fd45c42f20d8b7f94b14182d1573f..2eb0c672017734b7c5af3be59292d7892f0a4f99 100644 |
--- a/net/http/http_response_headers.h |
+++ b/net/http/http_response_headers.h |
@@ -26,6 +26,8 @@ class TimeDelta; |
namespace net { |
+class HttpByteRange; |
+ |
// HttpResponseHeaders: parses and holds HTTP response headers. |
class NET_EXPORT HttpResponseHeaders |
: public base::RefCountedThreadSafe<HttpResponseHeaders> { |
@@ -83,6 +85,15 @@ class NET_EXPORT HttpResponseHeaders |
// not have any EOL). |
void ReplaceStatusLine(const std::string& new_status); |
+ // Updates headers (Content-Length and Content-Range) in the |headers| to |
+ // include the right content length and range for |byte_range|. This also |
+ // updates HTTP status line if |replace_status_line| is true. |
+ // |byte_range| must have a valid, bounded range (i.e. coming from a valid |
+ // response or should be usable for a response). |
+ void UpdateWithNewRange(const HttpByteRange& byte_range, |
+ int64 resource_size, |
+ bool replace_status_line); |
+ |
// Creates a normalized header string. The output will be formatted exactly |
// like so: |
// HTTP/<version> <status_code> <status_text>\n |