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

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

Issue 11696010: Integrate QUIC info into net-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 // A client specific QuicSession subclass. This class owns the underlying 5 // A client specific QuicSession subclass. This class owns the underlying
6 // QuicConnection and QuicConnectionHelper objects. The connection stores 6 // QuicConnection and QuicConnectionHelper objects. The connection stores
7 // a non-owning pointer to the helper so this session needs to ensure that 7 // a non-owning pointer to the helper so this session needs to ensure that
8 // the helper outlives the connection. 8 // the helper outlives the connection.
9 9
10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_ 10 #ifndef NET_QUIC_QUIC_CLIENT_SESSION_H_
(...skipping 27 matching lines...) Expand all
38 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE; 38 virtual void CloseStream(QuicStreamId stream_id) OVERRIDE;
39 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE; 39 virtual void OnCryptoHandshakeComplete(QuicErrorCode error) OVERRIDE;
40 40
41 // Perform a crypto handshake with the server. 41 // Perform a crypto handshake with the server.
42 int CryptoConnect(const CompletionCallback& callback); 42 int CryptoConnect(const CompletionCallback& callback);
43 43
44 // Causes the QuicConnectionHelper to start reading from the socket 44 // Causes the QuicConnectionHelper to start reading from the socket
45 // and passing the data along to the QuicConnection. 45 // and passing the data along to the QuicConnection.
46 void StartReading(); 46 void StartReading();
47 47
48 base::Value* GetInfoAsValue(const HostPortPair& pair) const;
49
48 protected: 50 protected:
49 // QuicSession methods: 51 // QuicSession methods:
50 virtual ReliableQuicStream* CreateIncomingReliableStream( 52 virtual ReliableQuicStream* CreateIncomingReliableStream(
51 QuicStreamId id) OVERRIDE; 53 QuicStreamId id) OVERRIDE;
52 54
53 private: 55 private:
54 // A completion callback invoked when a read completes. 56 // A completion callback invoked when a read completes.
55 void OnReadComplete(int result); 57 void OnReadComplete(int result);
56 58
57 base::WeakPtrFactory<QuicClientSession> weak_factory_; 59 base::WeakPtrFactory<QuicClientSession> weak_factory_;
58 QuicCryptoClientStream crypto_stream_; 60 QuicCryptoClientStream crypto_stream_;
59 scoped_ptr<QuicConnectionHelper> helper_; 61 scoped_ptr<QuicConnectionHelper> helper_;
60 QuicStreamFactory* stream_factory_; 62 QuicStreamFactory* stream_factory_;
61 scoped_refptr<IOBufferWithSize> read_buffer_; 63 scoped_refptr<IOBufferWithSize> read_buffer_;
62 bool read_pending_; 64 bool read_pending_;
63 CompletionCallback callback_; 65 CompletionCallback callback_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 67 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
66 }; 68 };
67 69
68 } // namespace net 70 } // namespace net
69 71
70 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ 72 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698