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

Side by Side Diff: net/quic/quic_packet_generator_test.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/server/http_server.cc » ('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/quic_packet_generator.h" 5 #include "net/quic/quic_packet_generator.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "net/quic/crypto/crypto_protocol.h" 9 #include "net/quic/crypto/crypto_protocol.h"
10 #include "net/quic/crypto/null_encrypter.h" 10 #include "net/quic/crypto/null_encrypter.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 frame->type = kFixRate; 113 frame->type = kFixRate;
114 frame->fix_rate.bitrate = QuicBandwidth::FromBytesPerSecond(42); 114 frame->fix_rate.bitrate = QuicBandwidth::FromBytesPerSecond(42);
115 return frame; 115 return frame;
116 } 116 }
117 117
118 QuicRstStreamFrame* CreateRstStreamFrame() { 118 QuicRstStreamFrame* CreateRstStreamFrame() {
119 return new QuicRstStreamFrame(1, QUIC_STREAM_NO_ERROR); 119 return new QuicRstStreamFrame(1, QUIC_STREAM_NO_ERROR);
120 } 120 }
121 121
122 QuicGoAwayFrame* CreateGoAwayFrame() { 122 QuicGoAwayFrame* CreateGoAwayFrame() {
123 return new QuicGoAwayFrame(QUIC_NO_ERROR, 1, ""); 123 return new QuicGoAwayFrame(QUIC_NO_ERROR, 1, std::string());
124 } 124 }
125 125
126 void CheckPacketContains(const PacketContents& contents, 126 void CheckPacketContains(const PacketContents& contents,
127 const SerializedPacket& packet) { 127 const SerializedPacket& packet) {
128 size_t num_retransmittable_frames = contents.num_connection_close_frames + 128 size_t num_retransmittable_frames = contents.num_connection_close_frames +
129 contents.num_goaway_frames + contents.num_rst_stream_frames + 129 contents.num_goaway_frames + contents.num_rst_stream_frames +
130 contents.num_stream_frames; 130 contents.num_stream_frames;
131 size_t num_frames = contents.num_feedback_frames + contents.num_ack_frames + 131 size_t num_frames = contents.num_feedback_frames + contents.num_ack_frames +
132 num_retransmittable_frames; 132 num_retransmittable_frames;
133 133
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 505
506 // The second should have the remainder of the stream data. 506 // The second should have the remainder of the stream data.
507 PacketContents contents2; 507 PacketContents contents2;
508 contents2.num_goaway_frames = 1; 508 contents2.num_goaway_frames = 1;
509 contents2.num_stream_frames = 1; 509 contents2.num_stream_frames = 1;
510 CheckPacketContains(contents2, packet2_); 510 CheckPacketContains(contents2, packet2_);
511 } 511 }
512 512
513 } // namespace test 513 } // namespace test
514 } // namespace net 514 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/server/http_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698