Index: net/quic/quic_chromium_client_stream.cc |
diff --git a/net/quic/quic_chromium_client_stream.cc b/net/quic/quic_chromium_client_stream.cc |
index 06ec9426df6353c443be8cf3ff5f3162b7d5a2ae..2eaf3964fcc4dd6e7d1155cb1da7f28e1c3bd9a9 100644 |
--- a/net/quic/quic_chromium_client_stream.cc |
+++ b/net/quic/quic_chromium_client_stream.cc |
@@ -139,6 +139,27 @@ int QuicChromiumClientStream::WriteStreamData( |
return ERR_IO_PENDING; |
} |
+int QuicChromiumClientStream::WritevStreamData( |
+ const std::vector<IOBuffer*>& buffers, |
+ const std::vector<int>& lengths, |
+ bool fin, |
+ const CompletionCallback& callback) { |
+ // We should not have data buffered. |
Ryan Hamilton
2016/04/26 16:52:16
nit: avoid first person in comments. For example:
xunjieli
2016/04/26 18:11:26
Done.
|
+ DCHECK(!HasBufferedData()); |
+ // Writes the data, or buffers it. |
+ for (size_t i = 0; i < buffers.size(); ++i) { |
+ bool is_fin = fin && (i == buffers.size() - 1); |
+ base::StringPiece string_data(buffers[i]->data(), lengths[i]); |
+ WriteOrBufferData(string_data, is_fin, nullptr); |
+ } |
+ if (!HasBufferedData()) { |
+ return OK; |
+ } |
+ |
+ callback_ = callback; |
+ return ERR_IO_PENDING; |
+} |
+ |
void QuicChromiumClientStream::SetDelegate( |
QuicChromiumClientStream::Delegate* delegate) { |
DCHECK(!(delegate_ && delegate)); |