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

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

Issue 1979763002: Landing Recent QUIC changes until Sun May 8 00:39:29 2016 +0000 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/chlo_extractor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "net/quic/test_tools/simple_quic_framer.h" 5 #include "net/quic/test_tools/simple_quic_framer.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 void OnDecryptedPacket(EncryptionLevel level) override {} 50 void OnDecryptedPacket(EncryptionLevel level) override {}
51 bool OnPacketHeader(const QuicPacketHeader& header) override { 51 bool OnPacketHeader(const QuicPacketHeader& header) override {
52 has_header_ = true; 52 has_header_ = true;
53 header_ = header; 53 header_ = header;
54 return true; 54 return true;
55 } 55 }
56 56
57 bool OnStreamFrame(const QuicStreamFrame& frame) override { 57 bool OnStreamFrame(const QuicStreamFrame& frame) override {
58 // Save a copy of the data so it is valid after the packet is processed. 58 // Save a copy of the data so it is valid after the packet is processed.
59 string* string_data = new string(); 59 string* string_data = new string();
60 StringPiece(frame.frame_buffer, frame.frame_length) 60 StringPiece(frame.data_buffer, frame.data_length)
61 .AppendToString(string_data); 61 .AppendToString(string_data);
62 stream_data_.push_back(string_data); 62 stream_data_.push_back(string_data);
63 // TODO(ianswett): A pointer isn't necessary with emplace_back. 63 // TODO(ianswett): A pointer isn't necessary with emplace_back.
64 stream_frames_.push_back(new QuicStreamFrame( 64 stream_frames_.push_back(new QuicStreamFrame(
65 frame.stream_id, frame.fin, frame.offset, StringPiece(*string_data))); 65 frame.stream_id, frame.fin, frame.offset, StringPiece(*string_data)));
66 return true; 66 return true;
67 } 67 }
68 68
69 bool OnAckFrame(const QuicAckFrame& frame) override { 69 bool OnAckFrame(const QuicAckFrame& frame) override {
70 ack_frames_.push_back(frame); 70 ack_frames_.push_back(frame);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 return visitor_->goaway_frames(); 231 return visitor_->goaway_frames();
232 } 232 }
233 233
234 const vector<QuicConnectionCloseFrame>& 234 const vector<QuicConnectionCloseFrame>&
235 SimpleQuicFramer::connection_close_frames() const { 235 SimpleQuicFramer::connection_close_frames() const {
236 return visitor_->connection_close_frames(); 236 return visitor_->connection_close_frames();
237 } 237 }
238 238
239 } // namespace test 239 } // namespace test
240 } // namespace net 240 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/test_tools/quic_test_utils.cc ('k') | net/tools/quic/chlo_extractor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698