| 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_CHROMIUM_CLIENT_SESSION_H_ | 10 #ifndef NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 | 250 |
| 251 // Returns current default socket. This is the socket over which all | 251 // Returns current default socket. This is the socket over which all |
| 252 // QUIC packets are sent. This default socket can change, so do not store the | 252 // QUIC packets are sent. This default socket can change, so do not store the |
| 253 // returned socket. | 253 // returned socket. |
| 254 const DatagramClientSocket* GetDefaultSocket() const; | 254 const DatagramClientSocket* GetDefaultSocket() const; |
| 255 | 255 |
| 256 bool IsAuthorized(const std::string& hostname) override; | 256 bool IsAuthorized(const std::string& hostname) override; |
| 257 | 257 |
| 258 protected: | 258 protected: |
| 259 // QuicSession methods: | 259 // QuicSession methods: |
| 260 QuicSpdyStream* CreateIncomingDynamicStream(QuicStreamId id) override; | 260 QuicChromiumClientStream* CreateIncomingDynamicStream( |
| 261 QuicStreamId id) override; |
| 261 | 262 |
| 262 private: | 263 private: |
| 263 friend class test::QuicChromiumClientSessionPeer; | 264 friend class test::QuicChromiumClientSessionPeer; |
| 264 | 265 |
| 265 typedef std::set<Observer*> ObserverSet; | 266 typedef std::set<Observer*> ObserverSet; |
| 266 typedef std::list<StreamRequest*> StreamRequestQueue; | 267 typedef std::list<StreamRequest*> StreamRequestQueue; |
| 267 | 268 |
| 268 QuicChromiumClientStream* CreateOutgoingReliableStreamImpl(); | 269 QuicChromiumClientStream* CreateOutgoingReliableStreamImpl(); |
| 270 QuicChromiumClientStream* CreateIncomingReliableStreamImpl(QuicStreamId id); |
| 269 // A completion callback invoked when a read completes. | 271 // A completion callback invoked when a read completes. |
| 270 void OnReadComplete(int result); | 272 void OnReadComplete(int result); |
| 271 | 273 |
| 272 void OnClosedStream(); | 274 void OnClosedStream(); |
| 273 | 275 |
| 274 // Close the session because of |error| and records it in UMA histogram. | 276 // Close the session because of |error| and records it in UMA histogram. |
| 275 void RecordAndCloseSessionOnError(int error, QuicErrorCode quic_error); | 277 void RecordAndCloseSessionOnError(int error, QuicErrorCode quic_error); |
| 276 | 278 |
| 277 // A Session may be closed via any of three methods: | 279 // A Session may be closed via any of three methods: |
| 278 // OnConnectionClosed - called by the connection when the connection has been | 280 // OnConnectionClosed - called by the connection when the connection has been |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 QuicDisabledReason disabled_reason_; | 328 QuicDisabledReason disabled_reason_; |
| 327 TokenBindingSignatureMap token_binding_signatures_; | 329 TokenBindingSignatureMap token_binding_signatures_; |
| 328 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; | 330 base::WeakPtrFactory<QuicChromiumClientSession> weak_factory_; |
| 329 | 331 |
| 330 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); | 332 DISALLOW_COPY_AND_ASSIGN(QuicChromiumClientSession); |
| 331 }; | 333 }; |
| 332 | 334 |
| 333 } // namespace net | 335 } // namespace net |
| 334 | 336 |
| 335 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ | 337 #endif // NET_QUIC_QUIC_CHROMIUM_CLIENT_SESSION_H_ |
| OLD | NEW |