| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 Optional<size_t> quic_max_packet_length; | 236 Optional<size_t> quic_max_packet_length; |
| 237 net::QuicTagVector quic_connection_options; | 237 net::QuicTagVector quic_connection_options; |
| 238 Optional<std::string> quic_user_agent_id; | 238 Optional<std::string> quic_user_agent_id; |
| 239 Optional<net::QuicVersionVector> quic_supported_versions; | 239 Optional<net::QuicVersionVector> quic_supported_versions; |
| 240 Optional<net::HostPortPair> origin_to_force_quic_on; | 240 Optional<net::HostPortPair> origin_to_force_quic_on; |
| 241 Optional<bool> quic_close_sessions_on_ip_change; | 241 Optional<bool> quic_close_sessions_on_ip_change; |
| 242 Optional<int> quic_idle_connection_timeout_seconds; | 242 Optional<int> quic_idle_connection_timeout_seconds; |
| 243 Optional<bool> quic_disable_preconnect_if_0rtt; | 243 Optional<bool> quic_disable_preconnect_if_0rtt; |
| 244 std::unordered_set<std::string> quic_host_whitelist; | 244 std::unordered_set<std::string> quic_host_whitelist; |
| 245 Optional<bool> quic_migrate_sessions_on_network_change; | 245 Optional<bool> quic_migrate_sessions_on_network_change; |
| 246 Optional<bool> quic_migrate_sessions_early; |
| 246 bool enable_user_alternate_protocol_ports; | 247 bool enable_user_alternate_protocol_ports; |
| 247 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 248 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
| 248 // main frame load fails with a DNS error in order to provide more useful | 249 // main frame load fails with a DNS error in order to provide more useful |
| 249 // information to the renderer so it can show a more specific error page. | 250 // information to the renderer so it can show a more specific error page. |
| 250 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; | 251 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; |
| 251 bool enable_token_binding; | 252 bool enable_token_binding; |
| 252 }; | 253 }; |
| 253 | 254 |
| 254 // |net_log| must either outlive the IOThread or be NULL. | 255 // |net_log| must either outlive the IOThread or be NULL. |
| 255 IOThread(PrefService* local_state, | 256 IOThread(PrefService* local_state, |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 // Returns the set of hosts to whitelist for QUIC. | 481 // Returns the set of hosts to whitelist for QUIC. |
| 481 static std::unordered_set<std::string> GetQuicHostWhitelist( | 482 static std::unordered_set<std::string> GetQuicHostWhitelist( |
| 482 const base::CommandLine& command_line, | 483 const base::CommandLine& command_line, |
| 483 const VariationParameters& quic_trial_params); | 484 const VariationParameters& quic_trial_params); |
| 484 | 485 |
| 485 // Returns true if QUIC should migrate sessions when primary network | 486 // Returns true if QUIC should migrate sessions when primary network |
| 486 // changes. | 487 // changes. |
| 487 static bool ShouldQuicMigrateSessionsOnNetworkChange( | 488 static bool ShouldQuicMigrateSessionsOnNetworkChange( |
| 488 const VariationParameters& quic_trial_params); | 489 const VariationParameters& quic_trial_params); |
| 489 | 490 |
| 491 // Returns true if QUIC should migrate sessions early. |
| 492 static bool ShouldQuicMigrateSessionsEarly( |
| 493 const VariationParameters& quic_trial_params); |
| 494 |
| 490 // Returns the maximum length for QUIC packets, based on any flags in | 495 // Returns the maximum length for QUIC packets, based on any flags in |
| 491 // |command_line| or the field trial. Returns 0 if there is an error | 496 // |command_line| or the field trial. Returns 0 if there is an error |
| 492 // parsing any of the options, or if the default value should be used. | 497 // parsing any of the options, or if the default value should be used. |
| 493 static size_t GetQuicMaxPacketLength( | 498 static size_t GetQuicMaxPacketLength( |
| 494 const base::CommandLine& command_line, | 499 const base::CommandLine& command_line, |
| 495 const VariationParameters& quic_trial_params); | 500 const VariationParameters& quic_trial_params); |
| 496 | 501 |
| 497 // Returns the QUIC versions specified by any flags in |command_line| | 502 // Returns the QUIC versions specified by any flags in |command_line| |
| 498 // or |quic_trial_params|. | 503 // or |quic_trial_params|. |
| 499 static net::QuicVersion GetQuicVersion( | 504 static net::QuicVersion GetQuicVersion( |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 bool is_quic_allowed_by_policy_; | 601 bool is_quic_allowed_by_policy_; |
| 597 | 602 |
| 598 const base::TimeTicks creation_time_; | 603 const base::TimeTicks creation_time_; |
| 599 | 604 |
| 600 base::WeakPtrFactory<IOThread> weak_factory_; | 605 base::WeakPtrFactory<IOThread> weak_factory_; |
| 601 | 606 |
| 602 DISALLOW_COPY_AND_ASSIGN(IOThread); | 607 DISALLOW_COPY_AND_ASSIGN(IOThread); |
| 603 }; | 608 }; |
| 604 | 609 |
| 605 #endif // CHROME_BROWSER_IO_THREAD_H_ | 610 #endif // CHROME_BROWSER_IO_THREAD_H_ |
| OLD | NEW |