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

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: self review 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
Index: net/http/bidirectional_stream.cc
diff --git a/net/http/bidirectional_stream.cc b/net/http/bidirectional_stream.cc
index 125ee0c8259e425e995faad35e34c3d906544809..1e7a59c744fb68acb0ed346ae9c926706d0b2964 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());

Powered by Google App Engine
This is Rietveld 408576698