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

Side by Side Diff: net/quic/quic_stream_factory.h

Issue 1613513003: Early connection migration in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Style nit fixed. Created 4 years, 10 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
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 NET_QUIC_QUIC_STREAM_FACTORY_H_ 5 #ifndef NET_QUIC_QUIC_STREAM_FACTORY_H_
6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_ 6 #define NET_QUIC_QUIC_STREAM_FACTORY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 int max_recent_disabled_reasons, 145 int max_recent_disabled_reasons,
146 int threshold_timeouts_with_streams_open, 146 int threshold_timeouts_with_streams_open,
147 int threshold_public_resets_post_handshake, 147 int threshold_public_resets_post_handshake,
148 int socket_receive_buffer_size, 148 int socket_receive_buffer_size,
149 bool delay_tcp_race, 149 bool delay_tcp_race,
150 int max_server_configs_stored_in_properties, 150 int max_server_configs_stored_in_properties,
151 bool close_sessions_on_ip_change, 151 bool close_sessions_on_ip_change,
152 bool disable_quic_on_timeout_with_open_streams, 152 bool disable_quic_on_timeout_with_open_streams,
153 int idle_connection_timeout_seconds, 153 int idle_connection_timeout_seconds,
154 bool migrate_sessions_on_network_change, 154 bool migrate_sessions_on_network_change,
155 bool migrate_sessions_early,
155 const QuicTagVector& connection_options); 156 const QuicTagVector& connection_options);
156 ~QuicStreamFactory() override; 157 ~QuicStreamFactory() override;
157 158
158 // Returns true if there is an existing session to |server_id| which can be 159 // Returns true if there is an existing session to |server_id| which can be
159 // used for request to |origin_host|. 160 // used for request to |origin_host|.
160 bool CanUseExistingSession(QuicServerId server_id, 161 bool CanUseExistingSession(QuicServerId server_id,
161 PrivacyMode privacy_mode, 162 PrivacyMode privacy_mode,
162 StringPiece origin_host); 163 StringPiece origin_host);
163 164
164 // Creates a new QuicHttpStream to |host_port_pair| which will be 165 // Creates a new QuicHttpStream to |host_port_pair| which will be
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 int yield_after_packets_; 496 int yield_after_packets_;
496 QuicTime::Delta yield_after_duration_; 497 QuicTime::Delta yield_after_duration_;
497 498
498 // Set if all sessions should be closed when any local IP address changes. 499 // Set if all sessions should be closed when any local IP address changes.
499 const bool close_sessions_on_ip_change_; 500 const bool close_sessions_on_ip_change_;
500 501
501 // Set if migration should be attempted on active sessions when primary 502 // Set if migration should be attempted on active sessions when primary
502 // interface changes. 503 // interface changes.
503 const bool migrate_sessions_on_network_change_; 504 const bool migrate_sessions_on_network_change_;
504 505
506 // Set if early migration should be attempted when the connection
507 // experiences poor connectivity.
508 const bool migrate_sessions_early_;
509
505 // Each profile will (probably) have a unique port_seed_ value. This value 510 // Each profile will (probably) have a unique port_seed_ value. This value
506 // is used to help seed a pseudo-random number generator (PortSuggester) so 511 // is used to help seed a pseudo-random number generator (PortSuggester) so
507 // that we consistently (within this profile) suggest the same ephemeral 512 // that we consistently (within this profile) suggest the same ephemeral
508 // port when we re-connect to any given server/port. The differences between 513 // port when we re-connect to any given server/port. The differences between
509 // profiles (probablistically) prevent two profiles from colliding in their 514 // profiles (probablistically) prevent two profiles from colliding in their
510 // ephemeral port requests. 515 // ephemeral port requests.
511 uint64_t port_seed_; 516 uint64_t port_seed_;
512 517
513 // Local address of socket that was created in CreateSession. 518 // Local address of socket that was created in CreateSession.
514 IPEndPoint local_address_; 519 IPEndPoint local_address_;
515 bool check_persisted_supports_quic_; 520 bool check_persisted_supports_quic_;
516 bool has_initialized_data_; 521 bool has_initialized_data_;
517 std::set<HostPortPair> quic_supported_servers_at_startup_; 522 std::set<HostPortPair> quic_supported_servers_at_startup_;
518 523
519 NetworkConnection network_connection_; 524 NetworkConnection network_connection_;
520 525
521 QuicPromisedByUrlMap promised_by_url_; 526 QuicPromisedByUrlMap promised_by_url_;
522 527
523 base::TaskRunner* task_runner_; 528 base::TaskRunner* task_runner_;
524 529
525 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 530 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
526 531
527 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 532 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
528 }; 533 };
529 534
530 } // namespace net 535 } // namespace net
531 536
532 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 537 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698