| 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_client_session.h" | 5 #include "net/quic/quic_client_session.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 make_scoped_ptr((QuicServerInfo*)nullptr), DefaultQuicConfig(), | 48 make_scoped_ptr((QuicServerInfo*)nullptr), DefaultQuicConfig(), |
| 49 base::MessageLoop::current()->message_loop_proxy().get(), | 49 base::MessageLoop::current()->message_loop_proxy().get(), |
| 50 &net_log_) { | 50 &net_log_) { |
| 51 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, false, | 51 session_.InitializeSession(QuicServerId(kServerHostname, kServerPort, false, |
| 52 PRIVACY_MODE_DISABLED), | 52 PRIVACY_MODE_DISABLED), |
| 53 &crypto_config_, nullptr); | 53 &crypto_config_, nullptr); |
| 54 session_.config()->SetDefaults(); | 54 session_.config()->SetDefaults(); |
| 55 crypto_config_.SetDefaults(); | 55 crypto_config_.SetDefaults(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 virtual void TearDown() OVERRIDE { | 58 virtual void TearDown() override { |
| 59 session_.CloseSessionOnError(ERR_ABORTED); | 59 session_.CloseSessionOnError(ERR_ABORTED); |
| 60 } | 60 } |
| 61 | 61 |
| 62 scoped_ptr<DatagramClientSocket> GetSocket() { | 62 scoped_ptr<DatagramClientSocket> GetSocket() { |
| 63 socket_factory_.AddSocketDataProvider(&socket_data_); | 63 socket_factory_.AddSocketDataProvider(&socket_data_); |
| 64 return socket_factory_.CreateDatagramClientSocket( | 64 return socket_factory_.CreateDatagramClientSocket( |
| 65 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt), | 65 DatagramSocket::DEFAULT_BIND, base::Bind(&base::RandInt), |
| 66 &net_log_, NetLog::Source()); | 66 &net_log_, NetLog::Source()); |
| 67 } | 67 } |
| 68 | 68 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 session_.OnProofVerifyDetailsAvailable(details); | 226 session_.OnProofVerifyDetailsAvailable(details); |
| 227 CompleteCryptoHandshake(); | 227 CompleteCryptoHandshake(); |
| 228 QuicClientSessionPeer::SetChannelIDSent(&session_, true); | 228 QuicClientSessionPeer::SetChannelIDSent(&session_, true); |
| 229 | 229 |
| 230 EXPECT_TRUE(session_.CanPool("mail.example.org")); | 230 EXPECT_TRUE(session_.CanPool("mail.example.org")); |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace | 233 } // namespace |
| 234 } // namespace test | 234 } // namespace test |
| 235 } // namespace net | 235 } // namespace net |
| OLD | NEW |