| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 bool enable_connection_racing, | 148 bool enable_connection_racing, |
| 149 bool enable_non_blocking_io, | 149 bool enable_non_blocking_io, |
| 150 bool disable_disk_cache, | 150 bool disable_disk_cache, |
| 151 bool prefer_aes, | 151 bool prefer_aes, |
| 152 int max_number_of_lossy_connections, | 152 int max_number_of_lossy_connections, |
| 153 float packet_loss_threshold, | 153 float packet_loss_threshold, |
| 154 int max_recent_disabled_reasons, | 154 int max_recent_disabled_reasons, |
| 155 int threshold_timeouts_with_streams_open, | 155 int threshold_timeouts_with_streams_open, |
| 156 int threshold_public_resets_post_handshake, | 156 int threshold_public_resets_post_handshake, |
| 157 int socket_receive_buffer_size, | 157 int socket_receive_buffer_size, |
| 158 bool delay_tcp_race, | |
| 159 int max_server_configs_stored_in_properties, | 158 int max_server_configs_stored_in_properties, |
| 160 bool close_sessions_on_ip_change, | 159 bool close_sessions_on_ip_change, |
| 161 bool disable_quic_on_timeout_with_open_streams, | 160 bool disable_quic_on_timeout_with_open_streams, |
| 162 int idle_connection_timeout_seconds, | 161 int idle_connection_timeout_seconds, |
| 163 bool migrate_sessions_on_network_change, | 162 bool migrate_sessions_on_network_change, |
| 164 bool migrate_sessions_early, | 163 bool migrate_sessions_early, |
| 165 const QuicTagVector& connection_options, | 164 const QuicTagVector& connection_options, |
| 166 bool enable_token_binding); | 165 bool enable_token_binding); |
| 167 ~QuicStreamFactory() override; | 166 ~QuicStreamFactory() override; |
| 168 | 167 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 void set_quic_server_info_factory( | 314 void set_quic_server_info_factory( |
| 316 QuicServerInfoFactory* quic_server_info_factory); | 315 QuicServerInfoFactory* quic_server_info_factory); |
| 317 | 316 |
| 318 bool enable_connection_racing() const { return enable_connection_racing_; } | 317 bool enable_connection_racing() const { return enable_connection_racing_; } |
| 319 void set_enable_connection_racing(bool enable_connection_racing) { | 318 void set_enable_connection_racing(bool enable_connection_racing) { |
| 320 enable_connection_racing_ = enable_connection_racing; | 319 enable_connection_racing_ = enable_connection_racing; |
| 321 } | 320 } |
| 322 | 321 |
| 323 int socket_receive_buffer_size() const { return socket_receive_buffer_size_; } | 322 int socket_receive_buffer_size() const { return socket_receive_buffer_size_; } |
| 324 | 323 |
| 325 bool delay_tcp_race() const { return delay_tcp_race_; } | |
| 326 | |
| 327 private: | 324 private: |
| 328 class Job; | 325 class Job; |
| 329 friend class test::QuicStreamFactoryPeer; | 326 friend class test::QuicStreamFactoryPeer; |
| 330 FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryTest, QuicLossyProxyMarkedAsBad); | 327 FRIEND_TEST_ALL_PREFIXES(HttpStreamFactoryTest, QuicLossyProxyMarkedAsBad); |
| 331 | 328 |
| 332 typedef std::map<QuicServerId, QuicChromiumClientSession*> SessionMap; | 329 typedef std::map<QuicServerId, QuicChromiumClientSession*> SessionMap; |
| 333 typedef std::map<QuicChromiumClientSession*, QuicServerId> SessionIdMap; | 330 typedef std::map<QuicChromiumClientSession*, QuicServerId> SessionIdMap; |
| 334 typedef std::set<QuicServerId> AliasSet; | 331 typedef std::set<QuicServerId> AliasSet; |
| 335 typedef std::map<QuicChromiumClientSession*, AliasSet> SessionAliasMap; | 332 typedef std::map<QuicChromiumClientSession*, AliasSet> SessionAliasMap; |
| 336 typedef std::set<QuicChromiumClientSession*> SessionSet; | 333 typedef std::set<QuicChromiumClientSession*> SessionSet; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 // determine good threshold values. | 506 // determine good threshold values. |
| 510 int max_public_resets_post_handshake_; | 507 int max_public_resets_post_handshake_; |
| 511 int max_timeouts_with_open_streams_; | 508 int max_timeouts_with_open_streams_; |
| 512 // Thresholds if greater than zero, determine when to | 509 // Thresholds if greater than zero, determine when to |
| 513 int threshold_timeouts_with_open_streams_; | 510 int threshold_timeouts_with_open_streams_; |
| 514 int threshold_public_resets_post_handshake_; | 511 int threshold_public_resets_post_handshake_; |
| 515 | 512 |
| 516 // Size of the UDP receive buffer. | 513 // Size of the UDP receive buffer. |
| 517 int socket_receive_buffer_size_; | 514 int socket_receive_buffer_size_; |
| 518 | 515 |
| 519 // Set if we do want to delay TCP connection when it is racing with QUIC. | |
| 520 bool delay_tcp_race_; | |
| 521 | |
| 522 // If more than |yield_after_packets_| packets have been read or more than | 516 // If more than |yield_after_packets_| packets have been read or more than |
| 523 // |yield_after_duration_| time has passed, then | 517 // |yield_after_duration_| time has passed, then |
| 524 // QuicChromiumPacketReader::StartReading() yields by doing a PostTask(). | 518 // QuicChromiumPacketReader::StartReading() yields by doing a PostTask(). |
| 525 int yield_after_packets_; | 519 int yield_after_packets_; |
| 526 QuicTime::Delta yield_after_duration_; | 520 QuicTime::Delta yield_after_duration_; |
| 527 | 521 |
| 528 // Set if all sessions should be closed when any local IP address changes. | 522 // Set if all sessions should be closed when any local IP address changes. |
| 529 const bool close_sessions_on_ip_change_; | 523 const bool close_sessions_on_ip_change_; |
| 530 | 524 |
| 531 // Set if migration should be attempted on active sessions when primary | 525 // Set if migration should be attempted on active sessions when primary |
| (...skipping 30 matching lines...) Expand all Loading... |
| 562 base::TaskRunner* task_runner_; | 556 base::TaskRunner* task_runner_; |
| 563 | 557 |
| 564 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 558 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 565 | 559 |
| 566 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 560 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 567 }; | 561 }; |
| 568 | 562 |
| 569 } // namespace net | 563 } // namespace net |
| 570 | 564 |
| 571 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 565 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |