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

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

Issue 1025573002: QUIC - disable QUIC if packet loss rate is bad for a connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed comments for Patch Set 7 Created 5 years, 9 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/quic_connection_logger.cc ('k') | net/quic/quic_protocol.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/quic_http_stream.h" 5 #include "net/quic/quic_http_stream.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "net/base/chunked_upload_data_stream.h" 9 #include "net/base/chunked_upload_data_stream.h"
10 #include "net/base/elements_upload_data_stream.h" 10 #include "net/base/elements_upload_data_stream.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 maker_(GetParam(), connection_id_, &clock_), 138 maker_(GetParam(), connection_id_, &clock_),
139 random_generator_(0) { 139 random_generator_(0) {
140 IPAddressNumber ip; 140 IPAddressNumber ip;
141 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip)); 141 CHECK(ParseIPLiteralToNumber("192.0.2.33", &ip));
142 peer_addr_ = IPEndPoint(ip, 443); 142 peer_addr_ = IPEndPoint(ip, 443);
143 self_addr_ = IPEndPoint(ip, 8435); 143 self_addr_ = IPEndPoint(ip, 8435);
144 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); 144 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
145 } 145 }
146 146
147 ~QuicHttpStreamTest() { 147 ~QuicHttpStreamTest() {
148 session_->CloseSessionOnError(ERR_ABORTED); 148 session_->CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR);
149 for (size_t i = 0; i < writes_.size(); i++) { 149 for (size_t i = 0; i < writes_.size(); i++) {
150 delete writes_[i].packet; 150 delete writes_[i].packet;
151 } 151 }
152 } 152 }
153 153
154 // Adds a packet to the list of expected writes. 154 // Adds a packet to the list of expected writes.
155 void AddWrite(scoped_ptr<QuicEncryptedPacket> packet) { 155 void AddWrite(scoped_ptr<QuicEncryptedPacket> packet) {
156 writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release())); 156 writes_.push_back(PacketToWrite(SYNCHRONOUS, packet.release()));
157 } 157 }
158 158
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 // Set Delegate to nullptr and make sure EffectivePriority returns highest 751 // Set Delegate to nullptr and make sure EffectivePriority returns highest
752 // priority. 752 // priority.
753 reliable_stream->SetDelegate(nullptr); 753 reliable_stream->SetDelegate(nullptr);
754 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, 754 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority,
755 reliable_stream->EffectivePriority()); 755 reliable_stream->EffectivePriority());
756 reliable_stream->SetDelegate(delegate); 756 reliable_stream->SetDelegate(delegate);
757 } 757 }
758 758
759 } // namespace test 759 } // namespace test
760 } // namespace net 760 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection_logger.cc ('k') | net/quic/quic_protocol.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698