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/tools/quic/quic_client_session.h" | 5 #include "net/tools/quic/quic_client_session.h" |
6 | 6 |
7 #include "net/log/net_log_with_source.h" | 7 #include "net/log/net_log_with_source.h" |
8 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" | 8 #include "net/quic/chromium/crypto/proof_verifier_chromium.h" |
9 #include "net/quic/core/crypto/crypto_protocol.h" | 9 #include "net/quic/core/crypto/crypto_protocol.h" |
10 #include "net/quic/core/quic_server_id.h" | 10 #include "net/quic/core/quic_server_id.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 stream->SetPriority(priority); | 68 stream->SetPriority(priority); |
69 QuicSpdyClientStream* stream_ptr = stream.get(); | 69 QuicSpdyClientStream* stream_ptr = stream.get(); |
70 ActivateStream(std::move(stream)); | 70 ActivateStream(std::move(stream)); |
71 return stream_ptr; | 71 return stream_ptr; |
72 } | 72 } |
73 | 73 |
74 std::unique_ptr<QuicSpdyClientStream> QuicClientSession::CreateClientStream() { | 74 std::unique_ptr<QuicSpdyClientStream> QuicClientSession::CreateClientStream() { |
75 return QuicMakeUnique<QuicSpdyClientStream>(GetNextOutgoingStreamId(), this); | 75 return QuicMakeUnique<QuicSpdyClientStream>(GetNextOutgoingStreamId(), this); |
76 } | 76 } |
77 | 77 |
78 QuicCryptoClientStreamBase* QuicClientSession::GetCryptoStream() { | 78 QuicCryptoClientStreamBase* QuicClientSession::GetMutableCryptoStream() { |
79 return crypto_stream_.get(); | 79 return crypto_stream_.get(); |
80 } | 80 } |
81 | 81 |
| 82 const QuicCryptoClientStreamBase* QuicClientSession::GetCryptoStream() const { |
| 83 return crypto_stream_.get(); |
| 84 } |
| 85 |
82 void QuicClientSession::CryptoConnect() { | 86 void QuicClientSession::CryptoConnect() { |
83 DCHECK(flow_controller()); | 87 DCHECK(flow_controller()); |
84 crypto_stream_->CryptoConnect(); | 88 crypto_stream_->CryptoConnect(); |
85 } | 89 } |
86 | 90 |
87 int QuicClientSession::GetNumSentClientHellos() const { | 91 int QuicClientSession::GetNumSentClientHellos() const { |
88 return crypto_stream_->num_sent_client_hellos(); | 92 return crypto_stream_->num_sent_client_hellos(); |
89 } | 93 } |
90 | 94 |
91 int QuicClientSession::GetNumReceivedServerConfigUpdates() const { | 95 int QuicClientSession::GetNumReceivedServerConfigUpdates() const { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 return QuicMakeUnique<QuicCryptoClientStream>( | 132 return QuicMakeUnique<QuicCryptoClientStream>( |
129 server_id_, this, new ProofVerifyContextChromium(0, NetLogWithSource()), | 133 server_id_, this, new ProofVerifyContextChromium(0, NetLogWithSource()), |
130 crypto_config_, this); | 134 crypto_config_, this); |
131 } | 135 } |
132 | 136 |
133 bool QuicClientSession::IsAuthorized(const string& authority) { | 137 bool QuicClientSession::IsAuthorized(const string& authority) { |
134 return true; | 138 return true; |
135 } | 139 } |
136 | 140 |
137 } // namespace net | 141 } // namespace net |
OLD | NEW |