| 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..a60fc4cc6ba3ad9159b98ddcfae681eaa5509654 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) {
|
| + // Must not be called when data is buffered.
|
| + 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));
|
|
|