| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/spdy/spdy_http_stream.h" | 5 #include "net/spdy/spdy_http_stream.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 int64 SpdyHttpStream::GetTotalReceivedBytes() const { | 176 int64 SpdyHttpStream::GetTotalReceivedBytes() const { |
| 177 if (stream_closed_) | 177 if (stream_closed_) |
| 178 return closed_stream_received_bytes_; | 178 return closed_stream_received_bytes_; |
| 179 | 179 |
| 180 if (!stream_) | 180 if (!stream_) |
| 181 return 0; | 181 return 0; |
| 182 | 182 |
| 183 return stream_->raw_received_bytes(); | 183 return stream_->raw_received_bytes(); |
| 184 } | 184 } |
| 185 | 185 |
| 186 int64_t SpdyHttpStream::GetTotalSentBytes() const { |
| 187 // TODO(sclittle): Implement this for real. http://crbug.com/518897. |
| 188 return 0; |
| 189 } |
| 190 |
| 186 bool SpdyHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const { | 191 bool SpdyHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const { |
| 187 if (stream_closed_) { | 192 if (stream_closed_) { |
| 188 if (!closed_stream_has_load_timing_info_) | 193 if (!closed_stream_has_load_timing_info_) |
| 189 return false; | 194 return false; |
| 190 *load_timing_info = closed_stream_load_timing_info_; | 195 *load_timing_info = closed_stream_load_timing_info_; |
| 191 return true; | 196 return true; |
| 192 } | 197 } |
| 193 | 198 |
| 194 // If |stream_| has yet to be created, or does not yet have an ID, fail. | 199 // If |stream_| has yet to be created, or does not yet have an ID, fail. |
| 195 // The reused flag can only be correctly set once a stream has an ID. Streams | 200 // The reused flag can only be correctly set once a stream has an ID. Streams |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 Close(false); | 539 Close(false); |
| 535 delete this; | 540 delete this; |
| 536 } | 541 } |
| 537 | 542 |
| 538 void SpdyHttpStream::SetPriority(RequestPriority priority) { | 543 void SpdyHttpStream::SetPriority(RequestPriority priority) { |
| 539 // TODO(akalin): Plumb this through to |stream_request_| and | 544 // TODO(akalin): Plumb this through to |stream_request_| and |
| 540 // |stream_|. | 545 // |stream_|. |
| 541 } | 546 } |
| 542 | 547 |
| 543 } // namespace net | 548 } // namespace net |
| OLD | NEW |