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

Side by Side Diff: net/quic/test_tools/simple_data_producer.cc

Issue 2963763003: In QUIC, send data is copied to streams rather than frames. Protected by FLAGS_quic_reloadable_flag… (Closed)
Patch Set: Rebase Created 3 years, 5 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
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/quic/test_tools/simple_data_producer.h"
6
7 #include "net/quic/platform/api/quic_map_util.h"
8
9 namespace net {
10
11 namespace test {
12
13 SimpleDataProducer::SimpleDataProducer() {}
14
15 SimpleDataProducer::~SimpleDataProducer() {}
16
17 void SimpleDataProducer::SaveStreamData(QuicStreamId id,
18 QuicIOVector iov,
19 size_t iov_offset,
20 QuicStreamOffset offset,
21 QuicByteCount data_length) {
22 if (!QuicContainsKey(send_buffer_map_, id)) {
23 send_buffer_map_[id].reset(new QuicStreamSendBuffer(&allocator_));
24 }
25 send_buffer_map_[id]->SaveStreamData(iov, iov_offset, offset, data_length);
26 }
27
28 bool SimpleDataProducer::WriteStreamData(QuicStreamId id,
29 QuicStreamOffset offset,
30 QuicByteCount data_length,
31 QuicDataWriter* writer) {
32 return send_buffer_map_[id]->WriteStreamData(offset, data_length, writer);
33 }
34
35 } // namespace test
36
37 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/simple_data_producer.h ('k') | net/quic/test_tools/simulator/quic_endpoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698