| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 int64 SpdyHttpStream::GetTotalReceivedBytes() const { | 180 int64 SpdyHttpStream::GetTotalReceivedBytes() const { |
| 181 if (stream_closed_) | 181 if (stream_closed_) |
| 182 return closed_stream_received_bytes_; | 182 return closed_stream_received_bytes_; |
| 183 | 183 |
| 184 if (!stream_) | 184 if (!stream_) |
| 185 return 0; | 185 return 0; |
| 186 | 186 |
| 187 return stream_->raw_received_bytes(); | 187 return stream_->raw_received_bytes(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 int64_t SpdyHttpStream::GetTotalSentBytes() const { |
| 191 // TODO(sclittle): Implement this for real. http://crbug.com/518897. |
| 192 return 0; |
| 193 } |
| 194 |
| 190 bool SpdyHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const { | 195 bool SpdyHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const { |
| 191 if (stream_closed_) { | 196 if (stream_closed_) { |
| 192 if (!closed_stream_has_load_timing_info_) | 197 if (!closed_stream_has_load_timing_info_) |
| 193 return false; | 198 return false; |
| 194 *load_timing_info = closed_stream_load_timing_info_; | 199 *load_timing_info = closed_stream_load_timing_info_; |
| 195 return true; | 200 return true; |
| 196 } | 201 } |
| 197 | 202 |
| 198 // If |stream_| has yet to be created, or does not yet have an ID, fail. | 203 // If |stream_| has yet to be created, or does not yet have an ID, fail. |
| 199 // The reused flag can only be correctly set once a stream has an ID. Streams | 204 // The reused flag can only be correctly set once a stream has an ID. Streams |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 Close(false); | 546 Close(false); |
| 542 delete this; | 547 delete this; |
| 543 } | 548 } |
| 544 | 549 |
| 545 void SpdyHttpStream::SetPriority(RequestPriority priority) { | 550 void SpdyHttpStream::SetPriority(RequestPriority priority) { |
| 546 // TODO(akalin): Plumb this through to |stream_request_| and | 551 // TODO(akalin): Plumb this through to |stream_request_| and |
| 547 // |stream_|. | 552 // |stream_|. |
| 548 } | 553 } |
| 549 | 554 |
| 550 } // namespace net | 555 } // namespace net |
| OLD | NEW |