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

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

Issue 11364068: Add a QuicHttpStream class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make GetPeerAddress const Created 8 years, 1 month 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 #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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698