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_chromium_client_session.h" | 5 #include "net/quic/quic_chromium_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" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/thread_task_runner_handle.h" |
| 13 #include "net/base/socket_performance_watcher.h" |
13 #include "net/base/test_completion_callback.h" | 14 #include "net/base/test_completion_callback.h" |
14 #include "net/base/test_data_directory.h" | 15 #include "net/base/test_data_directory.h" |
15 #include "net/cert/cert_verify_result.h" | 16 #include "net/cert/cert_verify_result.h" |
16 #include "net/http/transport_security_state.h" | 17 #include "net/http/transport_security_state.h" |
17 #include "net/log/test_net_log.h" | 18 #include "net/log/test_net_log.h" |
18 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" | 19 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" |
19 #include "net/quic/crypto/crypto_protocol.h" | 20 #include "net/quic/crypto/crypto_protocol.h" |
20 #include "net/quic/crypto/proof_verifier_chromium.h" | 21 #include "net/quic/crypto/proof_verifier_chromium.h" |
21 #include "net/quic/crypto/quic_decrypter.h" | 22 #include "net/quic/crypto/quic_decrypter.h" |
22 #include "net/quic/crypto/quic_encrypter.h" | 23 #include "net/quic/crypto/quic_encrypter.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 QuicServerId(kServerHostname, | 56 QuicServerId(kServerHostname, |
56 kServerPort, | 57 kServerPort, |
57 /*is_secure=*/false, | 58 /*is_secure=*/false, |
58 PRIVACY_MODE_DISABLED), | 59 PRIVACY_MODE_DISABLED), |
59 /*cert_verify_flags=*/0, | 60 /*cert_verify_flags=*/0, |
60 DefaultQuicConfig(), | 61 DefaultQuicConfig(), |
61 &crypto_config_, | 62 &crypto_config_, |
62 "CONNECTION_UNKNOWN", | 63 "CONNECTION_UNKNOWN", |
63 base::TimeTicks::Now(), | 64 base::TimeTicks::Now(), |
64 base::ThreadTaskRunnerHandle::Get().get(), | 65 base::ThreadTaskRunnerHandle::Get().get(), |
| 66 /*socket_performance_watcher=*/nullptr, |
65 &net_log_) { | 67 &net_log_) { |
66 session_.Initialize(); | 68 session_.Initialize(); |
67 // Advance the time, because timers do not like uninitialized times. | 69 // Advance the time, because timers do not like uninitialized times. |
68 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); | 70 connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1)); |
69 } | 71 } |
70 | 72 |
71 void TearDown() override { | 73 void TearDown() override { |
72 session_.CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR); | 74 session_.CloseSessionOnError(ERR_ABORTED, QUIC_INTERNAL_ERROR); |
73 } | 75 } |
74 | 76 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 session_.OnProofVerifyDetailsAvailable(details); | 243 session_.OnProofVerifyDetailsAvailable(details); |
242 CompleteCryptoHandshake(); | 244 CompleteCryptoHandshake(); |
243 QuicChromiumClientSessionPeer::SetChannelIDSent(&session_, true); | 245 QuicChromiumClientSessionPeer::SetChannelIDSent(&session_, true); |
244 | 246 |
245 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED)); | 247 EXPECT_TRUE(session_.CanPool("mail.example.org", PRIVACY_MODE_DISABLED)); |
246 } | 248 } |
247 | 249 |
248 } // namespace | 250 } // namespace |
249 } // namespace test | 251 } // namespace test |
250 } // namespace net | 252 } // namespace net |
OLD | NEW |