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

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

Issue 318993004: To mitigate the effects of hanging 0-RTT QUIC connections, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 6 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_client_session_test.cc ('k') | net/quic/quic_network_transaction_unittest.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_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/net_errors.h" 9 #include "net/base/net_errors.h"
10 #include "net/base/test_completion_callback.h" 10 #include "net/base/test_completion_callback.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 session_.reset( 207 session_.reset(
208 new QuicClientSession(connection_, 208 new QuicClientSession(connection_,
209 scoped_ptr<DatagramClientSocket>(socket), 209 scoped_ptr<DatagramClientSocket>(socket),
210 writer_.Pass(), NULL, 210 writer_.Pass(), NULL,
211 &crypto_client_stream_factory_, 211 &crypto_client_stream_factory_,
212 make_scoped_ptr((QuicServerInfo*)NULL), 212 make_scoped_ptr((QuicServerInfo*)NULL),
213 QuicServerId(kServerHostname, kServerPort, 213 QuicServerId(kServerHostname, kServerPort,
214 false, PRIVACY_MODE_DISABLED), 214 false, PRIVACY_MODE_DISABLED),
215 DefaultQuicConfig(), 215 DefaultQuicConfig(),
216 kInitialFlowControlWindowForTest, &crypto_config_, 216 kInitialFlowControlWindowForTest, &crypto_config_,
217 base::MessageLoop::current()->
218 message_loop_proxy().get(),
217 NULL)); 219 NULL));
218 session_->GetCryptoStream()->CryptoConnect(); 220 session_->GetCryptoStream()->CryptoConnect();
219 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); 221 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed());
220 stream_.reset(use_closing_stream_ ? 222 stream_.reset(use_closing_stream_ ?
221 new AutoClosingStream(session_->GetWeakPtr()) : 223 new AutoClosingStream(session_->GetWeakPtr()) :
222 new QuicHttpStream(session_->GetWeakPtr())); 224 new QuicHttpStream(session_->GetWeakPtr()));
223 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); 225 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20));
224 } 226 }
225 227
226 void SetRequest(const std::string& method, 228 void SetRequest(const std::string& method,
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 // Set Delegate to NULL and make sure EffectivePriority returns highest 611 // Set Delegate to NULL and make sure EffectivePriority returns highest
610 // priority. 612 // priority.
611 reliable_stream->SetDelegate(NULL); 613 reliable_stream->SetDelegate(NULL);
612 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, 614 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority,
613 reliable_stream->EffectivePriority()); 615 reliable_stream->EffectivePriority());
614 reliable_stream->SetDelegate(delegate); 616 reliable_stream->SetDelegate(delegate);
615 } 617 }
616 618
617 } // namespace test 619 } // namespace test
618 } // namespace net 620 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_client_session_test.cc ('k') | net/quic/quic_network_transaction_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698