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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 connection_id_, peer_addr_, | 221 connection_id_, peer_addr_, |
222 helper_.get(), writer_factory); | 222 helper_.get(), writer_factory); |
223 connection_->set_visitor(&visitor_); | 223 connection_->set_visitor(&visitor_); |
224 connection_->SetSendAlgorithm(send_algorithm_); | 224 connection_->SetSendAlgorithm(send_algorithm_); |
225 connection_->SetReceiveAlgorithm(receive_algorithm_); | 225 connection_->SetReceiveAlgorithm(receive_algorithm_); |
226 crypto_config_.SetDefaults(); | 226 crypto_config_.SetDefaults(); |
227 session_.reset( | 227 session_.reset( |
228 new QuicClientSession(connection_, | 228 new QuicClientSession(connection_, |
229 scoped_ptr<DatagramClientSocket>(socket), | 229 scoped_ptr<DatagramClientSocket>(socket), |
230 NULL, | 230 NULL, |
231 &crypto_client_stream_factory_, | |
232 &transport_security_state_, | 231 &transport_security_state_, |
233 make_scoped_ptr((QuicServerInfo*)NULL), | 232 make_scoped_ptr((QuicServerInfo*)NULL), |
234 QuicServerId(kServerHostname, kServerPort, | 233 DefaultQuicConfig(), |
235 false, PRIVACY_MODE_DISABLED), | |
236 DefaultQuicConfig(), &crypto_config_, | |
237 base::MessageLoop::current()-> | 234 base::MessageLoop::current()-> |
238 message_loop_proxy().get(), | 235 message_loop_proxy().get(), |
239 NULL)); | 236 NULL)); |
240 session_->InitializeSession(); | 237 session_->InitializeSession(QuicServerId(kServerHostname, kServerPort, |
| 238 false, PRIVACY_MODE_DISABLED), |
| 239 &crypto_config_, |
| 240 &crypto_client_stream_factory_); |
241 session_->GetCryptoStream()->CryptoConnect(); | 241 session_->GetCryptoStream()->CryptoConnect(); |
242 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); | 242 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); |
243 stream_.reset(use_closing_stream_ ? | 243 stream_.reset(use_closing_stream_ ? |
244 new AutoClosingStream(session_->GetWeakPtr()) : | 244 new AutoClosingStream(session_->GetWeakPtr()) : |
245 new QuicHttpStream(session_->GetWeakPtr())); | 245 new QuicHttpStream(session_->GetWeakPtr())); |
246 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); | 246 clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(20)); |
247 } | 247 } |
248 | 248 |
249 void SetRequest(const std::string& method, | 249 void SetRequest(const std::string& method, |
250 const std::string& path, | 250 const std::string& path, |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 // Set Delegate to NULL and make sure EffectivePriority returns highest | 731 // Set Delegate to NULL and make sure EffectivePriority returns highest |
732 // priority. | 732 // priority. |
733 reliable_stream->SetDelegate(NULL); | 733 reliable_stream->SetDelegate(NULL); |
734 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 734 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
735 reliable_stream->EffectivePriority()); | 735 reliable_stream->EffectivePriority()); |
736 reliable_stream->SetDelegate(delegate); | 736 reliable_stream->SetDelegate(delegate); |
737 } | 737 } |
738 | 738 |
739 } // namespace test | 739 } // namespace test |
740 } // namespace net | 740 } // namespace net |
OLD | NEW |