Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: net/spdy/spdy_http_stream.cc

Issue 1320683003: Move logic to figure out if a socket can be reused into HttpStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 HttpStream* SpdyHttpStream::RenewStreamForAuth() { 155 HttpStream* SpdyHttpStream::RenewStreamForAuth() {
156 return NULL; 156 return NULL;
157 } 157 }
158 158
159 bool SpdyHttpStream::IsResponseBodyComplete() const { 159 bool SpdyHttpStream::IsResponseBodyComplete() const {
160 return stream_closed_; 160 return stream_closed_;
161 } 161 }
162 162
163 bool SpdyHttpStream::CanFindEndOfResponse() const {
164 return true;
165 }
166
167 bool SpdyHttpStream::IsConnectionReused() const { 163 bool SpdyHttpStream::IsConnectionReused() const {
168 return is_reused_; 164 return is_reused_;
169 } 165 }
170 166
171 void SpdyHttpStream::SetConnectionReused() { 167 void SpdyHttpStream::SetConnectionReused() {
172 // SPDY doesn't need an indicator here. 168 // SPDY doesn't need an indicator here.
173 } 169 }
174 170
175 bool SpdyHttpStream::IsConnectionReusable() const { 171 bool SpdyHttpStream::CanReuseConnection() const {
176 // SPDY streams aren't considered reusable. 172 // SPDY streams aren't considered reusable.
177 return false; 173 return false;
178 } 174 }
179 175
180 int64 SpdyHttpStream::GetTotalReceivedBytes() const { 176 int64 SpdyHttpStream::GetTotalReceivedBytes() const {
181 if (stream_closed_) 177 if (stream_closed_)
182 return closed_stream_received_bytes_; 178 return closed_stream_received_bytes_;
183 179
184 if (!stream_) 180 if (!stream_)
185 return 0; 181 return 0;
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 stream_->GetSSLInfo(ssl_info, &using_npn, &protocol_negotiated); 522 stream_->GetSSLInfo(ssl_info, &using_npn, &protocol_negotiated);
527 } 523 }
528 524
529 void SpdyHttpStream::GetSSLCertRequestInfo( 525 void SpdyHttpStream::GetSSLCertRequestInfo(
530 SSLCertRequestInfo* cert_request_info) { 526 SSLCertRequestInfo* cert_request_info) {
531 // A SPDY stream cannot request client certificates. Client authentication may 527 // A SPDY stream cannot request client certificates. Client authentication may
532 // only occur during the initial SSL handshake. 528 // only occur during the initial SSL handshake.
533 NOTREACHED(); 529 NOTREACHED();
534 } 530 }
535 531
536 bool SpdyHttpStream::IsSpdyHttpStream() const {
537 return true;
538 }
539
540 void SpdyHttpStream::Drain(HttpNetworkSession* session) { 532 void SpdyHttpStream::Drain(HttpNetworkSession* session) {
533 NOTREACHED();
541 Close(false); 534 Close(false);
542 delete this; 535 delete this;
543 } 536 }
544 537
545 void SpdyHttpStream::SetPriority(RequestPriority priority) { 538 void SpdyHttpStream::SetPriority(RequestPriority priority) {
546 // TODO(akalin): Plumb this through to |stream_request_| and 539 // TODO(akalin): Plumb this through to |stream_request_| and
547 // |stream_|. 540 // |stream_|.
548 } 541 }
549 542
550 } // namespace net 543 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698