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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 Optional<int> quic_socket_receive_buffer_size; | 232 Optional<int> quic_socket_receive_buffer_size; |
233 Optional<bool> quic_delay_tcp_race; | 233 Optional<bool> quic_delay_tcp_race; |
234 Optional<size_t> quic_max_packet_length; | 234 Optional<size_t> quic_max_packet_length; |
235 net::QuicTagVector quic_connection_options; | 235 net::QuicTagVector quic_connection_options; |
236 Optional<std::string> quic_user_agent_id; | 236 Optional<std::string> quic_user_agent_id; |
237 Optional<net::QuicVersionVector> quic_supported_versions; | 237 Optional<net::QuicVersionVector> quic_supported_versions; |
238 Optional<net::HostPortPair> origin_to_force_quic_on; | 238 Optional<net::HostPortPair> origin_to_force_quic_on; |
239 Optional<bool> quic_close_sessions_on_ip_change; | 239 Optional<bool> quic_close_sessions_on_ip_change; |
240 Optional<int> quic_idle_connection_timeout_seconds; | 240 Optional<int> quic_idle_connection_timeout_seconds; |
241 Optional<bool> quic_disable_preconnect_if_0rtt; | 241 Optional<bool> quic_disable_preconnect_if_0rtt; |
| 242 Optional<bool> quic_migrate_sessions_on_network_change; |
242 bool enable_user_alternate_protocol_ports; | 243 bool enable_user_alternate_protocol_ports; |
243 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 244 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
244 // main frame load fails with a DNS error in order to provide more useful | 245 // main frame load fails with a DNS error in order to provide more useful |
245 // information to the renderer so it can show a more specific error page. | 246 // information to the renderer so it can show a more specific error page. |
246 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; | 247 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; |
247 }; | 248 }; |
248 | 249 |
249 // |net_log| must either outlive the IOThread or be NULL. | 250 // |net_log| must either outlive the IOThread or be NULL. |
250 IOThread(PrefService* local_state, | 251 IOThread(PrefService* local_state, |
251 policy::PolicyService* policy_service, | 252 policy::PolicyService* policy_service, |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 const VariationParameters& quic_trial_params); | 453 const VariationParameters& quic_trial_params); |
453 | 454 |
454 // Returns the idle connection timeout for QUIC connections. Returns 0 if | 455 // Returns the idle connection timeout for QUIC connections. Returns 0 if |
455 // there is an error parsing any of the options, or if the default value | 456 // there is an error parsing any of the options, or if the default value |
456 // should be used. | 457 // should be used. |
457 static int GetQuicIdleConnectionTimeoutSeconds( | 458 static int GetQuicIdleConnectionTimeoutSeconds( |
458 const VariationParameters& quic_trial_params); | 459 const VariationParameters& quic_trial_params); |
459 | 460 |
460 // Returns true if PreConnect should be disabled if QUIC can do 0RTT. | 461 // Returns true if PreConnect should be disabled if QUIC can do 0RTT. |
461 static bool ShouldQuicDisablePreConnectIfZeroRtt( | 462 static bool ShouldQuicDisablePreConnectIfZeroRtt( |
| 463 |
| 464 // Returns true if QUIC should migrate sessions when primary network |
| 465 // changes. |
| 466 static bool ShouldQuicMigrateSessionsOnNetworkChange( |
462 const VariationParameters& quic_trial_params); | 467 const VariationParameters& quic_trial_params); |
463 | 468 |
464 // Returns the maximum length for QUIC packets, based on any flags in | 469 // Returns the maximum length for QUIC packets, based on any flags in |
465 // |command_line| or the field trial. Returns 0 if there is an error | 470 // |command_line| or the field trial. Returns 0 if there is an error |
466 // parsing any of the options, or if the default value should be used. | 471 // parsing any of the options, or if the default value should be used. |
467 static size_t GetQuicMaxPacketLength( | 472 static size_t GetQuicMaxPacketLength( |
468 const base::CommandLine& command_line, | 473 const base::CommandLine& command_line, |
469 const VariationParameters& quic_trial_params); | 474 const VariationParameters& quic_trial_params); |
470 | 475 |
471 // Returns the QUIC versions specified by any flags in |command_line| | 476 // Returns the QUIC versions specified by any flags in |command_line| |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 bool is_quic_allowed_by_policy_; | 575 bool is_quic_allowed_by_policy_; |
571 | 576 |
572 const base::TimeTicks creation_time_; | 577 const base::TimeTicks creation_time_; |
573 | 578 |
574 base::WeakPtrFactory<IOThread> weak_factory_; | 579 base::WeakPtrFactory<IOThread> weak_factory_; |
575 | 580 |
576 DISALLOW_COPY_AND_ASSIGN(IOThread); | 581 DISALLOW_COPY_AND_ASSIGN(IOThread); |
577 }; | 582 }; |
578 | 583 |
579 #endif // CHROME_BROWSER_IO_THREAD_H_ | 584 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |