| 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 <cmath> | 5 #include <cmath> |
| 6 #include <memory> | 6 #include <memory> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 NormalSpdyTransactionHelper( | 103 NormalSpdyTransactionHelper( |
| 104 const HttpRequestInfo& request, | 104 const HttpRequestInfo& request, |
| 105 RequestPriority priority, | 105 RequestPriority priority, |
| 106 const NetLogWithSource& log, | 106 const NetLogWithSource& log, |
| 107 std::unique_ptr<SpdySessionDependencies> session_deps) | 107 std::unique_ptr<SpdySessionDependencies> session_deps) |
| 108 : request_(request), | 108 : request_(request), |
| 109 priority_(priority), | 109 priority_(priority), |
| 110 session_deps_(session_deps.get() == nullptr | 110 session_deps_(session_deps.get() == nullptr |
| 111 ? base::MakeUnique<SpdySessionDependencies>() | 111 ? base::MakeUnique<SpdySessionDependencies>() |
| 112 : std::move(session_deps)), | 112 : std::move(session_deps)), |
| 113 session_( | 113 log_(log) { |
| 114 SpdySessionDependencies::SpdyCreateSession(session_deps_.get())), | 114 session_deps_->net_log = log.net_log(); |
| 115 log_(log) {} | 115 session_ = |
| 116 SpdySessionDependencies::SpdyCreateSession(session_deps_.get()); |
| 117 } |
| 116 | 118 |
| 117 ~NormalSpdyTransactionHelper() { | 119 ~NormalSpdyTransactionHelper() { |
| 118 // Any test which doesn't close the socket by sending it an EOF will | 120 // Any test which doesn't close the socket by sending it an EOF will |
| 119 // have a valid session left open, which leaks the entire session pool. | 121 // have a valid session left open, which leaks the entire session pool. |
| 120 // This is just fine - in fact, some of our tests intentionally do this | 122 // This is just fine - in fact, some of our tests intentionally do this |
| 121 // so that we can check consistency of the SpdySessionPool as the test | 123 // so that we can check consistency of the SpdySessionPool as the test |
| 122 // finishes. If we had put an EOF on the socket, the SpdySession would | 124 // finishes. If we had put an EOF on the socket, the SpdySession would |
| 123 // have closed and we wouldn't be able to check the consistency. | 125 // have closed and we wouldn't be able to check the consistency. |
| 124 | 126 |
| 125 // Forcefully close existing sessions here. | 127 // Forcefully close existing sessions here. |
| (...skipping 6425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6551 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6553 TEST_F(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6552 std::unique_ptr<SSLSocketDataProvider> ssl_provider( | 6554 std::unique_ptr<SSLSocketDataProvider> ssl_provider( |
| 6553 new SSLSocketDataProvider(ASYNC, OK)); | 6555 new SSLSocketDataProvider(ASYNC, OK)); |
| 6554 // Set to TLS_RSA_WITH_NULL_MD5 | 6556 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6555 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6557 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6556 | 6558 |
| 6557 RunTLSUsageCheckTest(std::move(ssl_provider)); | 6559 RunTLSUsageCheckTest(std::move(ssl_provider)); |
| 6558 } | 6560 } |
| 6559 | 6561 |
| 6560 } // namespace net | 6562 } // namespace net |
| OLD | NEW |