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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
456 // |peer_address| and |network|. If |network| is kInvalidNetworkHandle, | 456 // |peer_address| and |network|. If |network| is kInvalidNetworkHandle, |
457 // default network is used. If |packet| is not null, it is sent | 457 // default network is used. If |packet| is not null, it is sent |
458 // on the new network, else a PING frame is sent. | 458 // on the new network, else a PING frame is sent. |
459 void MigrateSession(QuicChromiumClientSession* session, | 459 void MigrateSession(QuicChromiumClientSession* session, |
460 IPEndPoint peer_address, | 460 IPEndPoint peer_address, |
461 NetworkChangeNotifier::NetworkHandle network, | 461 NetworkChangeNotifier::NetworkHandle network, |
462 bool close_session_on_error, | 462 bool close_session_on_error, |
463 const BoundNetLog& bound_net_log, | 463 const BoundNetLog& bound_net_log, |
464 scoped_refptr<StringIOBuffer> packet); | 464 scoped_refptr<StringIOBuffer> packet); |
465 | 465 |
466 // Called to re-enable QUIC when QUIC has been disabled. | |
467 void OpenFactory(); | |
468 // If QUIC has been working well after having been recently | |
469 // disabled, clear the |consecutive_disabled_count_|. | |
470 void MaybeClearConsecutiveDisabledCount(); | |
471 | |
466 bool require_confirmation_; | 472 bool require_confirmation_; |
467 NetLog* net_log_; | 473 NetLog* net_log_; |
468 HostResolver* host_resolver_; | 474 HostResolver* host_resolver_; |
469 ClientSocketFactory* client_socket_factory_; | 475 ClientSocketFactory* client_socket_factory_; |
470 HttpServerProperties* http_server_properties_; | 476 HttpServerProperties* http_server_properties_; |
471 TransportSecurityState* transport_security_state_; | 477 TransportSecurityState* transport_security_state_; |
472 CTVerifier* cert_transparency_verifier_; | 478 CTVerifier* cert_transparency_verifier_; |
473 std::unique_ptr<QuicServerInfoFactory> quic_server_info_factory_; | 479 std::unique_ptr<QuicServerInfoFactory> quic_server_info_factory_; |
474 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_; | 480 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_; |
475 QuicRandom* random_generator_; | 481 QuicRandom* random_generator_; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
542 // Set if we do not want to load server config from the disk cache. | 548 // Set if we do not want to load server config from the disk cache. |
543 bool disable_disk_cache_; | 549 bool disable_disk_cache_; |
544 | 550 |
545 // Set if AES-GCM should be preferred, even if there is no hardware support. | 551 // Set if AES-GCM should be preferred, even if there is no hardware support. |
546 bool prefer_aes_; | 552 bool prefer_aes_; |
547 | 553 |
548 // True if QUIC should be disabled when there are timeouts with open | 554 // True if QUIC should be disabled when there are timeouts with open |
549 // streams. | 555 // streams. |
550 bool disable_quic_on_timeout_with_open_streams_; | 556 bool disable_quic_on_timeout_with_open_streams_; |
551 | 557 |
558 // Number of times in a row that QUIC has been disabled. | |
559 int consecutive_disabled_count_; | |
560 bool need_to_evaluate_consecutive_disabled_count_; | |
ianswett
2016/09/14 20:10:14
Also, maybe just evaluate_consecutive_disabled_cou
| |
561 | |
552 // Size of the UDP receive buffer. | 562 // Size of the UDP receive buffer. |
553 int socket_receive_buffer_size_; | 563 int socket_receive_buffer_size_; |
554 | 564 |
555 // Set if we do want to delay TCP connection when it is racing with QUIC. | 565 // Set if we do want to delay TCP connection when it is racing with QUIC. |
556 bool delay_tcp_race_; | 566 bool delay_tcp_race_; |
557 | 567 |
558 // PING timeout for connections. | 568 // PING timeout for connections. |
559 QuicTime::Delta ping_timeout_; | 569 QuicTime::Delta ping_timeout_; |
560 QuicTime::Delta reduced_ping_timeout_; | 570 QuicTime::Delta reduced_ping_timeout_; |
561 | 571 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
617 const scoped_refptr<SSLConfigService> ssl_config_service_; | 627 const scoped_refptr<SSLConfigService> ssl_config_service_; |
618 | 628 |
619 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 629 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
620 | 630 |
621 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 631 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
622 }; | 632 }; |
623 | 633 |
624 } // namespace net | 634 } // namespace net |
625 | 635 |
626 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 636 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
OLD | NEW |