| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/quic/crypto/crypto_protocol.h" | 8 #include "net/quic/crypto/crypto_protocol.h" |
| 9 #include "net/quic/crypto/proof_verifier_chromium.h" | 9 #include "net/quic/crypto/proof_verifier_chromium.h" |
| 10 #include "net/quic/quic_server_id.h" | 10 #include "net/quic/quic_server_id.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 DVLOG(1) << "Failed to create a new outgoing stream. " | 51 DVLOG(1) << "Failed to create a new outgoing stream. " |
| 52 << "Already received goaway."; | 52 << "Already received goaway."; |
| 53 return nullptr; | 53 return nullptr; |
| 54 } | 54 } |
| 55 QuicSpdyClientStream* stream = CreateClientStream(); | 55 QuicSpdyClientStream* stream = CreateClientStream(); |
| 56 ActivateStream(stream); | 56 ActivateStream(stream); |
| 57 return stream; | 57 return stream; |
| 58 } | 58 } |
| 59 | 59 |
| 60 QuicSpdyClientStream* QuicClientSession::CreateClientStream() { | 60 QuicSpdyClientStream* QuicClientSession::CreateClientStream() { |
| 61 return new QuicSpdyClientStream(GetNextStreamId(), this); | 61 return new QuicSpdyClientStream(GetNextOutgoingStreamId(), this); |
| 62 } | 62 } |
| 63 | 63 |
| 64 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { | 64 QuicCryptoClientStream* QuicClientSession::GetCryptoStream() { |
| 65 return crypto_stream_.get(); | 65 return crypto_stream_.get(); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void QuicClientSession::CryptoConnect() { | 68 void QuicClientSession::CryptoConnect() { |
| 69 DCHECK(flow_controller()); | 69 DCHECK(flow_controller()); |
| 70 crypto_stream_->CryptoConnect(); | 70 crypto_stream_->CryptoConnect(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 int QuicClientSession::GetNumSentClientHellos() const { | 73 int QuicClientSession::GetNumSentClientHellos() const { |
| 74 return crypto_stream_->num_sent_client_hellos(); | 74 return crypto_stream_->num_sent_client_hellos(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 QuicSpdyStream* QuicClientSession::CreateIncomingDynamicStream( | 77 QuicSpdyStream* QuicClientSession::CreateIncomingDynamicStream( |
| 78 QuicStreamId id) { | 78 QuicStreamId id) { |
| 79 DLOG(ERROR) << "Server push not supported"; | 79 DLOG(ERROR) << "Server push not supported"; |
| 80 return nullptr; | 80 return nullptr; |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace tools | 83 } // namespace tools |
| 84 } // namespace net | 84 } // namespace net |
| OLD | NEW |