| 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/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_bug_tracker.h" |
| 10 #include "net/quic/core/quic_server_id.h" | 11 #include "net/quic/core/quic_server_id.h" |
| 11 #include "net/tools/quic/quic_spdy_client_stream.h" | 12 #include "net/tools/quic/quic_spdy_client_stream.h" |
| 12 | 13 |
| 13 using std::string; | 14 using std::string; |
| 14 | 15 |
| 15 namespace net { | 16 namespace net { |
| 16 | 17 |
| 17 QuicClientSession::QuicClientSession( | 18 QuicClientSession::QuicClientSession( |
| 18 const QuicConfig& config, | 19 const QuicConfig& config, |
| 19 QuicConnection* connection, | 20 QuicConnection* connection, |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 int QuicClientSession::GetNumSentClientHellos() const { | 84 int QuicClientSession::GetNumSentClientHellos() const { |
| 84 return crypto_stream_->num_sent_client_hellos(); | 85 return crypto_stream_->num_sent_client_hellos(); |
| 85 } | 86 } |
| 86 | 87 |
| 87 int QuicClientSession::GetNumReceivedServerConfigUpdates() const { | 88 int QuicClientSession::GetNumReceivedServerConfigUpdates() const { |
| 88 return crypto_stream_->num_scup_messages_received(); | 89 return crypto_stream_->num_scup_messages_received(); |
| 89 } | 90 } |
| 90 | 91 |
| 91 bool QuicClientSession::ShouldCreateIncomingDynamicStream(QuicStreamId id) { | 92 bool QuicClientSession::ShouldCreateIncomingDynamicStream(QuicStreamId id) { |
| 92 if (!connection()->connected()) { | 93 if (!connection()->connected()) { |
| 93 LOG(DFATAL) << "ShouldCreateIncomingDynamicStream called when disconnected"; | 94 QUIC_BUG << "ShouldCreateIncomingDynamicStream called when disconnected"; |
| 94 return false; | 95 return false; |
| 95 } | 96 } |
| 96 if (goaway_received() && respect_goaway_) { | 97 if (goaway_received() && respect_goaway_) { |
| 97 DVLOG(1) << "Failed to create a new outgoing stream. " | 98 DVLOG(1) << "Failed to create a new outgoing stream. " |
| 98 << "Already received goaway."; | 99 << "Already received goaway."; |
| 99 return false; | 100 return false; |
| 100 } | 101 } |
| 101 if (id % 2 != 0) { | 102 if (id % 2 != 0) { |
| 102 LOG(WARNING) << "Received invalid push stream id " << id; | 103 LOG(WARNING) << "Received invalid push stream id " << id; |
| 103 connection()->CloseConnection( | 104 connection()->CloseConnection( |
| (...skipping 19 matching lines...) Expand all Loading... |
| 123 return new QuicCryptoClientStream( | 124 return new QuicCryptoClientStream( |
| 124 server_id_, this, new ProofVerifyContextChromium(0, BoundNetLog()), | 125 server_id_, this, new ProofVerifyContextChromium(0, BoundNetLog()), |
| 125 crypto_config_, this); | 126 crypto_config_, this); |
| 126 } | 127 } |
| 127 | 128 |
| 128 bool QuicClientSession::IsAuthorized(const string& authority) { | 129 bool QuicClientSession::IsAuthorized(const string& authority) { |
| 129 return true; | 130 return true; |
| 130 } | 131 } |
| 131 | 132 |
| 132 } // namespace net | 133 } // namespace net |
| OLD | NEW |