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

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

Issue 938003003: Add a new enable_nonblocking_io field trial param for QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: working Created 5 years, 9 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 <list> 8 #include <list>
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 size_t max_packet_length, 102 size_t max_packet_length,
103 const std::string& user_agent_id, 103 const std::string& user_agent_id,
104 const QuicVersionVector& supported_versions, 104 const QuicVersionVector& supported_versions,
105 bool enable_port_selection, 105 bool enable_port_selection,
106 bool always_require_handshake_confirmation, 106 bool always_require_handshake_confirmation,
107 bool disable_connection_pooling, 107 bool disable_connection_pooling,
108 int load_server_info_timeout, 108 int load_server_info_timeout,
109 float load_server_info_timeout_srtt_multiplier, 109 float load_server_info_timeout_srtt_multiplier,
110 bool enable_truncated_connection_ids, 110 bool enable_truncated_connection_ids,
111 bool enable_connection_racing, 111 bool enable_connection_racing,
112 bool enable_nonblocking_io,
112 bool disable_disk_cache, 113 bool disable_disk_cache,
113 const QuicTagVector& connection_options); 114 const QuicTagVector& connection_options);
114 ~QuicStreamFactory() override; 115 ~QuicStreamFactory() override;
115 116
116 // Creates a new QuicHttpStream to |host_port_pair| which will be 117 // Creates a new QuicHttpStream to |host_port_pair| which will be
117 // owned by |request|. |is_https| specifies if the protocol is https or not. 118 // owned by |request|. |is_https| specifies if the protocol is https or not.
118 // If a matching session already exists, this method will return OK. If no 119 // If a matching session already exists, this method will return OK. If no
119 // matching session exists, this will return ERR_IO_PENDING and will invoke 120 // matching session exists, this will return ERR_IO_PENDING and will invoke
120 // OnRequestComplete asynchronously. 121 // OnRequestComplete asynchronously.
121 int Create(const HostPortPair& host_port_pair, 122 int Create(const HostPortPair& host_port_pair,
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 float load_server_info_timeout_srtt_multiplier_; 323 float load_server_info_timeout_srtt_multiplier_;
323 324
324 // Set this for setting config's BytesForConnectionIdToSend (TCID param) to 0. 325 // Set this for setting config's BytesForConnectionIdToSend (TCID param) to 0.
325 bool enable_truncated_connection_ids_; 326 bool enable_truncated_connection_ids_;
326 327
327 // Set if we want to race connections - one connection that sends 328 // Set if we want to race connections - one connection that sends
328 // INCHOATE_HELLO and another connection that sends CHLO after loading server 329 // INCHOATE_HELLO and another connection that sends CHLO after loading server
329 // config from the disk cache. 330 // config from the disk cache.
330 bool enable_connection_racing_; 331 bool enable_connection_racing_;
331 332
333 // Set if experimental non-blocking IO should be used on windows sockets.
334 bool enable_nonblocking_io_;
335
332 // Set if we do not want to load server config from the disk cache. 336 // Set if we do not want to load server config from the disk cache.
333 bool disable_disk_cache_; 337 bool disable_disk_cache_;
334 338
335 // Each profile will (probably) have a unique port_seed_ value. This value is 339 // Each profile will (probably) have a unique port_seed_ value. This value is
336 // used to help seed a pseudo-random number generator (PortSuggester) so that 340 // used to help seed a pseudo-random number generator (PortSuggester) so that
337 // we consistently (within this profile) suggest the same ephemeral port when 341 // we consistently (within this profile) suggest the same ephemeral port when
338 // we re-connect to any given server/port. The differences between profiles 342 // we re-connect to any given server/port. The differences between profiles
339 // (probablistically) prevent two profiles from colliding in their ephemeral 343 // (probablistically) prevent two profiles from colliding in their ephemeral
340 // port requests. 344 // port requests.
341 uint64 port_seed_; 345 uint64 port_seed_;
342 346
343 // Local address of socket that was created in CreateSession. 347 // Local address of socket that was created in CreateSession.
344 IPEndPoint local_address_; 348 IPEndPoint local_address_;
345 bool check_persisted_supports_quic_; 349 bool check_persisted_supports_quic_;
346 std::set<HostPortPair> quic_supported_servers_at_startup_; 350 std::set<HostPortPair> quic_supported_servers_at_startup_;
347 351
348 NetworkConnection network_connection_; 352 NetworkConnection network_connection_;
349 353
350 base::TaskRunner* task_runner_; 354 base::TaskRunner* task_runner_;
351 355
352 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 356 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
353 357
354 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 358 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
355 }; 359 };
356 360
357 } // namespace net 361 } // namespace net
358 362
359 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 363 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698