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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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
« no previous file with comments | « net/quic/quic_ack_notifier_test.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 base::WeakPtr<QuicClientSession> GetWeakPtr(); 168 base::WeakPtr<QuicClientSession> GetWeakPtr();
169 169
170 // Returns the number of client hello messages that have been sent on the 170 // Returns the number of client hello messages that have been sent on the
171 // crypto stream. If the handshake has completed then this is one greater 171 // crypto stream. If the handshake has completed then this is one greater
172 // than the number of round-trips needed for the handshake. 172 // than the number of round-trips needed for the handshake.
173 int GetNumSentClientHellos() const; 173 int GetNumSentClientHellos() const;
174 174
175 // Returns true if |hostname| may be pooled onto this session. If this 175 // Returns true if |hostname| may be pooled onto this session. If this
176 // is a secure QUIC session, then |hostname| must match the certificate 176 // is a secure QUIC session, then |hostname| must match the certificate
177 // presented during the handshake. 177 // presented during the handshake.
178 bool CanPool(const std::string& hostname) const; 178 bool CanPool(const std::string& hostname, PrivacyMode privacy_mode) const;
179
180 const QuicServerId& server_id() const { return server_id_; }
179 181
180 protected: 182 protected:
181 // QuicSession methods: 183 // QuicSession methods:
182 QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override; 184 QuicDataStream* CreateIncomingDataStream(QuicStreamId id) override;
183 185
184 private: 186 private:
185 friend class test::QuicClientSessionPeer; 187 friend class test::QuicClientSessionPeer;
186 188
187 typedef std::set<Observer*> ObserverSet; 189 typedef std::set<Observer*> ObserverSet;
188 typedef std::list<StreamRequest*> StreamRequestQueue; 190 typedef std::list<StreamRequest*> StreamRequestQueue;
(...skipping 23 matching lines...) Expand all
212 214
213 // Posts a task to notify the factory that this session has been closed. 215 // Posts a task to notify the factory that this session has been closed.
214 void NotifyFactoryOfSessionClosedLater(); 216 void NotifyFactoryOfSessionClosedLater();
215 217
216 // Notifies the factory that this session has been closed which will 218 // Notifies the factory that this session has been closed which will
217 // delete |this|. 219 // delete |this|.
218 void NotifyFactoryOfSessionClosed(); 220 void NotifyFactoryOfSessionClosed();
219 221
220 void OnConnectTimeout(); 222 void OnConnectTimeout();
221 223
222 HostPortPair server_host_port_; 224 QuicServerId server_id_;
223 bool require_confirmation_; 225 bool require_confirmation_;
224 scoped_ptr<QuicCryptoClientStream> crypto_stream_; 226 scoped_ptr<QuicCryptoClientStream> crypto_stream_;
225 QuicStreamFactory* stream_factory_; 227 QuicStreamFactory* stream_factory_;
226 scoped_ptr<DatagramClientSocket> socket_; 228 scoped_ptr<DatagramClientSocket> socket_;
227 scoped_refptr<IOBufferWithSize> read_buffer_; 229 scoped_refptr<IOBufferWithSize> read_buffer_;
228 TransportSecurityState* transport_security_state_; 230 TransportSecurityState* transport_security_state_;
229 scoped_ptr<QuicServerInfo> server_info_; 231 scoped_ptr<QuicServerInfo> server_info_;
230 scoped_ptr<CertVerifyResult> cert_verify_result_; 232 scoped_ptr<CertVerifyResult> cert_verify_result_;
231 std::string pinning_failure_log_; 233 std::string pinning_failure_log_;
232 ObserverSet observers_; 234 ObserverSet observers_;
(...skipping 11 matching lines...) Expand all
244 // on this session. Existing stream will continue to be processed. 246 // on this session. Existing stream will continue to be processed.
245 bool going_away_; 247 bool going_away_;
246 base::WeakPtrFactory<QuicClientSession> weak_factory_; 248 base::WeakPtrFactory<QuicClientSession> weak_factory_;
247 249
248 DISALLOW_COPY_AND_ASSIGN(QuicClientSession); 250 DISALLOW_COPY_AND_ASSIGN(QuicClientSession);
249 }; 251 };
250 252
251 } // namespace net 253 } // namespace net
252 254
253 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_ 255 #endif // NET_QUIC_QUIC_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « net/quic/quic_ack_notifier_test.cc ('k') | net/quic/quic_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698