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 CHROME_BROWSER_IO_THREAD_H_ | 5 #ifndef CHROME_BROWSER_IO_THREAD_H_ |
6 #define CHROME_BROWSER_IO_THREAD_H_ | 6 #define CHROME_BROWSER_IO_THREAD_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 Optional<float> quic_packet_loss_threshold; | 224 Optional<float> quic_packet_loss_threshold; |
225 Optional<int> quic_socket_receive_buffer_size; | 225 Optional<int> quic_socket_receive_buffer_size; |
226 Optional<bool> quic_delay_tcp_race; | 226 Optional<bool> quic_delay_tcp_race; |
227 Optional<size_t> quic_max_packet_length; | 227 Optional<size_t> quic_max_packet_length; |
228 net::QuicTagVector quic_connection_options; | 228 net::QuicTagVector quic_connection_options; |
229 Optional<std::string> quic_user_agent_id; | 229 Optional<std::string> quic_user_agent_id; |
230 Optional<net::QuicVersionVector> quic_supported_versions; | 230 Optional<net::QuicVersionVector> quic_supported_versions; |
231 Optional<net::HostPortPair> origin_to_force_quic_on; | 231 Optional<net::HostPortPair> origin_to_force_quic_on; |
232 Optional<bool> quic_close_sessions_on_ip_change; | 232 Optional<bool> quic_close_sessions_on_ip_change; |
233 Optional<int> quic_idle_connection_timeout_seconds; | 233 Optional<int> quic_idle_connection_timeout_seconds; |
| 234 Optional<bool> quic_disable_preconnect_if_0rtt; |
234 bool enable_user_alternate_protocol_ports; | 235 bool enable_user_alternate_protocol_ports; |
235 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 236 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
236 // main frame load fails with a DNS error in order to provide more useful | 237 // main frame load fails with a DNS error in order to provide more useful |
237 // information to the renderer so it can show a more specific error page. | 238 // information to the renderer so it can show a more specific error page. |
238 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; | 239 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; |
239 }; | 240 }; |
240 | 241 |
241 // |net_log| must either outlive the IOThread or be NULL. | 242 // |net_log| must either outlive the IOThread or be NULL. |
242 IOThread(PrefService* local_state, | 243 IOThread(PrefService* local_state, |
243 policy::PolicyService* policy_service, | 244 policy::PolicyService* policy_service, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 // IP addresses change. | 439 // IP addresses change. |
439 static bool ShouldQuicCloseSessionsOnIpChange( | 440 static bool ShouldQuicCloseSessionsOnIpChange( |
440 const VariationParameters& quic_trial_params); | 441 const VariationParameters& quic_trial_params); |
441 | 442 |
442 // Returns the idle connection timeout for QUIC connections. Returns 0 if | 443 // Returns the idle connection timeout for QUIC connections. Returns 0 if |
443 // there is an error parsing any of the options, or if the default value | 444 // there is an error parsing any of the options, or if the default value |
444 // should be used. | 445 // should be used. |
445 static int GetQuicIdleConnectionTimeoutSeconds( | 446 static int GetQuicIdleConnectionTimeoutSeconds( |
446 const VariationParameters& quic_trial_params); | 447 const VariationParameters& quic_trial_params); |
447 | 448 |
| 449 // Returns true if PreConnect should be disabled if QUIC can do 0RTT. |
| 450 static bool ShouldQuicDisablePreConnectIfZeroRtt( |
| 451 const VariationParameters& quic_trial_params); |
| 452 |
448 // Returns the maximum length for QUIC packets, based on any flags in | 453 // Returns the maximum length for QUIC packets, based on any flags in |
449 // |command_line| or the field trial. Returns 0 if there is an error | 454 // |command_line| or the field trial. Returns 0 if there is an error |
450 // parsing any of the options, or if the default value should be used. | 455 // parsing any of the options, or if the default value should be used. |
451 static size_t GetQuicMaxPacketLength( | 456 static size_t GetQuicMaxPacketLength( |
452 const base::CommandLine& command_line, | 457 const base::CommandLine& command_line, |
453 const VariationParameters& quic_trial_params); | 458 const VariationParameters& quic_trial_params); |
454 | 459 |
455 // Returns the QUIC versions specified by any flags in |command_line| | 460 // Returns the QUIC versions specified by any flags in |command_line| |
456 // or |quic_trial_params|. | 461 // or |quic_trial_params|. |
457 static net::QuicVersion GetQuicVersion( | 462 static net::QuicVersion GetQuicVersion( |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 bool is_quic_allowed_by_policy_; | 549 bool is_quic_allowed_by_policy_; |
545 | 550 |
546 const base::TimeTicks creation_time_; | 551 const base::TimeTicks creation_time_; |
547 | 552 |
548 base::WeakPtrFactory<IOThread> weak_factory_; | 553 base::WeakPtrFactory<IOThread> weak_factory_; |
549 | 554 |
550 DISALLOW_COPY_AND_ASSIGN(IOThread); | 555 DISALLOW_COPY_AND_ASSIGN(IOThread); |
551 }; | 556 }; |
552 | 557 |
553 #endif // CHROME_BROWSER_IO_THREAD_H_ | 558 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |