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 #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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 366 } | 367 } |
| 367 | 368 |
| 368 void set_quic_server_info_factory( | 369 void set_quic_server_info_factory( |
| 369 QuicServerInfoFactory* quic_server_info_factory); | 370 QuicServerInfoFactory* quic_server_info_factory); |
| 370 | 371 |
| 371 bool enable_connection_racing() const { return enable_connection_racing_; } | 372 bool enable_connection_racing() const { return enable_connection_racing_; } |
| 372 void set_enable_connection_racing(bool enable_connection_racing) { | 373 void set_enable_connection_racing(bool enable_connection_racing) { |
| 373 enable_connection_racing_ = enable_connection_racing; | 374 enable_connection_racing_ = enable_connection_racing; |
| 374 } | 375 } |
| 375 | 376 |
| 377 void set_reduced_ping_timeout() { | |
| 378 ping_timeout_seconds_ = reduced_ping_timeout_seconds_; | |
| 379 } | |
| 380 | |
| 376 int socket_receive_buffer_size() const { return socket_receive_buffer_size_; } | 381 int socket_receive_buffer_size() const { return socket_receive_buffer_size_; } |
| 377 | 382 |
| 378 bool delay_tcp_race() const { return delay_tcp_race_; } | 383 bool delay_tcp_race() const { return delay_tcp_race_; } |
| 379 | 384 |
| 380 private: | 385 private: |
| 381 class Job; | 386 class Job; |
| 382 class CertVerifierJob; | 387 class CertVerifierJob; |
| 383 friend class test::QuicStreamFactoryPeer; | 388 friend class test::QuicStreamFactoryPeer; |
| 384 FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryTest, QuicLossyProxyMarkedAsBad); | 389 FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryTest, QuicLossyProxyMarkedAsBad); |
| 385 | 390 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 589 // Thresholds if greater than zero, determine when to | 594 // Thresholds if greater than zero, determine when to |
| 590 int threshold_timeouts_with_open_streams_; | 595 int threshold_timeouts_with_open_streams_; |
| 591 int threshold_public_resets_post_handshake_; | 596 int threshold_public_resets_post_handshake_; |
| 592 | 597 |
| 593 // Size of the UDP receive buffer. | 598 // Size of the UDP receive buffer. |
| 594 int socket_receive_buffer_size_; | 599 int socket_receive_buffer_size_; |
| 595 | 600 |
| 596 // Set if we do want to delay TCP connection when it is racing with QUIC. | 601 // Set if we do want to delay TCP connection when it is racing with QUIC. |
| 597 bool delay_tcp_race_; | 602 bool delay_tcp_race_; |
| 598 | 603 |
| 604 // PING timeout for connections. | |
| 605 int ping_timeout_seconds_; | |
| 606 int reduced_ping_timeout_seconds_; | |
|
Ryan Hamilton
2016/09/01 16:36:14
nit: Let's make these QuicTime::Deltas
Zhongyi Shi
2016/09/01 18:58:29
Done.
| |
| 607 | |
| 599 // If more than |yield_after_packets_| packets have been read or more than | 608 // If more than |yield_after_packets_| packets have been read or more than |
| 600 // |yield_after_duration_| time has passed, then | 609 // |yield_after_duration_| time has passed, then |
| 601 // QuicChromiumPacketReader::StartReading() yields by doing a PostTask(). | 610 // QuicChromiumPacketReader::StartReading() yields by doing a PostTask(). |
| 602 int yield_after_packets_; | 611 int yield_after_packets_; |
| 603 QuicTime::Delta yield_after_duration_; | 612 QuicTime::Delta yield_after_duration_; |
| 604 | 613 |
| 605 // Set if all sessions should be closed when any local IP address changes. | 614 // Set if all sessions should be closed when any local IP address changes. |
| 606 const bool close_sessions_on_ip_change_; | 615 const bool close_sessions_on_ip_change_; |
| 607 | 616 |
| 608 // Set if migration should be attempted on active sessions when primary | 617 // 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_; | 660 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 652 | 661 |
| 653 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 662 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 654 | 663 |
| 655 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 664 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 656 }; | 665 }; |
| 657 | 666 |
| 658 } // namespace net | 667 } // namespace net |
| 659 | 668 |
| 660 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 669 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |