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

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: Rebase. Created 4 years, 11 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') | no next file with comments »
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 Optional<bool> quic_delay_tcp_race; 234 Optional<bool> quic_delay_tcp_race;
235 Optional<size_t> quic_max_packet_length; 235 Optional<size_t> quic_max_packet_length;
236 net::QuicTagVector quic_connection_options; 236 net::QuicTagVector quic_connection_options;
237 Optional<std::string> quic_user_agent_id; 237 Optional<std::string> quic_user_agent_id;
238 Optional<net::QuicVersionVector> quic_supported_versions; 238 Optional<net::QuicVersionVector> quic_supported_versions;
239 Optional<net::HostPortPair> origin_to_force_quic_on; 239 Optional<net::HostPortPair> origin_to_force_quic_on;
240 Optional<bool> quic_close_sessions_on_ip_change; 240 Optional<bool> quic_close_sessions_on_ip_change;
241 Optional<int> quic_idle_connection_timeout_seconds; 241 Optional<int> quic_idle_connection_timeout_seconds;
242 Optional<bool> quic_disable_preconnect_if_0rtt; 242 Optional<bool> quic_disable_preconnect_if_0rtt;
243 std::unordered_set<std::string> quic_host_whitelist; 243 std::unordered_set<std::string> quic_host_whitelist;
244 Optional<bool> quic_migrate_sessions_on_network_change;
244 bool enable_user_alternate_protocol_ports; 245 bool enable_user_alternate_protocol_ports;
245 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a 246 // NetErrorTabHelper uses |dns_probe_service| to send DNS probes when a
246 // main frame load fails with a DNS error in order to provide more useful 247 // main frame load fails with a DNS error in order to provide more useful
247 // information to the renderer so it can show a more specific error page. 248 // information to the renderer so it can show a more specific error page.
248 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service; 249 scoped_ptr<chrome_browser_net::DnsProbeService> dns_probe_service;
249 }; 250 };
250 251
251 // |net_log| must either outlive the IOThread or be NULL. 252 // |net_log| must either outlive the IOThread or be NULL.
252 IOThread(PrefService* local_state, 253 IOThread(PrefService* local_state,
253 policy::PolicyService* policy_service, 254 policy::PolicyService* policy_service,
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 462
462 // Returns true if PreConnect should be disabled if QUIC can do 0RTT. 463 // Returns true if PreConnect should be disabled if QUIC can do 0RTT.
463 static bool ShouldQuicDisablePreConnectIfZeroRtt( 464 static bool ShouldQuicDisablePreConnectIfZeroRtt(
464 const VariationParameters& quic_trial_params); 465 const VariationParameters& quic_trial_params);
465 466
466 // Returns the set of hosts to whitelist for QUIC. 467 // Returns the set of hosts to whitelist for QUIC.
467 static std::unordered_set<std::string> GetQuicHostWhitelist( 468 static std::unordered_set<std::string> GetQuicHostWhitelist(
468 const base::CommandLine& command_line, 469 const base::CommandLine& command_line,
469 const VariationParameters& quic_trial_params); 470 const VariationParameters& quic_trial_params);
470 471
472 // Returns true if QUIC should migrate sessions when primary network
473 // changes.
474 static bool ShouldQuicMigrateSessionsOnNetworkChange(
475 const VariationParameters& quic_trial_params);
476
471 // Returns the maximum length for QUIC packets, based on any flags in 477 // Returns the maximum length for QUIC packets, based on any flags in
472 // |command_line| or the field trial. Returns 0 if there is an error 478 // |command_line| or the field trial. Returns 0 if there is an error
473 // parsing any of the options, or if the default value should be used. 479 // parsing any of the options, or if the default value should be used.
474 static size_t GetQuicMaxPacketLength( 480 static size_t GetQuicMaxPacketLength(
475 const base::CommandLine& command_line, 481 const base::CommandLine& command_line,
476 const VariationParameters& quic_trial_params); 482 const VariationParameters& quic_trial_params);
477 483
478 // Returns the QUIC versions specified by any flags in |command_line| 484 // Returns the QUIC versions specified by any flags in |command_line|
479 // or |quic_trial_params|. 485 // or |quic_trial_params|.
480 static net::QuicVersion GetQuicVersion( 486 static net::QuicVersion GetQuicVersion(
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 bool is_quic_allowed_by_policy_; 583 bool is_quic_allowed_by_policy_;
578 584
579 const base::TimeTicks creation_time_; 585 const base::TimeTicks creation_time_;
580 586
581 base::WeakPtrFactory<IOThread> weak_factory_; 587 base::WeakPtrFactory<IOThread> weak_factory_;
582 588
583 DISALLOW_COPY_AND_ASSIGN(IOThread); 589 DISALLOW_COPY_AND_ASSIGN(IOThread);
584 }; 590 };
585 591
586 #endif // CHROME_BROWSER_IO_THREAD_H_ 592 #endif // CHROME_BROWSER_IO_THREAD_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/io_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698