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

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: Addressed comments Created 5 years, 2 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/udp/udp_client_socket.cc » ('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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 Optional<int> quic_max_number_of_lossy_connections; 202 Optional<int> quic_max_number_of_lossy_connections;
203 Optional<float> quic_packet_loss_threshold; 203 Optional<float> quic_packet_loss_threshold;
204 Optional<int> quic_socket_receive_buffer_size; 204 Optional<int> quic_socket_receive_buffer_size;
205 Optional<bool> quic_delay_tcp_race; 205 Optional<bool> quic_delay_tcp_race;
206 Optional<size_t> quic_max_packet_length; 206 Optional<size_t> quic_max_packet_length;
207 net::QuicTagVector quic_connection_options; 207 net::QuicTagVector quic_connection_options;
208 Optional<std::string> quic_user_agent_id; 208 Optional<std::string> quic_user_agent_id;
209 Optional<net::QuicVersionVector> quic_supported_versions; 209 Optional<net::QuicVersionVector> quic_supported_versions;
210 Optional<net::HostPortPair> origin_to_force_quic_on; 210 Optional<net::HostPortPair> origin_to_force_quic_on;
211 Optional<bool> quic_close_sessions_on_ip_change; 211 Optional<bool> quic_close_sessions_on_ip_change;
212 Optional<bool> quic_migrate_sessions_on_net_change;
212 bool enable_user_alternate_protocol_ports; 213 bool enable_user_alternate_protocol_ports;
213 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a 214 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a
214 // main frame load fails with a DNS error in order to provide more useful 215 // main frame load fails with a DNS error in order to provide more useful
215 // information to the renderer so it can show a more specific error page. 216 // information to the renderer so it can show a more specific error page.
216 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; 217 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service;
217 }; 218 };
218 219
219 // |net_log| must either outlive the IOThread or be NULL. 220 // |net_log| must either outlive the IOThread or be NULL.
220 IOThread(PrefService* local_state, 221 IOThread(PrefService* local_state,
221 policy::PolicyService* policy_service, 222 policy::PolicyService* policy_service,
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
414 415
415 // Returns true if QUIC should delay TCP connection when QUIC works. 416 // Returns true if QUIC should delay TCP connection when QUIC works.
416 static bool ShouldQuicDelayTcpRace( 417 static bool ShouldQuicDelayTcpRace(
417 const VariationParameters& quic_trial_params); 418 const VariationParameters& quic_trial_params);
418 419
419 // Returns true if QUIC should close sessions when the client's IP address 420 // Returns true if QUIC should close sessions when the client's IP address
420 // changes. 421 // changes.
421 static bool ShouldQuicCloseSessionsOnIpChange( 422 static bool ShouldQuicCloseSessionsOnIpChange(
422 const VariationParameters& quic_trial_params); 423 const VariationParameters& quic_trial_params);
423 424
425 // Returns true if QUIC should migrate sessions when primary network
426 // changes.
427 static bool ShouldQuicMigrateSessionsOnNetChange(
428 const VariationParameters& quic_trial_params);
429
424 // Returns the maximum length for QUIC packets, based on any flags in 430 // Returns the maximum length for QUIC packets, based on any flags in
425 // |command_line| or the field trial. Returns 0 if there is an error 431 // |command_line| or the field trial. Returns 0 if there is an error
426 // parsing any of the options, or if the default value should be used. 432 // parsing any of the options, or if the default value should be used.
427 static size_t GetQuicMaxPacketLength( 433 static size_t GetQuicMaxPacketLength(
428 const base::CommandLine& command_line, 434 const base::CommandLine& command_line,
429 const VariationParameters& quic_trial_params); 435 const VariationParameters& quic_trial_params);
430 436
431 // Returns the QUIC versions specified by any flags in |command_line| 437 // Returns the QUIC versions specified by any flags in |command_line|
432 // or |quic_trial_params|. 438 // or |quic_trial_params|.
433 static net::QuicVersion GetQuicVersion( 439 static net::QuicVersion GetQuicVersion(
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 external_data_use_observer_; 533 external_data_use_observer_;
528 534
529 const base::TimeTicks creation_time_; 535 const base::TimeTicks creation_time_;
530 536
531 base::WeakPtrFactory<IOThread> weak_factory_; 537 base::WeakPtrFactory<IOThread> weak_factory_;
532 538
533 DISALLOW_COPY_AND_ASSIGN(IOThread); 539 DISALLOW_COPY_AND_ASSIGN(IOThread);
534 }; 540 };
535 541
536 #endif // CHROME_BROWSER_IO_THREAD_H_ 542 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | net/udp/udp_client_socket.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698