| 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_stream_factory.h" | 5 #include "net/quic/chromium/quic_stream_factory.h" |
| 6 | 6 |
| 7 #include <openssl/aead.h> | 7 #include <openssl/aead.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 | 687 |
| 688 base::TimeDelta QuicStreamRequest::GetTimeDelayForWaitingJob() const { | 688 base::TimeDelta QuicStreamRequest::GetTimeDelayForWaitingJob() const { |
| 689 if (!factory_) | 689 if (!factory_) |
| 690 return base::TimeDelta(); | 690 return base::TimeDelta(); |
| 691 return factory_->GetTimeDelayForWaitingJob(server_id_); | 691 return factory_->GetTimeDelayForWaitingJob(server_id_); |
| 692 } | 692 } |
| 693 | 693 |
| 694 std::unique_ptr<QuicHttpStream> QuicStreamRequest::CreateStream() { | 694 std::unique_ptr<QuicHttpStream> QuicStreamRequest::CreateStream() { |
| 695 if (!session_) | 695 if (!session_) |
| 696 return nullptr; | 696 return nullptr; |
| 697 return base::WrapUnique(new QuicHttpStream(session_)); | 697 return base::MakeUnique<QuicHttpStream>(session_); |
| 698 } | 698 } |
| 699 | 699 |
| 700 std::unique_ptr<BidirectionalStreamImpl> | 700 std::unique_ptr<BidirectionalStreamImpl> |
| 701 QuicStreamRequest::CreateBidirectionalStreamImpl() { | 701 QuicStreamRequest::CreateBidirectionalStreamImpl() { |
| 702 if (!session_) | 702 if (!session_) |
| 703 return nullptr; | 703 return nullptr; |
| 704 return base::WrapUnique(new BidirectionalStreamQuicImpl(session_)); | 704 return base::MakeUnique<BidirectionalStreamQuicImpl>(session_); |
| 705 } | 705 } |
| 706 | 706 |
| 707 QuicStreamFactory::QuicStreamFactory( | 707 QuicStreamFactory::QuicStreamFactory( |
| 708 NetLog* net_log, | 708 NetLog* net_log, |
| 709 HostResolver* host_resolver, | 709 HostResolver* host_resolver, |
| 710 SSLConfigService* ssl_config_service, | 710 SSLConfigService* ssl_config_service, |
| 711 ClientSocketFactory* client_socket_factory, | 711 ClientSocketFactory* client_socket_factory, |
| 712 HttpServerProperties* http_server_properties, | 712 HttpServerProperties* http_server_properties, |
| 713 CertVerifier* cert_verifier, | 713 CertVerifier* cert_verifier, |
| 714 CTPolicyEnforcer* ct_policy_enforcer, | 714 CTPolicyEnforcer* ct_policy_enforcer, |
| (...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2057 // Since the session was active, there's no longer an | 2057 // Since the session was active, there's no longer an |
| 2058 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP | 2058 // HttpStreamFactoryImpl::Job running which can mark it broken, unless the TCP |
| 2059 // job also fails. So to avoid not using QUIC when we otherwise could, we mark | 2059 // job also fails. So to avoid not using QUIC when we otherwise could, we mark |
| 2060 // it as recently broken, which means that 0-RTT will be disabled but we'll | 2060 // it as recently broken, which means that 0-RTT will be disabled but we'll |
| 2061 // still race. | 2061 // still race. |
| 2062 http_server_properties_->MarkAlternativeServiceRecentlyBroken( | 2062 http_server_properties_->MarkAlternativeServiceRecentlyBroken( |
| 2063 alternative_service); | 2063 alternative_service); |
| 2064 } | 2064 } |
| 2065 | 2065 |
| 2066 } // namespace net | 2066 } // namespace net |
| OLD | NEW |