OLD | NEW |
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 connection_->SetSendAlgorithm(send_algorithm_); | 202 connection_->SetSendAlgorithm(send_algorithm_); |
203 connection_->SetReceiveAlgorithm(receive_algorithm_); | 203 connection_->SetReceiveAlgorithm(receive_algorithm_); |
204 crypto_config_.SetDefaults(); | 204 crypto_config_.SetDefaults(); |
205 session_.reset( | 205 session_.reset( |
206 new QuicClientSession(connection_, | 206 new QuicClientSession(connection_, |
207 scoped_ptr<DatagramClientSocket>(socket), | 207 scoped_ptr<DatagramClientSocket>(socket), |
208 writer_.Pass(), NULL, | 208 writer_.Pass(), NULL, |
209 &crypto_client_stream_factory_, | 209 &crypto_client_stream_factory_, |
210 make_scoped_ptr((QuicServerInfo*)NULL), | 210 make_scoped_ptr((QuicServerInfo*)NULL), |
211 QuicSessionKey(kServerHostname, kServerPort, | 211 QuicSessionKey(kServerHostname, kServerPort, |
212 false, PRIVACY_MODE_DISABLED), | 212 false, kPrivacyModeDisabled), |
213 DefaultQuicConfig(), &crypto_config_, NULL)); | 213 DefaultQuicConfig(), &crypto_config_, NULL)); |
214 session_->GetCryptoStream()->CryptoConnect(); | 214 session_->GetCryptoStream()->CryptoConnect(); |
215 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); | 215 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); |
216 stream_.reset(use_closing_stream_ ? | 216 stream_.reset(use_closing_stream_ ? |
217 new AutoClosingStream(session_->GetWeakPtr()) : | 217 new AutoClosingStream(session_->GetWeakPtr()) : |
218 new QuicHttpStream(session_->GetWeakPtr())); | 218 new QuicHttpStream(session_->GetWeakPtr())); |
219 } | 219 } |
220 | 220 |
221 void SetRequest(const std::string& method, | 221 void SetRequest(const std::string& method, |
222 const std::string& path, | 222 const std::string& path, |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 // Set Delegate to NULL and make sure EffectivePriority returns highest | 611 // Set Delegate to NULL and make sure EffectivePriority returns highest |
612 // priority. | 612 // priority. |
613 reliable_stream->SetDelegate(NULL); | 613 reliable_stream->SetDelegate(NULL); |
614 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 614 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
615 reliable_stream->EffectivePriority()); | 615 reliable_stream->EffectivePriority()); |
616 reliable_stream->SetDelegate(delegate); | 616 reliable_stream->SetDelegate(delegate); |
617 } | 617 } |
618 | 618 |
619 } // namespace test | 619 } // namespace test |
620 } // namespace net | 620 } // namespace net |
OLD | NEW |