| 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/quic/quic_http_stream.h" |    5 #include "net/quic/quic_http_stream.h" | 
|    6  |    6  | 
|    7 #include "base/callback_helpers.h" |    7 #include "base/callback_helpers.h" | 
|    8 #ifdef TEMP_INSTRUMENTATION_468529 |    8 #ifdef TEMP_INSTRUMENTATION_468529 | 
|    9 #include "base/debug/alias.h" |    9 #include "base/debug/alias.h" | 
|   10 #endif |   10 #endif | 
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  231 } |  231 } | 
|  232  |  232  | 
|  233 HttpStream* QuicHttpStream::RenewStreamForAuth() { |  233 HttpStream* QuicHttpStream::RenewStreamForAuth() { | 
|  234   return nullptr; |  234   return nullptr; | 
|  235 } |  235 } | 
|  236  |  236  | 
|  237 bool QuicHttpStream::IsResponseBodyComplete() const { |  237 bool QuicHttpStream::IsResponseBodyComplete() const { | 
|  238   return next_state_ == STATE_OPEN && !stream_; |  238   return next_state_ == STATE_OPEN && !stream_; | 
|  239 } |  239 } | 
|  240  |  240  | 
|  241 bool QuicHttpStream::CanFindEndOfResponse() const { |  | 
|  242   return true; |  | 
|  243 } |  | 
|  244  |  | 
|  245 bool QuicHttpStream::IsConnectionReused() const { |  241 bool QuicHttpStream::IsConnectionReused() const { | 
|  246   // TODO(rch): do something smarter here. |  242   // TODO(rch): do something smarter here. | 
|  247   return stream_ && stream_->id() > 1; |  243   return stream_ && stream_->id() > 1; | 
|  248 } |  244 } | 
|  249  |  245  | 
|  250 void QuicHttpStream::SetConnectionReused() { |  246 void QuicHttpStream::SetConnectionReused() { | 
|  251   // QUIC doesn't need an indicator here. |  247   // QUIC doesn't need an indicator here. | 
|  252 } |  248 } | 
|  253  |  249  | 
|  254 bool QuicHttpStream::IsConnectionReusable() const { |  250 bool QuicHttpStream::CanReuseConnection() const { | 
|  255   // QUIC streams aren't considered reusable. |  251   // QUIC streams aren't considered reusable. | 
|  256   return false; |  252   return false; | 
|  257 } |  253 } | 
|  258  |  254  | 
|  259 int64 QuicHttpStream::GetTotalReceivedBytes() const { |  255 int64 QuicHttpStream::GetTotalReceivedBytes() const { | 
|  260   if (stream_) { |  256   if (stream_) { | 
|  261     return stream_->stream_bytes_read(); |  257     return stream_->stream_bytes_read(); | 
|  262   } |  258   } | 
|  263  |  259  | 
|  264   return closed_stream_received_bytes_; |  260   return closed_stream_received_bytes_; | 
|  265 } |  261 } | 
|  266  |  262  | 
|  267 bool QuicHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const { |  263 bool QuicHttpStream::GetLoadTimingInfo(LoadTimingInfo* load_timing_info) const { | 
|  268   // TODO(mmenke):  Figure out what to do here. |  264   // TODO(mmenke):  Figure out what to do here. | 
|  269   return true; |  265   return true; | 
|  270 } |  266 } | 
|  271  |  267  | 
|  272 void QuicHttpStream::GetSSLInfo(SSLInfo* ssl_info) { |  268 void QuicHttpStream::GetSSLInfo(SSLInfo* ssl_info) { | 
|  273   DCHECK(stream_); |  269   DCHECK(stream_); | 
|  274   session_->GetSSLInfo(ssl_info); |  270   session_->GetSSLInfo(ssl_info); | 
|  275 } |  271 } | 
|  276  |  272  | 
|  277 void QuicHttpStream::GetSSLCertRequestInfo( |  273 void QuicHttpStream::GetSSLCertRequestInfo( | 
|  278     SSLCertRequestInfo* cert_request_info) { |  274     SSLCertRequestInfo* cert_request_info) { | 
|  279   DCHECK(stream_); |  275   DCHECK(stream_); | 
|  280   NOTIMPLEMENTED(); |  276   NOTIMPLEMENTED(); | 
|  281 } |  277 } | 
|  282  |  278  | 
|  283 bool QuicHttpStream::IsSpdyHttpStream() const { |  | 
|  284   return false; |  | 
|  285 } |  | 
|  286  |  | 
|  287 void QuicHttpStream::Drain(HttpNetworkSession* session) { |  279 void QuicHttpStream::Drain(HttpNetworkSession* session) { | 
 |  280   NOTREACHED(); | 
|  288   Close(false); |  281   Close(false); | 
|  289   delete this; |  282   delete this; | 
|  290 } |  283 } | 
|  291  |  284  | 
|  292 void QuicHttpStream::SetPriority(RequestPriority priority) { |  285 void QuicHttpStream::SetPriority(RequestPriority priority) { | 
|  293   priority_ = priority; |  286   priority_ = priority; | 
|  294 } |  287 } | 
|  295  |  288  | 
|  296 void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers) { |  289 void QuicHttpStream::OnHeadersAvailable(const SpdyHeaderBlock& headers) { | 
|  297   int rv = ProcessResponseHeaders(headers); |  290   int rv = ProcessResponseHeaders(headers); | 
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  564   base::debug::StackTrace stack_trace = stack_trace_; |  557   base::debug::StackTrace stack_trace = stack_trace_; | 
|  565  |  558  | 
|  566   base::debug::Alias(&liveness); |  559   base::debug::Alias(&liveness); | 
|  567   base::debug::Alias(&stack_trace); |  560   base::debug::Alias(&stack_trace); | 
|  568  |  561  | 
|  569   CHECK_EQ(ALIVE, liveness); |  562   CHECK_EQ(ALIVE, liveness); | 
|  570 #endif |  563 #endif | 
|  571 } |  564 } | 
|  572  |  565  | 
|  573 }  // namespace net |  566 }  // namespace net | 
| OLD | NEW |