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 <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 Optional<bool> force_spdy_always; | 179 Optional<bool> force_spdy_always; |
180 std::set<net::HostPortPair> forced_spdy_exclusions; | 180 std::set<net::HostPortPair> forced_spdy_exclusions; |
181 Optional<bool> use_alternate_protocols; | 181 Optional<bool> use_alternate_protocols; |
182 Optional<double> alternate_protocol_probability_threshold; | 182 Optional<double> alternate_protocol_probability_threshold; |
183 | 183 |
184 Optional<bool> enable_quic; | 184 Optional<bool> enable_quic; |
185 Optional<bool> enable_quic_for_proxies; | 185 Optional<bool> enable_quic_for_proxies; |
186 Optional<bool> enable_quic_port_selection; | 186 Optional<bool> enable_quic_port_selection; |
187 Optional<bool> quic_always_require_handshake_confirmation; | 187 Optional<bool> quic_always_require_handshake_confirmation; |
188 Optional<bool> quic_disable_connection_pooling; | 188 Optional<bool> quic_disable_connection_pooling; |
189 Optional<int> quic_load_server_info_timeout_ms; | |
190 Optional<float> quic_load_server_info_timeout_srtt_multiplier; | 189 Optional<float> quic_load_server_info_timeout_srtt_multiplier; |
191 Optional<bool> quic_enable_truncated_connection_ids; | |
192 Optional<bool> quic_enable_connection_racing; | 190 Optional<bool> quic_enable_connection_racing; |
193 Optional<bool> quic_enable_non_blocking_io; | 191 Optional<bool> quic_enable_non_blocking_io; |
194 Optional<bool> quic_disable_disk_cache; | 192 Optional<bool> quic_disable_disk_cache; |
195 Optional<int> quic_socket_receive_buffer_size; | 193 Optional<int> quic_socket_receive_buffer_size; |
196 Optional<size_t> quic_max_packet_length; | 194 Optional<size_t> quic_max_packet_length; |
197 net::QuicTagVector quic_connection_options; | 195 net::QuicTagVector quic_connection_options; |
198 Optional<std::string> quic_user_agent_id; | 196 Optional<std::string> quic_user_agent_id; |
199 Optional<net::QuicVersionVector> quic_supported_versions; | 197 Optional<net::QuicVersionVector> quic_supported_versions; |
200 Optional<net::HostPortPair> origin_to_force_quic_on; | 198 Optional<net::HostPortPair> origin_to_force_quic_on; |
201 bool enable_user_alternate_protocol_ports; | 199 bool enable_user_alternate_protocol_ports; |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 357 |
360 // Returns true if QUIC should always require handshake confirmation during | 358 // Returns true if QUIC should always require handshake confirmation during |
361 // the QUIC handshake. | 359 // the QUIC handshake. |
362 static bool ShouldQuicAlwaysRequireHandshakeConfirmation( | 360 static bool ShouldQuicAlwaysRequireHandshakeConfirmation( |
363 const VariationParameters& quic_trial_params); | 361 const VariationParameters& quic_trial_params); |
364 | 362 |
365 // Returns true if QUIC should disable connection pooling. | 363 // Returns true if QUIC should disable connection pooling. |
366 static bool ShouldQuicDisableConnectionPooling( | 364 static bool ShouldQuicDisableConnectionPooling( |
367 const VariationParameters& quic_trial_params); | 365 const VariationParameters& quic_trial_params); |
368 | 366 |
369 // Returns the timeout value for loading of QUIC sever information from disk | |
370 // cache based on field trial. Returns 0 if there is an error parsing the | |
371 // field trial params, or if the default value should be used. | |
372 static int GetQuicLoadServerInfoTimeout( | |
373 const VariationParameters& quic_trial_params); | |
374 | |
375 // Returns the ratio of time to load QUIC sever information from disk cache to | 367 // Returns the ratio of time to load QUIC sever information from disk cache to |
376 // 'smoothed RTT' based on field trial. Returns 0 if there is an error parsing | 368 // 'smoothed RTT' based on field trial. Returns 0 if there is an error parsing |
377 // the field trial params, or if the default value should be used. | 369 // the field trial params, or if the default value should be used. |
378 static float GetQuicLoadServerInfoTimeoutSrttMultiplier( | 370 static float GetQuicLoadServerInfoTimeoutSrttMultiplier( |
379 const VariationParameters& quic_trial_params); | 371 const VariationParameters& quic_trial_params); |
380 | 372 |
381 // Returns true if QUIC's TruncatedConnectionIds should be enabled. | |
382 static bool ShouldQuicEnableTruncatedConnectionIds( | |
383 const VariationParameters& quic_trial_params); | |
384 | |
385 // Returns true if QUIC's connection racing should be enabled. | 373 // Returns true if QUIC's connection racing should be enabled. |
386 static bool ShouldQuicEnableConnectionRacing( | 374 static bool ShouldQuicEnableConnectionRacing( |
387 const VariationParameters& quic_trial_params); | 375 const VariationParameters& quic_trial_params); |
388 | 376 |
389 // Returns true if QUIC's should use non-blocking IO. | 377 // Returns true if QUIC's should use non-blocking IO. |
390 static bool ShouldQuicEnableNonBlockingIO( | 378 static bool ShouldQuicEnableNonBlockingIO( |
391 const VariationParameters& quic_trial_params); | 379 const VariationParameters& quic_trial_params); |
392 | 380 |
393 // Returns true if QUIC shouldn't load QUIC server information from the disk | 381 // Returns true if QUIC shouldn't load QUIC server information from the disk |
394 // cache. | 382 // cache. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 bool is_spdy_disabled_by_policy_; | 472 bool is_spdy_disabled_by_policy_; |
485 | 473 |
486 const base::TimeTicks creation_time_; | 474 const base::TimeTicks creation_time_; |
487 | 475 |
488 base::WeakPtrFactory<IOThread> weak_factory_; | 476 base::WeakPtrFactory<IOThread> weak_factory_; |
489 | 477 |
490 DISALLOW_COPY_AND_ASSIGN(IOThread); | 478 DISALLOW_COPY_AND_ASSIGN(IOThread); |
491 }; | 479 }; |
492 | 480 |
493 #endif // CHROME_BROWSER_IO_THREAD_H_ | 481 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |