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

Side by Side Diff: net/quic/quic_chromium_client_stream.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // NOTE: This code is not shared between Google and Chrome. 5 // NOTE: This code is not shared between Google and Chrome.
6 6
7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 7 #ifndef NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 8 #define NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // While the server's set_priority shouldn't be called externally, the creator 76 // While the server's set_priority shouldn't be called externally, the creator
77 // of client-side streams should be able to set the priority. 77 // of client-side streams should be able to set the priority.
78 using QuicSpdyStream::SetPriority; 78 using QuicSpdyStream::SetPriority;
79 79
80 int WriteStreamData(base::StringPiece data, 80 int WriteStreamData(base::StringPiece data,
81 bool fin, 81 bool fin,
82 const CompletionCallback& callback); 82 const CompletionCallback& callback);
83 // Same as WriteStreamData except it writes data from a vector of IOBuffers, 83 // Same as WriteStreamData except it writes data from a vector of IOBuffers,
84 // with the length of each buffer at the corresponding index in |lengths|. 84 // with the length of each buffer at the corresponding index in |lengths|.
85 int WritevStreamData(const std::vector<IOBuffer*>& buffers, 85 int WritevStreamData(const std::vector<scoped_refptr<IOBuffer>>& buffers,
86 const std::vector<int>& lengths, 86 const std::vector<int>& lengths,
87 bool fin, 87 bool fin,
88 const CompletionCallback& callback); 88 const CompletionCallback& callback);
89 // Set new |delegate|. |delegate| must not be NULL. 89 // Set new |delegate|. |delegate| must not be NULL.
90 // If this stream has already received data, OnDataReceived() will be 90 // If this stream has already received data, OnDataReceived() will be
91 // called on the delegate. 91 // called on the delegate.
92 void SetDelegate(Delegate* delegate); 92 void SetDelegate(Delegate* delegate);
93 Delegate* GetDelegate() { return delegate_; } 93 Delegate* GetDelegate() { return delegate_; }
94 void OnError(int error); 94 void OnError(int error);
95 95
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 std::deque<base::Closure> delegate_tasks_; 137 std::deque<base::Closure> delegate_tasks_;
138 138
139 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_; 139 base::WeakPtrFactory<QuicChromiumClientStream> weak_factory_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream); 141 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientStream);
142 }; 142 };
143 143
144 } // namespace net 144 } // namespace net
145 145
146 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_ 146 #endif // NET_QUIC_QUIC_RELIABLE_CLIENT_STREAM_H_
OLDNEW
« no previous file with comments | « net/quic/bidirectional_stream_quic_impl_unittest.cc ('k') | net/quic/quic_chromium_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698