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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 Optional<bool> enable_quic; | 183 Optional<bool> enable_quic; |
184 Optional<bool> enable_quic_for_proxies; | 184 Optional<bool> enable_quic_for_proxies; |
185 Optional<bool> enable_quic_port_selection; | 185 Optional<bool> enable_quic_port_selection; |
186 Optional<bool> quic_always_require_handshake_confirmation; | 186 Optional<bool> quic_always_require_handshake_confirmation; |
187 Optional<bool> quic_disable_connection_pooling; | 187 Optional<bool> quic_disable_connection_pooling; |
188 Optional<float> quic_load_server_info_timeout_srtt_multiplier; | 188 Optional<float> quic_load_server_info_timeout_srtt_multiplier; |
189 Optional<bool> quic_enable_connection_racing; | 189 Optional<bool> quic_enable_connection_racing; |
190 Optional<bool> quic_enable_non_blocking_io; | 190 Optional<bool> quic_enable_non_blocking_io; |
191 Optional<bool> quic_disable_disk_cache; | 191 Optional<bool> quic_disable_disk_cache; |
| 192 Optional<int> quic_max_number_of_lossy_connections; |
| 193 Optional<float> quic_packet_loss_threshold; |
192 Optional<int> quic_socket_receive_buffer_size; | 194 Optional<int> quic_socket_receive_buffer_size; |
193 Optional<size_t> quic_max_packet_length; | 195 Optional<size_t> quic_max_packet_length; |
194 net::QuicTagVector quic_connection_options; | 196 net::QuicTagVector quic_connection_options; |
195 Optional<std::string> quic_user_agent_id; | 197 Optional<std::string> quic_user_agent_id; |
196 Optional<net::QuicVersionVector> quic_supported_versions; | 198 Optional<net::QuicVersionVector> quic_supported_versions; |
197 Optional<net::HostPortPair> origin_to_force_quic_on; | 199 Optional<net::HostPortPair> origin_to_force_quic_on; |
198 bool enable_user_alternate_protocol_ports; | 200 bool enable_user_alternate_protocol_ports; |
199 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a | 201 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a |
200 // main frame load fails with a DNS error in order to provide more useful | 202 // main frame load fails with a DNS error in order to provide more useful |
201 // information to the renderer so it can show a more specific error page. | 203 // information to the renderer so it can show a more specific error page. |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 | 367 |
366 // Returns true if QUIC's should use non-blocking IO. | 368 // Returns true if QUIC's should use non-blocking IO. |
367 static bool ShouldQuicEnableNonBlockingIO( | 369 static bool ShouldQuicEnableNonBlockingIO( |
368 const VariationParameters& quic_trial_params); | 370 const VariationParameters& quic_trial_params); |
369 | 371 |
370 // Returns true if QUIC shouldn't load QUIC server information from the disk | 372 // Returns true if QUIC shouldn't load QUIC server information from the disk |
371 // cache. | 373 // cache. |
372 static bool ShouldQuicDisableDiskCache( | 374 static bool ShouldQuicDisableDiskCache( |
373 const VariationParameters& quic_trial_params); | 375 const VariationParameters& quic_trial_params); |
374 | 376 |
| 377 // Returns the maximum number of QUIC connections with high packet loss in a |
| 378 // row after which QUIC should be disabled. Returns 0 if the default value |
| 379 // should be used. |
| 380 static int GetQuicMaxNumberOfLossyConnections( |
| 381 const VariationParameters& quic_trial_params); |
| 382 |
| 383 // Returns the packet loss rate in fraction after which a QUIC connection is |
| 384 // closed and is considered as a lossy connection. Returns 0 if the default |
| 385 // value should be used. |
| 386 static float GetQuicPacketLossThreshold( |
| 387 const VariationParameters& quic_trial_params); |
| 388 |
375 // Returns the size of the QUIC receive buffer to use, or 0 if | 389 // Returns the size of the QUIC receive buffer to use, or 0 if |
376 // the default should be used. | 390 // the default should be used. |
377 static int GetQuicSocketReceiveBufferSize( | 391 static int GetQuicSocketReceiveBufferSize( |
378 const VariationParameters& quic_trial_params); | 392 const VariationParameters& quic_trial_params); |
379 | 393 |
380 // Returns the maximum length for QUIC packets, based on any flags in | 394 // Returns the maximum length for QUIC packets, based on any flags in |
381 // |command_line| or the field trial. Returns 0 if there is an error | 395 // |command_line| or the field trial. Returns 0 if there is an error |
382 // parsing any of the options, or if the default value should be used. | 396 // parsing any of the options, or if the default value should be used. |
383 static size_t GetQuicMaxPacketLength( | 397 static size_t GetQuicMaxPacketLength( |
384 const base::CommandLine& command_line, | 398 const base::CommandLine& command_line, |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 bool is_spdy_disabled_by_policy_; | 475 bool is_spdy_disabled_by_policy_; |
462 | 476 |
463 const base::TimeTicks creation_time_; | 477 const base::TimeTicks creation_time_; |
464 | 478 |
465 base::WeakPtrFactory<IOThread> weak_factory_; | 479 base::WeakPtrFactory<IOThread> weak_factory_; |
466 | 480 |
467 DISALLOW_COPY_AND_ASSIGN(IOThread); | 481 DISALLOW_COPY_AND_ASSIGN(IOThread); |
468 }; | 482 }; |
469 | 483 |
470 #endif // CHROME_BROWSER_IO_THREAD_H_ | 484 #endif // CHROME_BROWSER_IO_THREAD_H_ |
OLD | NEW |