Chromium Code Reviews| 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/quic_reliable_client_stream.h" | 5 #include "net/quic/quic_reliable_client_stream.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 } | 70 } |
| 71 } | 71 } |
| 72 | 72 |
| 73 QuicPriority QuicReliableClientStream::EffectivePriority() const { | 73 QuicPriority QuicReliableClientStream::EffectivePriority() const { |
| 74 if (delegate_ && delegate_->HasSendHeadersComplete()) { | 74 if (delegate_ && delegate_->HasSendHeadersComplete()) { |
| 75 return QuicDataStream::EffectivePriority(); | 75 return QuicDataStream::EffectivePriority(); |
| 76 } | 76 } |
| 77 return QuicWriteBlockedList::kHighestPriority; | 77 return QuicWriteBlockedList::kHighestPriority; |
| 78 } | 78 } |
| 79 | 79 |
| 80 void QuicReliableClientStream::OnFinRead() { | |
| 81 // Do not close the stream here to give the caller a chance to | |
| 82 // invoke DoneReading. | |
| 83 } | |
| 84 | |
| 85 void QuicReliableClientStream::DoneReading() { | 80 void QuicReliableClientStream::DoneReading() { |
|
Ryan Hamilton
2015/08/04 20:28:56
Might as well get right of this method, and change
ramant (doing other things)
2015/08/05 23:35:16
Done.
| |
| 86 QuicDataStream::OnFinRead(); | 81 QuicDataStream::OnFinRead(); |
| 87 } | 82 } |
| 88 | 83 |
| 89 int QuicReliableClientStream::WriteStreamData( | 84 int QuicReliableClientStream::WriteStreamData( |
| 90 base::StringPiece data, | 85 base::StringPiece data, |
| 91 bool fin, | 86 bool fin, |
| 92 const CompletionCallback& callback) { | 87 const CompletionCallback& callback) { |
| 93 // We should not have data buffered. | 88 // We should not have data buffered. |
| 94 DCHECK(!HasBufferedData()); | 89 DCHECK(!HasBufferedData()); |
| 95 // Writes the data, or buffers it. | 90 // Writes the data, or buffers it. |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 base::Bind(&QuicReliableClientStream::NotifyDelegateOfDataAvailable, | 172 base::Bind(&QuicReliableClientStream::NotifyDelegateOfDataAvailable, |
| 178 weak_factory_.GetWeakPtr())); | 173 weak_factory_.GetWeakPtr())); |
| 179 } | 174 } |
| 180 | 175 |
| 181 void QuicReliableClientStream::NotifyDelegateOfDataAvailable() { | 176 void QuicReliableClientStream::NotifyDelegateOfDataAvailable() { |
| 182 if (delegate_) | 177 if (delegate_) |
| 183 delegate_->OnDataAvailable(); | 178 delegate_->OnDataAvailable(); |
| 184 } | 179 } |
| 185 | 180 |
| 186 } // namespace net | 181 } // namespace net |
| OLD | NEW |