| 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/chromium/quic_http_stream.h" | 5 #include "net/quic/chromium/quic_http_stream.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 session_.reset(new QuicChromiumClientSession( | 316 session_.reset(new QuicChromiumClientSession( |
| 317 connection_, std::move(socket), | 317 connection_, std::move(socket), |
| 318 /*stream_factory=*/nullptr, &crypto_client_stream_factory_, &clock_, | 318 /*stream_factory=*/nullptr, &crypto_client_stream_factory_, &clock_, |
| 319 &transport_security_state_, | 319 &transport_security_state_, |
| 320 base::WrapUnique(static_cast<QuicServerInfo*>(nullptr)), | 320 base::WrapUnique(static_cast<QuicServerInfo*>(nullptr)), |
| 321 QuicServerId(kDefaultServerHostName, kDefaultServerPort, | 321 QuicServerId(kDefaultServerHostName, kDefaultServerPort, |
| 322 PRIVACY_MODE_DISABLED), | 322 PRIVACY_MODE_DISABLED), |
| 323 kQuicYieldAfterPacketsRead, | 323 kQuicYieldAfterPacketsRead, |
| 324 QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds), | 324 QuicTime::Delta::FromMilliseconds(kQuicYieldAfterDurationMilliseconds), |
| 325 /*cert_verify_flags=*/0, DefaultQuicConfig(), &crypto_config_, | 325 /*cert_verify_flags=*/0, DefaultQuicConfig(), &crypto_config_, |
| 326 "CONNECTION_UNKNOWN", dns_start, dns_end, &push_promise_index_, | 326 "CONNECTION_UNKNOWN", dns_start, dns_end, &push_promise_index_, nullptr, |
| 327 base::ThreadTaskRunnerHandle::Get().get(), | 327 base::ThreadTaskRunnerHandle::Get().get(), |
| 328 /*socket_performance_watcher=*/nullptr, net_log_.bound().net_log())); | 328 /*socket_performance_watcher=*/nullptr, net_log_.bound().net_log())); |
| 329 session_->Initialize(); | 329 session_->Initialize(); |
| 330 TestCompletionCallback callback; | 330 TestCompletionCallback callback; |
| 331 session_->CryptoConnect(/*require_confirmation=*/false, | 331 session_->CryptoConnect(/*require_confirmation=*/false, |
| 332 callback.callback()); | 332 callback.callback()); |
| 333 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); | 333 EXPECT_TRUE(session_->IsCryptoHandshakeConfirmed()); |
| 334 stream_.reset(use_closing_stream_ | 334 stream_.reset(use_closing_stream_ |
| 335 ? new AutoClosingStream(session_->GetWeakPtr()) | 335 ? new AutoClosingStream(session_->GetWeakPtr()) |
| 336 : new QuicHttpStream(session_->GetWeakPtr())); | 336 : new QuicHttpStream(session_->GetWeakPtr())); |
| (...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2164 EXPECT_TRUE(AtEof()); | 2164 EXPECT_TRUE(AtEof()); |
| 2165 | 2165 |
| 2166 // QuicHttpStream::GetTotalSent/ReceivedBytes includes only headers. | 2166 // QuicHttpStream::GetTotalSent/ReceivedBytes includes only headers. |
| 2167 EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length), | 2167 EXPECT_EQ(static_cast<int64_t>(spdy_request_headers_frame_length), |
| 2168 stream_->GetTotalSentBytes()); | 2168 stream_->GetTotalSentBytes()); |
| 2169 EXPECT_EQ(0, stream_->GetTotalReceivedBytes()); | 2169 EXPECT_EQ(0, stream_->GetTotalReceivedBytes()); |
| 2170 } | 2170 } |
| 2171 | 2171 |
| 2172 } // namespace test | 2172 } // namespace test |
| 2173 } // namespace net | 2173 } // namespace net |
| OLD | NEW |