| 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 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ | 5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ | 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 float packet_loss_threshold, | 183 float packet_loss_threshold, |
| 184 int max_recent_disabled_reasons, | 184 int max_recent_disabled_reasons, |
| 185 int threshold_timeouts_with_streams_open, | 185 int threshold_timeouts_with_streams_open, |
| 186 int threshold_public_resets_post_handshake, | 186 int threshold_public_resets_post_handshake, |
| 187 int socket_receive_buffer_size, | 187 int socket_receive_buffer_size, |
| 188 bool delay_tcp_race, | 188 bool delay_tcp_race, |
| 189 int max_server_configs_stored_in_properties, | 189 int max_server_configs_stored_in_properties, |
| 190 bool close_sessions_on_ip_change, | 190 bool close_sessions_on_ip_change, |
| 191 bool disable_quic_on_timeout_with_open_streams, | 191 bool disable_quic_on_timeout_with_open_streams, |
| 192 int idle_connection_timeout_seconds, | 192 int idle_connection_timeout_seconds, |
| 193 int reduced_ping_timeout_seconds, |
| 193 int packet_reader_yield_after_duration_milliseconds, | 194 int packet_reader_yield_after_duration_milliseconds, |
| 194 bool migrate_sessions_on_network_change, | 195 bool migrate_sessions_on_network_change, |
| 195 bool migrate_sessions_early, | 196 bool migrate_sessions_early, |
| 196 bool allow_server_migration, | 197 bool allow_server_migration, |
| 197 bool force_hol_blocking, | 198 bool force_hol_blocking, |
| 198 bool race_cert_verification, | 199 bool race_cert_verification, |
| 199 const QuicTagVector& connection_options, | 200 const QuicTagVector& connection_options, |
| 200 bool enable_token_binding); | 201 bool enable_token_binding); |
| 201 ~QuicStreamFactory() override; | 202 ~QuicStreamFactory() override; |
| 202 | 203 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // Called by a session when it becomes idle. | 248 // Called by a session when it becomes idle. |
| 248 void OnIdleSession(QuicChromiumClientSession* session); | 249 void OnIdleSession(QuicChromiumClientSession* session); |
| 249 | 250 |
| 250 // Called by a session when it is going away and no more streams should be | 251 // Called by a session when it is going away and no more streams should be |
| 251 // created on it. | 252 // created on it. |
| 252 void OnSessionGoingAway(QuicChromiumClientSession* session); | 253 void OnSessionGoingAway(QuicChromiumClientSession* session); |
| 253 | 254 |
| 254 // Called by a session after it shuts down. | 255 // Called by a session after it shuts down. |
| 255 void OnSessionClosed(QuicChromiumClientSession* session); | 256 void OnSessionClosed(QuicChromiumClientSession* session); |
| 256 | 257 |
| 258 // Called by a session when it times out with open streams. |
| 259 void OnTimeoutWithOpenStreams(); |
| 260 |
| 257 // Cancels a pending request. | 261 // Cancels a pending request. |
| 258 void CancelRequest(QuicStreamRequest* request); | 262 void CancelRequest(QuicStreamRequest* request); |
| 259 | 263 |
| 260 // Closes all current sessions with specified network and QUIC error codes. | 264 // Closes all current sessions with specified network and QUIC error codes. |
| 261 void CloseAllSessions(int error, QuicErrorCode quic_error); | 265 void CloseAllSessions(int error, QuicErrorCode quic_error); |
| 262 | 266 |
| 263 std::unique_ptr<base::Value> QuicStreamFactoryInfoToValue() const; | 267 std::unique_ptr<base::Value> QuicStreamFactoryInfoToValue() const; |
| 264 | 268 |
| 265 // Delete cached state objects in |crypto_config_|. If |origin_filter| is not | 269 // Delete cached state objects in |crypto_config_|. If |origin_filter| is not |
| 266 // null, only objects on matching origins will be deleted. | 270 // null, only objects on matching origins will be deleted. |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 // Thresholds if greater than zero, determine when to | 593 // Thresholds if greater than zero, determine when to |
| 590 int threshold_timeouts_with_open_streams_; | 594 int threshold_timeouts_with_open_streams_; |
| 591 int threshold_public_resets_post_handshake_; | 595 int threshold_public_resets_post_handshake_; |
| 592 | 596 |
| 593 // Size of the UDP receive buffer. | 597 // Size of the UDP receive buffer. |
| 594 int socket_receive_buffer_size_; | 598 int socket_receive_buffer_size_; |
| 595 | 599 |
| 596 // Set if we do want to delay TCP connection when it is racing with QUIC. | 600 // Set if we do want to delay TCP connection when it is racing with QUIC. |
| 597 bool delay_tcp_race_; | 601 bool delay_tcp_race_; |
| 598 | 602 |
| 603 // PING timeout for connections. |
| 604 QuicTime::Delta ping_timeout_; |
| 605 QuicTime::Delta reduced_ping_timeout_; |
| 606 |
| 599 // If more than |yield_after_packets_| packets have been read or more than | 607 // If more than |yield_after_packets_| packets have been read or more than |
| 600 // |yield_after_duration_| time has passed, then | 608 // |yield_after_duration_| time has passed, then |
| 601 // QuicChromiumPacketReader::StartReading() yields by doing a PostTask(). | 609 // QuicChromiumPacketReader::StartReading() yields by doing a PostTask(). |
| 602 int yield_after_packets_; | 610 int yield_after_packets_; |
| 603 QuicTime::Delta yield_after_duration_; | 611 QuicTime::Delta yield_after_duration_; |
| 604 | 612 |
| 605 // Set if all sessions should be closed when any local IP address changes. | 613 // Set if all sessions should be closed when any local IP address changes. |
| 606 const bool close_sessions_on_ip_change_; | 614 const bool close_sessions_on_ip_change_; |
| 607 | 615 |
| 608 // Set if migration should be attempted on active sessions when primary | 616 // Set if migration should be attempted on active sessions when primary |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 651 const scoped_refptr<SSLConfigService> ssl_config_service_; | 659 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 652 | 660 |
| 653 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 661 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 654 | 662 |
| 655 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 663 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 656 }; | 664 }; |
| 657 | 665 |
| 658 } // namespace net | 666 } // namespace net |
| 659 | 667 |
| 660 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 668 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |