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

Unified Diff: net/spdy/bidirectional_stream_spdy_impl.cc

Issue 1969893002: Remove unnecessary array allocation in cronet_bidirectional_stream_adapter.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add include vector Created 4 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
« no previous file with comments | « net/spdy/bidirectional_stream_spdy_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/bidirectional_stream_spdy_impl.cc
diff --git a/net/spdy/bidirectional_stream_spdy_impl.cc b/net/spdy/bidirectional_stream_spdy_impl.cc
index bbd76bb4ca009b72f0d5973c85dedbc8cace76c3..42341ee5411e371f1391d9c55762dd99db03c0f7 100644
--- a/net/spdy/bidirectional_stream_spdy_impl.cc
+++ b/net/spdy/bidirectional_stream_spdy_impl.cc
@@ -98,19 +98,19 @@ int BidirectionalStreamSpdyImpl::ReadData(IOBuffer* buf, int buf_len) {
return ERR_IO_PENDING;
}
-void BidirectionalStreamSpdyImpl::SendData(IOBuffer* data,
+void BidirectionalStreamSpdyImpl::SendData(const scoped_refptr<IOBuffer>& data,
int length,
bool end_stream) {
DCHECK(!stream_closed_);
DCHECK(stream_);
DCHECK(!disable_auto_flush_);
- stream_->SendData(data, length,
+ stream_->SendData(data.get(), length,
end_stream ? NO_MORE_DATA_TO_SEND : MORE_DATA_TO_SEND);
}
void BidirectionalStreamSpdyImpl::SendvData(
- const std::vector<IOBuffer*>& buffers,
+ const std::vector<scoped_refptr<IOBuffer>>& buffers,
const std::vector<int>& lengths,
bool end_stream) {
DCHECK(!stream_closed_);
« no previous file with comments | « net/spdy/bidirectional_stream_spdy_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698