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/core/quic_crypto_client_stream.h" | 5 #include "net/quic/core/quic_crypto_client_stream.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/metrics/histogram_macros.h" | 9 #include "base/metrics/histogram_macros.h" |
10 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // Do not process handshake messages after the handshake is confirmed. | 136 // Do not process handshake messages after the handshake is confirmed. |
137 if (handshake_confirmed()) { | 137 if (handshake_confirmed()) { |
138 CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, | 138 CloseConnectionWithDetails(QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, |
139 "Unexpected handshake message"); | 139 "Unexpected handshake message"); |
140 return; | 140 return; |
141 } | 141 } |
142 | 142 |
143 DoHandshakeLoop(&message); | 143 DoHandshakeLoop(&message); |
144 } | 144 } |
145 | 145 |
146 void QuicCryptoClientStream::CryptoConnect() { | 146 bool QuicCryptoClientStream::CryptoConnect() { |
147 next_state_ = STATE_INITIALIZE; | 147 next_state_ = STATE_INITIALIZE; |
148 DoHandshakeLoop(nullptr); | 148 DoHandshakeLoop(nullptr); |
| 149 return session()->connection()->connected(); |
149 } | 150 } |
150 | 151 |
151 int QuicCryptoClientStream::num_sent_client_hellos() const { | 152 int QuicCryptoClientStream::num_sent_client_hellos() const { |
152 return num_client_hellos_; | 153 return num_client_hellos_; |
153 } | 154 } |
154 | 155 |
155 int QuicCryptoClientStream::num_scup_messages_received() const { | 156 int QuicCryptoClientStream::num_scup_messages_received() const { |
156 return num_scup_messages_received_; | 157 return num_scup_messages_received_; |
157 } | 158 } |
158 | 159 |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
670 } | 671 } |
671 for (size_t i = 0; i < num_their_proof_demands; i++) { | 672 for (size_t i = 0; i < num_their_proof_demands; i++) { |
672 if (their_proof_demands[i] == kCHID) { | 673 if (their_proof_demands[i] == kCHID) { |
673 return true; | 674 return true; |
674 } | 675 } |
675 } | 676 } |
676 return false; | 677 return false; |
677 } | 678 } |
678 | 679 |
679 } // namespace net | 680 } // namespace net |
OLD | NEW |