OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/chromium/bidirectional_stream_quic_impl.h" | 5 #include "net/quic/chromium/bidirectional_stream_quic_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 // The connection was closed normally so there is no need to notify | 288 // The connection was closed normally so there is no need to notify |
289 // the delegate. | 289 // the delegate. |
290 ResetStream(); | 290 ResetStream(); |
291 } | 291 } |
292 | 292 |
293 void BidirectionalStreamQuicImpl::OnError(int error) { | 293 void BidirectionalStreamQuicImpl::OnError(int error) { |
294 NotifyError(error); | 294 NotifyError(error); |
295 } | 295 } |
296 | 296 |
297 bool BidirectionalStreamQuicImpl::HasSendHeadersComplete() { | |
298 return has_sent_headers_; | |
299 } | |
300 | |
301 void BidirectionalStreamQuicImpl::OnCryptoHandshakeConfirmed() { | 297 void BidirectionalStreamQuicImpl::OnCryptoHandshakeConfirmed() { |
302 was_handshake_confirmed_ = true; | 298 was_handshake_confirmed_ = true; |
303 } | 299 } |
304 | 300 |
305 void BidirectionalStreamQuicImpl::OnSuccessfulVersionNegotiation( | 301 void BidirectionalStreamQuicImpl::OnSuccessfulVersionNegotiation( |
306 const QuicVersion& version) {} | 302 const QuicVersion& version) {} |
307 | 303 |
308 void BidirectionalStreamQuicImpl::OnSessionClosed( | 304 void BidirectionalStreamQuicImpl::OnSessionClosed( |
309 int error, | 305 int error, |
310 bool /*port_migration_detected*/) { | 306 bool /*port_migration_detected*/) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 if (!stream_) | 365 if (!stream_) |
370 return; | 366 return; |
371 closed_stream_received_bytes_ = stream_->stream_bytes_read(); | 367 closed_stream_received_bytes_ = stream_->stream_bytes_read(); |
372 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 368 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
373 closed_is_first_stream_ = stream_->IsFirstStream(); | 369 closed_is_first_stream_ = stream_->IsFirstStream(); |
374 stream_->SetDelegate(nullptr); | 370 stream_->SetDelegate(nullptr); |
375 stream_ = nullptr; | 371 stream_ = nullptr; |
376 } | 372 } |
377 | 373 |
378 } // namespace net | 374 } // namespace net |
OLD | NEW |