| 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/bidirectional_stream_quic_impl.h" | 5 #include "net/quic/bidirectional_stream_quic_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 BidirectionalStreamQuicImpl::~BidirectionalStreamQuicImpl() { | 39 BidirectionalStreamQuicImpl::~BidirectionalStreamQuicImpl() { |
| 40 Cancel(); | 40 Cancel(); |
| 41 if (session_) | 41 if (session_) |
| 42 session_->RemoveObserver(this); | 42 session_->RemoveObserver(this); |
| 43 } | 43 } |
| 44 | 44 |
| 45 void BidirectionalStreamQuicImpl::Start( | 45 void BidirectionalStreamQuicImpl::Start( |
| 46 const BidirectionalStreamRequestInfo* request_info, | 46 const BidirectionalStreamRequestInfo* request_info, |
| 47 const BoundNetLog& net_log, | 47 const BoundNetLog& net_log, |
| 48 BidirectionalStreamJob::Delegate* delegate, | 48 BidirectionalStreamImpl::Delegate* delegate, |
| 49 scoped_ptr<base::Timer> /* timer */) { | 49 scoped_ptr<base::Timer> /* timer */) { |
| 50 DCHECK(!stream_); | 50 DCHECK(!stream_); |
| 51 | 51 |
| 52 if (!session_) { | 52 if (!session_) { |
| 53 NotifyError(was_handshake_confirmed_ ? ERR_QUIC_PROTOCOL_ERROR | 53 NotifyError(was_handshake_confirmed_ ? ERR_QUIC_PROTOCOL_ERROR |
| 54 : ERR_QUIC_HANDSHAKE_FAILED); | 54 : ERR_QUIC_HANDSHAKE_FAILED); |
| 55 return; | 55 return; |
| 56 } | 56 } |
| 57 | 57 |
| 58 delegate_ = delegate; | 58 delegate_ = delegate; |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 void BidirectionalStreamQuicImpl::ResetStream() { | 255 void BidirectionalStreamQuicImpl::ResetStream() { |
| 256 if (!stream_) | 256 if (!stream_) |
| 257 return; | 257 return; |
| 258 closed_stream_received_bytes_ = stream_->stream_bytes_read(); | 258 closed_stream_received_bytes_ = stream_->stream_bytes_read(); |
| 259 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 259 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
| 260 stream_->SetDelegate(nullptr); | 260 stream_->SetDelegate(nullptr); |
| 261 stream_ = nullptr; | 261 stream_ = nullptr; |
| 262 } | 262 } |
| 263 | 263 |
| 264 } // namespace net | 264 } // namespace net |
| OLD | NEW |