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

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

Issue 551903002: Adds ability to disable connection pooling in QUIC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit addressed. Created 6 years, 3 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/http/http_network_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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 TransportSecurityState* transport_security_state, 97 TransportSecurityState* transport_security_state,
98 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory, 98 QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory,
99 QuicRandom* random_generator, 99 QuicRandom* random_generator,
100 QuicClock* clock, 100 QuicClock* clock,
101 size_t max_packet_length, 101 size_t max_packet_length,
102 const std::string& user_agent_id, 102 const std::string& user_agent_id,
103 const QuicVersionVector& supported_versions, 103 const QuicVersionVector& supported_versions,
104 bool enable_port_selection, 104 bool enable_port_selection,
105 bool enable_time_based_loss_detection, 105 bool enable_time_based_loss_detection,
106 bool always_require_handshake_confirmation, 106 bool always_require_handshake_confirmation,
107 bool disable_connection_pooling,
107 const QuicTagVector& connection_options); 108 const QuicTagVector& connection_options);
108 virtual ~QuicStreamFactory(); 109 virtual ~QuicStreamFactory();
109 110
110 // Creates a new QuicHttpStream to |host_port_pair| which will be 111 // Creates a new QuicHttpStream to |host_port_pair| which will be
111 // owned by |request|. |is_https| specifies if the protocol is https or not. 112 // owned by |request|. |is_https| specifies if the protocol is https or not.
112 // If a matching session already exists, this method will return OK. If no 113 // If a matching session already exists, this method will return OK. If no
113 // matching session exists, this will return ERR_IO_PENDING and will invoke 114 // matching session exists, this will return ERR_IO_PENDING and will invoke
114 // OnRequestComplete asynchronously. 115 // OnRequestComplete asynchronously.
115 int Create(const HostPortPair& host_port_pair, 116 int Create(const HostPortPair& host_port_pair,
116 bool is_https, 117 bool is_https,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 275
275 // Determine if we should consistently select a client UDP port. If false, 276 // Determine if we should consistently select a client UDP port. If false,
276 // then we will just let the OS select a random client port for each new 277 // then we will just let the OS select a random client port for each new
277 // connection. 278 // connection.
278 bool enable_port_selection_; 279 bool enable_port_selection_;
279 280
280 // Set if we always require handshake confirmation. If true, this will 281 // Set if we always require handshake confirmation. If true, this will
281 // introduce at least one RTT for the handshake before the client sends data. 282 // introduce at least one RTT for the handshake before the client sends data.
282 bool always_require_handshake_confirmation_; 283 bool always_require_handshake_confirmation_;
283 284
285 // Set if we do not want connection pooling.
286 bool disable_connection_pooling_;
287
284 // Each profile will (probably) have a unique port_seed_ value. This value is 288 // Each profile will (probably) have a unique port_seed_ value. This value is
285 // used to help seed a pseudo-random number generator (PortSuggester) so that 289 // used to help seed a pseudo-random number generator (PortSuggester) so that
286 // we consistently (within this profile) suggest the same ephemeral port when 290 // we consistently (within this profile) suggest the same ephemeral port when
287 // we re-connect to any given server/port. The differences between profiles 291 // we re-connect to any given server/port. The differences between profiles
288 // (probablistically) prevent two profiles from colliding in their ephemeral 292 // (probablistically) prevent two profiles from colliding in their ephemeral
289 // port requests. 293 // port requests.
290 uint64 port_seed_; 294 uint64 port_seed_;
291 295
292 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 296 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
293 297
294 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 298 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
295 }; 299 };
296 300
297 } // namespace net 301 } // namespace net
298 302
299 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 303 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « net/http/http_network_session.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698