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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 delegate_ = nullptr; | 47 delegate_ = nullptr; |
48 stream_->Reset(QUIC_STREAM_CANCELLED); | 48 stream_->Reset(QUIC_STREAM_CANCELLED); |
49 } | 49 } |
50 | 50 |
51 if (session_) | 51 if (session_) |
52 session_->RemoveObserver(this); | 52 session_->RemoveObserver(this); |
53 } | 53 } |
54 | 54 |
55 void BidirectionalStreamQuicImpl::Start( | 55 void BidirectionalStreamQuicImpl::Start( |
56 const BidirectionalStreamRequestInfo* request_info, | 56 const BidirectionalStreamRequestInfo* request_info, |
57 const BoundNetLog& net_log, | 57 const NetLogWithSource& net_log, |
58 bool send_request_headers_automatically, | 58 bool send_request_headers_automatically, |
59 BidirectionalStreamImpl::Delegate* delegate, | 59 BidirectionalStreamImpl::Delegate* delegate, |
60 std::unique_ptr<base::Timer> /* timer */) { | 60 std::unique_ptr<base::Timer> /* timer */) { |
61 DCHECK(!stream_); | 61 DCHECK(!stream_); |
62 CHECK(delegate); | 62 CHECK(delegate); |
63 | 63 |
64 send_request_headers_automatically_ = send_request_headers_automatically; | 64 send_request_headers_automatically_ = send_request_headers_automatically; |
65 if (!session_) { | 65 if (!session_) { |
66 NotifyError(was_handshake_confirmed_ ? ERR_QUIC_PROTOCOL_ERROR | 66 NotifyError(was_handshake_confirmed_ ? ERR_QUIC_PROTOCOL_ERROR |
67 : ERR_QUIC_HANDSHAKE_FAILED); | 67 : ERR_QUIC_HANDSHAKE_FAILED); |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 if (!stream_) | 356 if (!stream_) |
357 return; | 357 return; |
358 closed_stream_received_bytes_ = stream_->stream_bytes_read(); | 358 closed_stream_received_bytes_ = stream_->stream_bytes_read(); |
359 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); | 359 closed_stream_sent_bytes_ = stream_->stream_bytes_written(); |
360 closed_is_first_stream_ = stream_->IsFirstStream(); | 360 closed_is_first_stream_ = stream_->IsFirstStream(); |
361 stream_->SetDelegate(nullptr); | 361 stream_->SetDelegate(nullptr); |
362 stream_ = nullptr; | 362 stream_ = nullptr; |
363 } | 363 } |
364 | 364 |
365 } // namespace net | 365 } // namespace net |
OLD | NEW |