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

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: Comments addressed. 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
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/quic/quic_stream_factory.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 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 int max_recent_disabled_reasons, 146 int max_recent_disabled_reasons,
147 int threshold_timeouts_with_streams_open, 147 int threshold_timeouts_with_streams_open,
148 int threshold_public_resets_post_handshake, 148 int threshold_public_resets_post_handshake,
149 int socket_receive_buffer_size, 149 int socket_receive_buffer_size,
150 bool delay_tcp_race, 150 bool delay_tcp_race,
151 int max_server_configs_stored_in_properties, 151 int max_server_configs_stored_in_properties,
152 bool close_sessions_on_ip_change, 152 bool close_sessions_on_ip_change,
153 bool disable_quic_on_timeout_with_open_streams, 153 bool disable_quic_on_timeout_with_open_streams,
154 int idle_connection_timeout_seconds, 154 int idle_connection_timeout_seconds,
155 bool migrate_sessions_on_network_change, 155 bool migrate_sessions_on_network_change,
156 bool migrate_sessions_early,
156 const QuicTagVector& connection_options); 157 const QuicTagVector& connection_options);
157 ~QuicStreamFactory() override; 158 ~QuicStreamFactory() override;
158 159
159 // Returns true if there is an existing session to |server_id| which can be 160 // Returns true if there is an existing session to |server_id| which can be
160 // used for request to |origin_host|. 161 // used for request to |origin_host|.
161 bool CanUseExistingSession(QuicServerId server_id, 162 bool CanUseExistingSession(QuicServerId server_id,
162 PrivacyMode privacy_mode, 163 PrivacyMode privacy_mode,
163 StringPiece origin_host); 164 StringPiece origin_host);
164 165
165 // Creates a new QuicHttpStream to |host_port_pair| which will be 166 // Creates a new QuicHttpStream to |host_port_pair| which will be
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 int yield_after_packets_; 502 int yield_after_packets_;
502 QuicTime::Delta yield_after_duration_; 503 QuicTime::Delta yield_after_duration_;
503 504
504 // Set if all sessions should be closed when any local IP address changes. 505 // Set if all sessions should be closed when any local IP address changes.
505 const bool close_sessions_on_ip_change_; 506 const bool close_sessions_on_ip_change_;
506 507
507 // Set if migration should be attempted on active sessions when primary 508 // Set if migration should be attempted on active sessions when primary
508 // interface changes. 509 // interface changes.
509 const bool migrate_sessions_on_network_change_; 510 const bool migrate_sessions_on_network_change_;
510 511
512 // Set if early migration should be attempted when the connection
513 // experiences poor connectivity.
514 const bool migrate_sessions_early_;
515
511 // Each profile will (probably) have a unique port_seed_ value. This value 516 // Each profile will (probably) have a unique port_seed_ value. This value
512 // is used to help seed a pseudo-random number generator (PortSuggester) so 517 // is used to help seed a pseudo-random number generator (PortSuggester) so
513 // that we consistently (within this profile) suggest the same ephemeral 518 // that we consistently (within this profile) suggest the same ephemeral
514 // port when we re-connect to any given server/port. The differences between 519 // port when we re-connect to any given server/port. The differences between
515 // profiles (probablistically) prevent two profiles from colliding in their 520 // profiles (probablistically) prevent two profiles from colliding in their
516 // ephemeral port requests. 521 // ephemeral port requests.
517 uint64_t port_seed_; 522 uint64_t port_seed_;
518 523
519 // Local address of socket that was created in CreateSession. 524 // Local address of socket that was created in CreateSession.
520 IPEndPoint local_address_; 525 IPEndPoint local_address_;
521 bool check_persisted_supports_quic_; 526 bool check_persisted_supports_quic_;
522 bool has_initialized_data_; 527 bool has_initialized_data_;
523 std::set<HostPortPair> quic_supported_servers_at_startup_; 528 std::set<HostPortPair> quic_supported_servers_at_startup_;
524 529
525 NetworkConnection network_connection_; 530 NetworkConnection network_connection_;
526 531
527 QuicClientPushPromiseIndex push_promise_index_; 532 QuicClientPushPromiseIndex push_promise_index_;
528 533
529 base::TaskRunner* task_runner_; 534 base::TaskRunner* task_runner_;
530 535
531 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 536 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
532 537
533 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 538 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
534 }; 539 };
535 540
536 } // namespace net 541 } // namespace net
537 542
538 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 543 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « net/quic/quic_chromium_client_session.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698