OLD | NEW |
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 always_require_handshake_confirmation, | 105 bool always_require_handshake_confirmation, |
106 bool disable_connection_pooling, | 106 bool disable_connection_pooling, |
107 int load_server_info_timeout, | 107 int load_server_info_timeout, |
| 108 bool disable_loading_server_info_for_new_servers, |
108 const QuicTagVector& connection_options); | 109 const QuicTagVector& connection_options); |
109 ~QuicStreamFactory() override; | 110 ~QuicStreamFactory() override; |
110 | 111 |
111 // Creates a new QuicHttpStream to |host_port_pair| which will be | 112 // Creates a new QuicHttpStream to |host_port_pair| which will be |
112 // owned by |request|. |is_https| specifies if the protocol is https or not. | 113 // owned by |request|. |is_https| specifies if the protocol is https or not. |
113 // If a matching session already exists, this method will return OK. If no | 114 // If a matching session already exists, this method will return OK. If no |
114 // matching session exists, this will return ERR_IO_PENDING and will invoke | 115 // matching session exists, this will return ERR_IO_PENDING and will invoke |
115 // OnRequestComplete asynchronously. | 116 // OnRequestComplete asynchronously. |
116 int Create(const HostPortPair& host_port_pair, | 117 int Create(const HostPortPair& host_port_pair, |
117 bool is_https, | 118 bool is_https, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 bool always_require_handshake_confirmation_; | 282 bool always_require_handshake_confirmation_; |
282 | 283 |
283 // Set if we do not want connection pooling. | 284 // Set if we do not want connection pooling. |
284 bool disable_connection_pooling_; | 285 bool disable_connection_pooling_; |
285 | 286 |
286 // Specifies the timeout in milliseconds to wait for loading of QUIC server | 287 // Specifies the timeout in milliseconds to wait for loading of QUIC server |
287 // information. If we don't want to timeout, set | 288 // information. If we don't want to timeout, set |
288 // |load_server_info_timeout_ms_| to 0. | 289 // |load_server_info_timeout_ms_| to 0. |
289 int load_server_info_timeout_ms_; | 290 int load_server_info_timeout_ms_; |
290 | 291 |
| 292 // Set to disable loading of QUIC server information from disk cache for new |
| 293 // servers. New servers are those servers for which there is no QUIC protocol |
| 294 // entry in AlternateProtocolMap. |
| 295 bool disable_loading_server_info_for_new_servers_; |
| 296 |
291 // Each profile will (probably) have a unique port_seed_ value. This value is | 297 // Each profile will (probably) have a unique port_seed_ value. This value is |
292 // used to help seed a pseudo-random number generator (PortSuggester) so that | 298 // used to help seed a pseudo-random number generator (PortSuggester) so that |
293 // we consistently (within this profile) suggest the same ephemeral port when | 299 // we consistently (within this profile) suggest the same ephemeral port when |
294 // we re-connect to any given server/port. The differences between profiles | 300 // we re-connect to any given server/port. The differences between profiles |
295 // (probablistically) prevent two profiles from colliding in their ephemeral | 301 // (probablistically) prevent two profiles from colliding in their ephemeral |
296 // port requests. | 302 // port requests. |
297 uint64 port_seed_; | 303 uint64 port_seed_; |
298 | 304 |
299 // Local address of socket that was created in CreateSession. | 305 // Local address of socket that was created in CreateSession. |
300 IPEndPoint local_address_; | 306 IPEndPoint local_address_; |
301 bool check_persisted_supports_quic_; | 307 bool check_persisted_supports_quic_; |
302 std::set<HostPortPair> quic_supported_servers_at_startup_; | 308 std::set<HostPortPair> quic_supported_servers_at_startup_; |
303 | 309 |
304 base::TaskRunner* task_runner_; | 310 base::TaskRunner* task_runner_; |
305 | 311 |
306 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; | 312 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; |
307 | 313 |
308 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); | 314 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); |
309 }; | 315 }; |
310 | 316 |
311 } // namespace net | 317 } // namespace net |
312 | 318 |
313 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ | 319 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ |
OLD | NEW |