Chromium Code Reviews| 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 // 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 11 matching lines...) Expand all Loading... | |
| 22 #include "net/quic/quic_protocol.h" | 22 #include "net/quic/quic_protocol.h" |
| 23 #include "net/quic/quic_reliable_client_stream.h" | 23 #include "net/quic/quic_reliable_client_stream.h" |
| 24 #include "net/quic/quic_session.h" | 24 #include "net/quic/quic_session.h" |
| 25 | 25 |
| 26 namespace net { | 26 namespace net { |
| 27 | 27 |
| 28 class DatagramClientSocket; | 28 class DatagramClientSocket; |
| 29 class QuicConnectionHelper; | 29 class QuicConnectionHelper; |
| 30 class QuicCryptoClientStreamFactory; | 30 class QuicCryptoClientStreamFactory; |
| 31 class QuicDefaultPacketWriter; | 31 class QuicDefaultPacketWriter; |
| 32 class QuicSessionKey; | |
| 32 class QuicStreamFactory; | 33 class QuicStreamFactory; |
| 33 class SSLInfo; | 34 class SSLInfo; |
| 34 | 35 |
| 35 namespace test { | 36 namespace test { |
| 36 class QuicClientSessionPeer; | 37 class QuicClientSessionPeer; |
| 37 } // namespace test | 38 } // namespace test |
| 38 | 39 |
| 39 class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession { | 40 class NET_EXPORT_PRIVATE QuicClientSession : public QuicSession { |
| 40 public: | 41 public: |
| 41 // An interface for observing events on a session. | 42 // An interface for observing events on a session. |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 | 86 |
| 86 // Constructs a new session which will own |connection| and |helper|, but | 87 // Constructs a new session which will own |connection| and |helper|, but |
| 87 // not |stream_factory|, which must outlive this session. | 88 // not |stream_factory|, which must outlive this session. |
| 88 // TODO(rch): decouple the factory from the session via a Delegate interface. | 89 // TODO(rch): decouple the factory from the session via a Delegate interface. |
| 89 QuicClientSession(QuicConnection* connection, | 90 QuicClientSession(QuicConnection* connection, |
| 90 scoped_ptr<DatagramClientSocket> socket, | 91 scoped_ptr<DatagramClientSocket> socket, |
| 91 scoped_ptr<QuicDefaultPacketWriter> writer, | 92 scoped_ptr<QuicDefaultPacketWriter> writer, |
| 92 QuicStreamFactory* stream_factory, | 93 QuicStreamFactory* stream_factory, |
| 93 scoped_ptr<QuicServerInfo> server_info, | 94 scoped_ptr<QuicServerInfo> server_info, |
| 94 QuicCryptoClientStreamFactory* crypto_client_stream_factory, | 95 QuicCryptoClientStreamFactory* crypto_client_stream_factory, |
| 95 const std::string& server_hostname, | 96 const QuicSessionKey& server_key, |
|
wtc
2014/03/17 17:13:21
Nit: server_info and server_key probably should be
ramant (doing other things)
2014/03/17 18:27:36
Fixed it in https://codereview.chromium.org/202143
| |
| 96 const QuicConfig& config, | 97 const QuicConfig& config, |
| 97 QuicCryptoClientConfig* crypto_config, | 98 QuicCryptoClientConfig* crypto_config, |
| 98 NetLog* net_log); | 99 NetLog* net_log); |
| 99 | 100 |
| 100 virtual ~QuicClientSession(); | 101 virtual ~QuicClientSession(); |
| 101 | 102 |
| 102 void AddObserver(Observer* observer); | 103 void AddObserver(Observer* observer); |
| 103 void RemoveObserver(Observer* observer); | 104 void RemoveObserver(Observer* observer); |
| 104 | 105 |
| 105 // Attempts to create a new stream. If the stream can be | 106 // Attempts to create a new stream. If the stream can be |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 220 // Number of packets read in the current read loop. | 221 // Number of packets read in the current read loop. |
| 221 size_t num_packets_read_; | 222 size_t num_packets_read_; |
| 222 base::WeakPtrFactory<QuicClientSession> weak_factory_; | 223 base::WeakPtrFactory<QuicClientSession> weak_factory_; |
| 223 | 224 |
| 224 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); | 225 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); |
| 225 }; | 226 }; |
| 226 | 227 |
| 227 } // namespace net | 228 } // namespace net |
| 228 | 229 |
| 229 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ | 230 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ |
| OLD | NEW |