summaryrefslogtreecommitdiff
path: root/chromium/net/spdy/spdy_http_stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/net/spdy/spdy_http_stream.cc')
-rw-r--r--chromium/net/spdy/spdy_http_stream.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/chromium/net/spdy/spdy_http_stream.cc b/chromium/net/spdy/spdy_http_stream.cc
index 4d9117514ab..878ccb00aa7 100644
--- a/chromium/net/spdy/spdy_http_stream.cc
+++ b/chromium/net/spdy/spdy_http_stream.cc
@@ -33,6 +33,7 @@ SpdyHttpStream::SpdyHttpStream(const base::WeakPtr<SpdySession>& spdy_session,
stream_closed_(false),
closed_stream_status_(ERR_FAILED),
closed_stream_id_(0),
+ closed_stream_received_bytes_(0),
request_info_(NULL),
response_info_(NULL),
response_headers_status_(RESPONSE_HEADERS_ARE_INCOMPLETE),
@@ -177,6 +178,16 @@ bool SpdyHttpStream::IsConnectionReusable() const {
return false;
}
+int64 SpdyHttpStream::GetTotalReceivedBytes() const {
+ if (stream_closed_)
+ return closed_stream_received_bytes_;
+
+ if (!stream_)
+ return 0;
+
+ return stream_->raw_received_bytes();
+}
+
bool SpdyHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const {
if (stream_closed_) {
if (!closed_stream_has_load_timing_info_)
@@ -365,6 +376,7 @@ void SpdyHttpStream::OnClose(int status) {
closed_stream_id_ = stream_->stream_id();
closed_stream_has_load_timing_info_ =
stream_->GetLoadTimingInfo(&closed_stream_load_timing_info_);
+ closed_stream_received_bytes_ = stream_->raw_received_bytes();
}
stream_.reset();
bool invoked_callback = false;