| 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/chromium/quic_chromium_client_stream.h" | 5 #include "net/quic/chromium/quic_chromium_client_stream.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 // will be able to, potentially, read all data which has queued up. | 102 // will be able to, potentially, read all data which has queued up. |
| 103 NotifyDelegateOfDataAvailableLater(); | 103 NotifyDelegateOfDataAvailableLater(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 void QuicChromiumClientStream::OnClose() { | 106 void QuicChromiumClientStream::OnClose() { |
| 107 if (delegate_) { | 107 if (delegate_) { |
| 108 delegate_->OnClose(); | 108 delegate_->OnClose(); |
| 109 delegate_ = nullptr; | 109 delegate_ = nullptr; |
| 110 delegate_tasks_.clear(); | 110 delegate_tasks_.clear(); |
| 111 } | 111 } |
| 112 ReliableQuicStream::OnClose(); | 112 QuicStream::OnClose(); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void QuicChromiumClientStream::OnCanWrite() { | 115 void QuicChromiumClientStream::OnCanWrite() { |
| 116 ReliableQuicStream::OnCanWrite(); | 116 QuicStream::OnCanWrite(); |
| 117 | 117 |
| 118 if (!HasBufferedData() && !callback_.is_null()) { | 118 if (!HasBufferedData() && !callback_.is_null()) { |
| 119 base::ResetAndReturn(&callback_).Run(OK); | 119 base::ResetAndReturn(&callback_).Run(OK); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 size_t QuicChromiumClientStream::WriteHeaders( | 123 size_t QuicChromiumClientStream::WriteHeaders( |
| 124 SpdyHeaderBlock header_block, | 124 SpdyHeaderBlock header_block, |
| 125 bool fin, | 125 bool fin, |
| 126 QuicAckListenerInterface* ack_notifier_delegate) { | 126 QuicAckListenerInterface* ack_notifier_delegate) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 284 |
| 285 void QuicChromiumClientStream::DisableConnectionMigration() { | 285 void QuicChromiumClientStream::DisableConnectionMigration() { |
| 286 can_migrate_ = false; | 286 can_migrate_ = false; |
| 287 } | 287 } |
| 288 | 288 |
| 289 bool QuicChromiumClientStream::IsFirstStream() { | 289 bool QuicChromiumClientStream::IsFirstStream() { |
| 290 return id() == kHeadersStreamId + 2; | 290 return id() == kHeadersStreamId + 2; |
| 291 } | 291 } |
| 292 | 292 |
| 293 } // namespace net | 293 } // namespace net |
| OLD | NEW |