Index: content/browser/streams/stream_url_request_job.cc |
diff --git a/content/browser/streams/stream_url_request_job.cc b/content/browser/streams/stream_url_request_job.cc |
index 1659eb05f7665bf873663040495cf6e3f469157c..f6ea712a4cb4f543262802ad99725b8e04b77d11 100644 |
--- a/content/browser/streams/stream_url_request_job.cc |
+++ b/content/browser/streams/stream_url_request_job.cc |
@@ -145,6 +145,15 @@ int StreamURLRequestJob::GetResponseCode() const { |
return response_info_->headers->response_code(); |
} |
+int64_t StreamURLRequestJob::GetTotalReceivedBytes() const { |
+ int64_t total_received_bytes = 0; |
+ if (response_info_) |
+ total_received_bytes = response_info_->headers->raw_headers().size(); |
+ if (stream_.get()) |
+ total_received_bytes += total_bytes_read_; |
+ return total_received_bytes; |
+} |
+ |
void StreamURLRequestJob::DidStart() { |
if (range_parse_result() == net::OK && ranges().size() > 0) { |
// Only one range is supported, and it must start at the first byte. |