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

Unified Diff: net/http/bidirectional_stream_impl.h

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.cc ('k') | net/http/bidirectional_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/bidirectional_stream_impl.h
diff --git a/net/http/bidirectional_stream_impl.h b/net/http/bidirectional_stream_impl.h
index b4d0045616d2e7ce7bb20f23bd862c95128a2015..8dff82df9c0df7778b577b003f9b6ed912eeec72 100644
--- a/net/http/bidirectional_stream_impl.h
+++ b/net/http/bidirectional_stream_impl.h
@@ -10,6 +10,7 @@
#include <memory>
#include "base/macros.h"
+#include "base/memory/ref_counted.h"
#include "net/base/net_export.h"
#include "net/socket/next_proto.h"
@@ -107,9 +108,11 @@ class NET_EXPORT_PRIVATE BidirectionalStreamImpl {
// Delegate::OnHeadersSent is invoked, and should not be called again until
// Delegate::OnDataSent is invoked. If |end_stream| is true, the DATA frame
// will have an END_STREAM flag.
- virtual void SendData(IOBuffer* data, int length, bool end_stream) = 0;
+ virtual void SendData(const scoped_refptr<IOBuffer>& data,
+ int length,
+ bool end_stream) = 0;
- virtual void SendvData(const std::vector<IOBuffer*>& buffers,
+ virtual void SendvData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
const std::vector<int>& lengths,
bool end_stream) = 0;
« no previous file with comments | « net/http/bidirectional_stream.cc ('k') | net/http/bidirectional_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698