Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: chrome/browser/io_thread.h

Issue 1327923002: Migrates QUIC sessions to a new network when old network is (about to be) disconnected. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: More tests added and some fixes. Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | net/quic/quic_stream_factory.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 Optional<int> quic_socket_receive_buffer_size; 226 Optional<int> quic_socket_receive_buffer_size;
227 Optional<bool> quic_delay_tcp_race; 227 Optional<bool> quic_delay_tcp_race;
228 Optional<size_t> quic_max_packet_length; 228 Optional<size_t> quic_max_packet_length;
229 net::QuicTagVector quic_connection_options; 229 net::QuicTagVector quic_connection_options;
230 Optional<std::string> quic_user_agent_id; 230 Optional<std::string> quic_user_agent_id;
231 Optional<net::QuicVersionVector> quic_supported_versions; 231 Optional<net::QuicVersionVector> quic_supported_versions;
232 Optional<net::HostPortPair> origin_to_force_quic_on; 232 Optional<net::HostPortPair> origin_to_force_quic_on;
233 Optional<bool> quic_close_sessions_on_ip_change; 233 Optional<bool> quic_close_sessions_on_ip_change;
234 Optional<int> quic_idle_connection_timeout_seconds; 234 Optional<int> quic_idle_connection_timeout_seconds;
235 Optional<bool> quic_disable_preconnect_if_0rtt; 235 Optional<bool> quic_disable_preconnect_if_0rtt;
236 Optional<bool> quic_migrate_sessions_on_network_change;
236 bool enable_user_alternate_protocol_ports; 237 bool enable_user_alternate_protocol_ports;
237 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a 238 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a
238 // main frame load fails with a DNS error in order to provide more useful 239 // main frame load fails with a DNS error in order to provide more useful
239 // information to the renderer so it can show a more specific error page. 240 // information to the renderer so it can show a more specific error page.
240 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; 241 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service;
241 }; 242 };
242 243
243 // |net_log| must either outlive the IOThread or be NULL. 244 // |net_log| must either outlive the IOThread or be NULL.
244 IOThread(PrefService* local_state, 245 IOThread(PrefService* local_state,
245 policy::PolicyService* policy_service, 246 policy::PolicyService* policy_service,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 const VariationParameters& quic_trial_params); 447 const VariationParameters& quic_trial_params);
447 448
448 // Returns the idle connection timeout for QUIC connections. Returns 0 if 449 // Returns the idle connection timeout for QUIC connections. Returns 0 if
449 // there is an error parsing any of the options, or if the default value 450 // there is an error parsing any of the options, or if the default value
450 // should be used. 451 // should be used.
451 static int GetQuicIdleConnectionTimeoutSeconds( 452 static int GetQuicIdleConnectionTimeoutSeconds(
452 const VariationParameters& quic_trial_params); 453 const VariationParameters& quic_trial_params);
453 454
454 // Returns true if PreConnect should be disabled if QUIC can do 0RTT. 455 // Returns true if PreConnect should be disabled if QUIC can do 0RTT.
455 static bool ShouldQuicDisablePreConnectIfZeroRtt( 456 static bool ShouldQuicDisablePreConnectIfZeroRtt(
457
458 // Returns true if QUIC should migrate sessions when primary network
459 // changes.
460 static bool ShouldQuicMigrateSessionsOnNetworkChange(
456 const VariationParameters& quic_trial_params); 461 const VariationParameters& quic_trial_params);
457 462
458 // Returns the maximum length for QUIC packets, based on any flags in 463 // Returns the maximum length for QUIC packets, based on any flags in
459 // |command_line| or the field trial. Returns 0 if there is an error 464 // |command_line| or the field trial. Returns 0 if there is an error
460 // parsing any of the options, or if the default value should be used. 465 // parsing any of the options, or if the default value should be used.
461 static size_t GetQuicMaxPacketLength( 466 static size_t GetQuicMaxPacketLength(
462 const base::CommandLine& command_line, 467 const base::CommandLine& command_line,
463 const VariationParameters& quic_trial_params); 468 const VariationParameters& quic_trial_params);
464 469
465 // Returns the QUIC versions specified by any flags in |command_line| 470 // Returns the QUIC versions specified by any flags in |command_line|
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 bool is_quic_allowed_by_policy_; 569 bool is_quic_allowed_by_policy_;
565 570
566 const base::TimeTicks creation_time_; 571 const base::TimeTicks creation_time_;
567 572
568 base::WeakPtrFactory<IOThread> weak_factory_; 573 base::WeakPtrFactory<IOThread> weak_factory_;
569 574
570 DISALLOW_COPY_AND_ASSIGN(IOThread); 575 DISALLOW_COPY_AND_ASSIGN(IOThread);
571 }; 576 };
572 577
573 #endif // CHROME_BROWSER_IO_THREAD_H_ 578 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | net/quic/quic_stream_factory.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698