Index: net/http/http_basic_stream.cc |
=================================================================== |
--- net/http/http_basic_stream.cc (revision 86260) |
+++ net/http/http_basic_stream.cc (working copy) |
@@ -34,6 +34,7 @@ |
request_info_ = request_info; |
parser_.reset(new HttpStreamParser(connection_.get(), request_info, |
read_buf_, net_log)); |
+ bytes_read_offset_ = connection_->socket()->NumBytesRead(); |
return OK; |
} |
@@ -119,4 +120,12 @@ |
return false; |
} |
+double HttpBasicStream::GetRTTMs() const { |
+ return connection_->socket()->GetRTTMs(); |
+} |
+ |
+int HttpBasicStream::GetBytesReceived() const { |
+ return connection_->socket()->NumBytesRead() - bytes_read_offset_; |
+} |
+ |
} // namespace net |