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

Unified Diff: net/http/bidirectional_stream.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/http/bidirectional_stream.h ('k') | net/http/bidirectional_stream_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/bidirectional_stream.cc
diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
index b49ee58f235ae2bebddef6423aec0920e2ad3761..8b83c1e93515f06efaa4db3b5aaca903b35ec1ca 100644
--- a/net/http/bidirectional_stream.cc
+++ b/net/http/bidirectional_stream.cc
@@ -145,7 +145,7 @@ int BidirectionalStream::ReadData(IOBuffer* buf, int buf_len) {
return rv;
}
-void BidirectionalStream::SendData(IOBuffer* data,
+void BidirectionalStream::SendData(const scoped_refptr<IOBuffer>& data,
int length,
bool end_stream) {
DCHECK(stream_impl_);
@@ -157,9 +157,10 @@ void BidirectionalStream::SendData(IOBuffer* data,
write_buffer_len_list_.push_back(length);
}
-void BidirectionalStream::SendvData(const std::vector<IOBuffer*>& buffers,
- const std::vector<int>& lengths,
- bool end_stream) {
+void BidirectionalStream::SendvData(
+ const std::vector<scoped_refptr<IOBuffer>>& buffers,
+ const std::vector<int>& lengths,
+ bool end_stream) {
DCHECK(stream_impl_);
DCHECK_EQ(buffers.size(), lengths.size());
DCHECK(write_buffer_list_.empty());
« no previous file with comments | « net/http/bidirectional_stream.h ('k') | net/http/bidirectional_stream_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698