Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Unified Diff: net/quic/chromium/bidirectional_stream_quic_impl.cc

Issue 2915053003: Remove unused BidirectionalStream::SendData() method and implementations. (Closed)
Patch Set: Fix Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/quic/chromium/bidirectional_stream_quic_impl.cc
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl.cc b/net/quic/chromium/bidirectional_stream_quic_impl.cc
index df82cec18951c50f120929228fa5dd085990ced6..f07bc68629966808c8267869f53b81cca6f61e12 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl.cc
@@ -145,43 +145,6 @@ int BidirectionalStreamQuicImpl::ReadData(IOBuffer* buffer, int buffer_len) {
return rv;
}
-void BidirectionalStreamQuicImpl::SendData(const scoped_refptr<IOBuffer>& data,
- int length,
- bool end_stream) {
- DCHECK(length > 0 || (length == 0 && end_stream));
- if (!stream_) {
- LOG(ERROR) << "Trying to send data after stream has been destroyed.";
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(&BidirectionalStreamQuicImpl::NotifyError,
- weak_factory_.GetWeakPtr(), ERR_UNEXPECTED));
- return;
- }
-
- std::unique_ptr<QuicConnection::ScopedPacketBundler> bundler;
- if (!has_sent_headers_) {
- DCHECK(!send_request_headers_automatically_);
- // Creates a bundler only if there are headers to be sent along with the
- // single data buffer.
- bundler =
- session_->CreatePacketBundler(QuicConnection::SEND_ACK_IF_PENDING);
- // Sending the request might result in the stream being closed.
- if (!WriteHeaders())
- return;
- }
-
- QuicStringPiece string_data(data->data(), length);
- int rv = stream_->WriteStreamData(
- string_data, end_stream,
- base::Bind(&BidirectionalStreamQuicImpl::OnSendDataComplete,
- weak_factory_.GetWeakPtr()));
- DCHECK(rv == OK || rv == ERR_IO_PENDING);
- if (rv == OK) {
- base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(&BidirectionalStreamQuicImpl::OnSendDataComplete,
- weak_factory_.GetWeakPtr(), OK));
- }
-}
-
void BidirectionalStreamQuicImpl::SendvData(
const std::vector<scoped_refptr<IOBuffer>>& buffers,
const std::vector<int>& lengths,
« no previous file with comments | « net/quic/chromium/bidirectional_stream_quic_impl.h ('k') | net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698