| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 ChannelIDService* channel_id_service, | 192 ChannelIDService* channel_id_service, |
| 193 TransportSecurityState* transport_security_state, | 193 TransportSecurityState* transport_security_state, |
| 194 CTVerifier* cert_transparency_verifier, | 194 CTVerifier* cert_transparency_verifier, |
| 195 SocketPerformanceWatcherFactory* socket_performance_watcher_factory, | 195 SocketPerformanceWatcherFactory* socket_performance_watcher_factory, |
| 196 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, | 196 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, |
| 197 QuicRandom* random_generator, | 197 QuicRandom* random_generator, |
| 198 QuicClock* clock, | 198 QuicClock* clock, |
| 199 size_t max_packet_length, | 199 size_t max_packet_length, |
| 200 const std::string& user_agent_id, | 200 const std::string& user_agent_id, |
| 201 const QuicVersionVector& supported_versions, | 201 const QuicVersionVector& supported_versions, |
| 202 bool enable_port_selection, | |
| 203 bool always_require_handshake_confirmation, | 202 bool always_require_handshake_confirmation, |
| 204 bool disable_connection_pooling, | 203 bool disable_connection_pooling, |
| 205 float load_server_info_timeout_srtt_multiplier, | 204 float load_server_info_timeout_srtt_multiplier, |
| 206 bool enable_connection_racing, | 205 bool enable_connection_racing, |
| 207 bool enable_non_blocking_io, | 206 bool enable_non_blocking_io, |
| 208 bool disable_disk_cache, | 207 bool disable_disk_cache, |
| 209 bool prefer_aes, | 208 bool prefer_aes, |
| 210 int socket_receive_buffer_size, | 209 int socket_receive_buffer_size, |
| 211 bool delay_tcp_race, | 210 bool delay_tcp_race, |
| 212 int max_server_configs_stored_in_properties, | 211 int max_server_configs_stored_in_properties, |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 | 361 |
| 363 bool ZeroRTTEnabledFor(const QuicServerId& server_id); | 362 bool ZeroRTTEnabledFor(const QuicServerId& server_id); |
| 364 | 363 |
| 365 // It returns the amount of time waiting job should be delayed. | 364 // It returns the amount of time waiting job should be delayed. |
| 366 base::TimeDelta GetTimeDelayForWaitingJob(const QuicServerId& server_id); | 365 base::TimeDelta GetTimeDelayForWaitingJob(const QuicServerId& server_id); |
| 367 | 366 |
| 368 QuicChromiumConnectionHelper* helper() { return helper_.get(); } | 367 QuicChromiumConnectionHelper* helper() { return helper_.get(); } |
| 369 | 368 |
| 370 QuicChromiumAlarmFactory* alarm_factory() { return alarm_factory_.get(); } | 369 QuicChromiumAlarmFactory* alarm_factory() { return alarm_factory_.get(); } |
| 371 | 370 |
| 372 bool enable_port_selection() const { return enable_port_selection_; } | |
| 373 | |
| 374 bool has_quic_server_info_factory() { | 371 bool has_quic_server_info_factory() { |
| 375 return quic_server_info_factory_.get() != nullptr; | 372 return quic_server_info_factory_.get() != nullptr; |
| 376 } | 373 } |
| 377 | 374 |
| 378 void set_quic_server_info_factory( | 375 void set_quic_server_info_factory( |
| 379 QuicServerInfoFactory* quic_server_info_factory); | 376 QuicServerInfoFactory* quic_server_info_factory); |
| 380 | 377 |
| 381 bool enable_connection_racing() const { return enable_connection_racing_; } | 378 bool enable_connection_racing() const { return enable_connection_racing_; } |
| 382 void set_enable_connection_racing(bool enable_connection_racing) { | 379 void set_enable_connection_racing(bool enable_connection_racing) { |
| 383 enable_connection_racing_ = enable_connection_racing; | 380 enable_connection_racing_ = enable_connection_racing; |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 QuicCryptoClientConfig crypto_config_; | 539 QuicCryptoClientConfig crypto_config_; |
| 543 | 540 |
| 544 JobMap active_jobs_; | 541 JobMap active_jobs_; |
| 545 ServerIDRequestsMap job_requests_map_; | 542 ServerIDRequestsMap job_requests_map_; |
| 546 RequestMap active_requests_; | 543 RequestMap active_requests_; |
| 547 | 544 |
| 548 CertVerifierJobMap active_cert_verifier_jobs_; | 545 CertVerifierJobMap active_cert_verifier_jobs_; |
| 549 | 546 |
| 550 QuicVersionVector supported_versions_; | 547 QuicVersionVector supported_versions_; |
| 551 | 548 |
| 552 // Determine if we should consistently select a client UDP port. If false, | |
| 553 // then we will just let the OS select a random client port for each new | |
| 554 // connection. | |
| 555 bool enable_port_selection_; | |
| 556 | |
| 557 // Set if we always require handshake confirmation. If true, this will | 549 // Set if we always require handshake confirmation. If true, this will |
| 558 // introduce at least one RTT for the handshake before the client sends data. | 550 // introduce at least one RTT for the handshake before the client sends data. |
| 559 bool always_require_handshake_confirmation_; | 551 bool always_require_handshake_confirmation_; |
| 560 | 552 |
| 561 // Set if we do not want connection pooling. | 553 // Set if we do not want connection pooling. |
| 562 bool disable_connection_pooling_; | 554 bool disable_connection_pooling_; |
| 563 | 555 |
| 564 // Specifies the ratio between time to load QUIC server information from disk | 556 // Specifies the ratio between time to load QUIC server information from disk |
| 565 // cache to 'smoothed RTT'. This ratio is used to calculate the timeout in | 557 // cache to 'smoothed RTT'. This ratio is used to calculate the timeout in |
| 566 // milliseconds to wait for loading of QUIC server information. If we don't | 558 // milliseconds to wait for loading of QUIC server information. If we don't |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 | 614 |
| 623 // If set, force HOL blocking. For measurement purposes. | 615 // If set, force HOL blocking. For measurement purposes. |
| 624 const bool force_hol_blocking_; | 616 const bool force_hol_blocking_; |
| 625 | 617 |
| 626 // Set if cert verification is to be raced with host resolution. | 618 // Set if cert verification is to be raced with host resolution. |
| 627 bool race_cert_verification_; | 619 bool race_cert_verification_; |
| 628 | 620 |
| 629 // If set, configure QUIC sockets to not fragment packets. | 621 // If set, configure QUIC sockets to not fragment packets. |
| 630 bool quic_do_not_fragment_; | 622 bool quic_do_not_fragment_; |
| 631 | 623 |
| 632 // Each profile will (probably) have a unique port_seed_ value. This value | |
| 633 // is used to help seed a pseudo-random number generator (PortSuggester) so | |
| 634 // that we consistently (within this profile) suggest the same ephemeral | |
| 635 // port when we re-connect to any given server/port. The differences between | |
| 636 // profiles (probablistically) prevent two profiles from colliding in their | |
| 637 // ephemeral port requests. | |
| 638 uint64_t port_seed_; | |
| 639 | |
| 640 // Local address of socket that was created in CreateSession. | 624 // Local address of socket that was created in CreateSession. |
| 641 IPEndPoint local_address_; | 625 IPEndPoint local_address_; |
| 642 bool check_persisted_supports_quic_; | 626 bool check_persisted_supports_quic_; |
| 643 bool has_initialized_data_; | 627 bool has_initialized_data_; |
| 644 std::set<HostPortPair> quic_supported_servers_at_startup_; | 628 std::set<HostPortPair> quic_supported_servers_at_startup_; |
| 645 | 629 |
| 646 NetworkConnection network_connection_; | 630 NetworkConnection network_connection_; |
| 647 | 631 |
| 648 int num_push_streams_created_; | 632 int num_push_streams_created_; |
| 649 | 633 |
| 650 QuicClientPushPromiseIndex push_promise_index_; | 634 QuicClientPushPromiseIndex push_promise_index_; |
| 651 | 635 |
| 652 // Current status of the factory's ability to create streams. | 636 // Current status of the factory's ability to create streams. |
| 653 FactoryStatus status_; | 637 FactoryStatus status_; |
| 654 | 638 |
| 655 base::TaskRunner* task_runner_; | 639 base::TaskRunner* task_runner_; |
| 656 | 640 |
| 657 const scoped_refptr<SSLConfigService> ssl_config_service_; | 641 const scoped_refptr<SSLConfigService> ssl_config_service_; |
| 658 | 642 |
| 659 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 643 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
| 660 | 644 |
| 661 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 645 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
| 662 }; | 646 }; |
| 663 | 647 |
| 664 } // namespace net | 648 } // namespace net |
| 665 | 649 |
| 666 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 650 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
| OLD | NEW |