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

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

Issue 192583004: QUIC - use QuicSessionKey tuple (host, port, is_https) instead of server_hostname (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use QuicSessionKey as arg and delete server_hostname as arg Created 6 years, 9 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 11 matching lines...) Expand all
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 }; 85 };
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 QuicCryptoClientStreamFactory* crypto_client_stream_factory, 94 QuicCryptoClientStreamFactory* crypto_client_stream_factory,
94 const std::string& server_hostname, 95 const QuicSessionKey& session_key,
95 const QuicConfig& config, 96 const QuicConfig& config,
96 QuicCryptoClientConfig* crypto_config, 97 QuicCryptoClientConfig* crypto_config,
97 NetLog* net_log); 98 NetLog* net_log);
98 99
99 virtual ~QuicClientSession(); 100 virtual ~QuicClientSession();
100 101
101 void AddObserver(Observer* observer); 102 void AddObserver(Observer* observer);
102 void RemoveObserver(Observer* observer); 103 void RemoveObserver(Observer* observer);
103 104
104 // Attempts to create a new stream. If the stream can be 105 // Attempts to create a new stream. If the stream can be
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 // Number of packets read in the current read loop. 220 // Number of packets read in the current read loop.
220 size_t num_packets_read_; 221 size_t num_packets_read_;
221 base::WeakPtrFactory<QuicClientSession> weak_factory_; 222 base::WeakPtrFactory<QuicClientSession> weak_factory_;
222 223
223 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 224 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
224 }; 225 };
225 226
226 } // namespace net 227 } // namespace net
227 228
228 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ 229 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698