Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: net/quic/quic_crypto_stream.h

Issue 14083012: QUIC: retransmit packets with the correct encryption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved HandshakeMode enum to MockCryptoClientStream Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef NET_QUIC_QUIC_CRYPTO_STREAM_H_ 5 #ifndef NET_QUIC_QUIC_CRYPTO_STREAM_H_
6 #define NET_QUIC_QUIC_CRYPTO_STREAM_H_ 6 #define NET_QUIC_QUIC_CRYPTO_STREAM_H_
7 7
8 #include "net/quic/crypto/crypto_framer.h" 8 #include "net/quic/crypto/crypto_framer.h"
9 #include "net/quic/crypto/crypto_utils.h" 9 #include "net/quic/crypto/crypto_utils.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 24 matching lines...) Expand all
35 virtual void OnError(CryptoFramer* framer) OVERRIDE; 35 virtual void OnError(CryptoFramer* framer) OVERRIDE;
36 virtual void OnHandshakeMessage(const CryptoHandshakeMessage& message) = 0; 36 virtual void OnHandshakeMessage(const CryptoHandshakeMessage& message) = 0;
37 37
38 // ReliableQuicStream implementation 38 // ReliableQuicStream implementation
39 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE; 39 virtual uint32 ProcessData(const char* data, uint32 data_len) OVERRIDE;
40 40
41 // Sends |message| to the peer. 41 // Sends |message| to the peer.
42 // TODO(wtc): return a success/failure status. 42 // TODO(wtc): return a success/failure status.
43 void SendHandshakeMessage(const CryptoHandshakeMessage& message); 43 void SendHandshakeMessage(const CryptoHandshakeMessage& message);
44 44
45 bool handshake_complete() { return handshake_complete_; } 45 bool encryption_established() { return encryption_established_; }
46 bool handshake_confirmed() { return handshake_confirmed_; }
46 47
47 protected: 48 protected:
48 // Closes the connection 49 // Closes the connection
49 void CloseConnection(QuicErrorCode error); 50 void CloseConnection(QuicErrorCode error);
50 void CloseConnectionWithDetails(QuicErrorCode error, const string& details); 51 void CloseConnectionWithDetails(QuicErrorCode error, const string& details);
51 52
52 void SetHandshakeComplete(QuicErrorCode error); 53 bool encryption_established_;
54 bool handshake_confirmed_;
53 55
54 private: 56 private:
55 CryptoFramer crypto_framer_; 57 CryptoFramer crypto_framer_;
56 bool handshake_complete_;
57 58
58 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream); 59 DISALLOW_COPY_AND_ASSIGN(QuicCryptoStream);
59 }; 60 };
60 61
61 } // namespace net 62 } // namespace net
62 63
63 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_ 64 #endif // NET_QUIC_QUIC_CRYPTO_STREAM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698