| 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/quic_crypto_stream.h" | 5 #include "net/quic/quic_crypto_stream.h" |
| 6 #include "net/quic/quic_session.h" | 6 #include "net/quic/quic_session.h" |
| 7 | 7 |
| 8 using base::StringPiece; | 8 using base::StringPiece; |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 CloseConnection(crypto_framer_.error()); | 30 CloseConnection(crypto_framer_.error()); |
| 31 return 0; | 31 return 0; |
| 32 } | 32 } |
| 33 return data_len; | 33 return data_len; |
| 34 } | 34 } |
| 35 | 35 |
| 36 void QuicCryptoStream::CloseConnection(QuicErrorCode error) { | 36 void QuicCryptoStream::CloseConnection(QuicErrorCode error) { |
| 37 session()->connection()->SendConnectionClose(error); | 37 session()->connection()->SendConnectionClose(error); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void QuicCryptoStream::SetHandshakeComplete(QuicErrorCode error) { |
| 41 handshake_complete_ = true; |
| 42 session()->OnCryptoHandshakeComplete(error); |
| 43 } |
| 44 |
| 40 void QuicCryptoStream::SendHandshakeMessage( | 45 void QuicCryptoStream::SendHandshakeMessage( |
| 41 const CryptoHandshakeMessage& message) { | 46 const CryptoHandshakeMessage& message) { |
| 42 scoped_ptr<QuicData> data(crypto_framer_.ConstructHandshakeMessage(message)); | 47 scoped_ptr<QuicData> data(crypto_framer_.ConstructHandshakeMessage(message)); |
| 43 WriteData(string(data->data(), data->length()), false); | 48 WriteData(string(data->data(), data->length()), false); |
| 44 } | 49 } |
| 45 | 50 |
| 46 } // namespace net | 51 } // namespace net |
| OLD | NEW |