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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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_session_test.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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool disable_loading_server_info_for_new_servers,
109 float load_server_info_timeout_srtt_multiplier,
109 const QuicTagVector& connection_options); 110 const QuicTagVector& connection_options);
110 ~QuicStreamFactory() override; 111 ~QuicStreamFactory() override;
111 112
112 // Creates a new QuicHttpStream to |host_port_pair| which will be 113 // Creates a new QuicHttpStream to |host_port_pair| which will be
113 // owned by |request|. |is_https| specifies if the protocol is https or not. 114 // owned by |request|. |is_https| specifies if the protocol is https or not.
114 // If a matching session already exists, this method will return OK. If no 115 // If a matching session already exists, this method will return OK. If no
115 // matching session exists, this will return ERR_IO_PENDING and will invoke 116 // matching session exists, this will return ERR_IO_PENDING and will invoke
116 // OnRequestComplete asynchronously. 117 // OnRequestComplete asynchronously.
117 int Create(const HostPortPair& host_port_pair, 118 int Create(const HostPortPair& host_port_pair,
118 bool is_https, 119 bool is_https,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 bool HasActiveSession(const QuicServerId& server_id) const; 220 bool HasActiveSession(const QuicServerId& server_id) const;
220 bool HasActiveJob(const QuicServerId& server_id) const; 221 bool HasActiveJob(const QuicServerId& server_id) const;
221 int CreateSession(const QuicServerId& server_id, 222 int CreateSession(const QuicServerId& server_id,
222 scoped_ptr<QuicServerInfo> quic_server_info, 223 scoped_ptr<QuicServerInfo> quic_server_info,
223 const AddressList& address_list, 224 const AddressList& address_list,
224 const BoundNetLog& net_log, 225 const BoundNetLog& net_log,
225 QuicClientSession** session); 226 QuicClientSession** session);
226 void ActivateSession(const QuicServerId& key, 227 void ActivateSession(const QuicServerId& key,
227 QuicClientSession* session); 228 QuicClientSession* session);
228 229
230 // Returns |srtt| in micro seconds from ServerNetworkStats. Returns 0 if there
231 // is no |http_server_properties_| or if |http_server_properties_| doesn't
232 // have ServerNetworkStats for the given |server_id|.
233 int64 GetServerNetworkStatsSmoothedRttInMicroseconds(
234 const QuicServerId& server_id) const;
235
229 // Initializes the cached state associated with |server_id| in 236 // Initializes the cached state associated with |server_id| in
230 // |crypto_config_| with the information in |server_info|. 237 // |crypto_config_| with the information in |server_info|.
231 void InitializeCachedStateInCryptoConfig( 238 void InitializeCachedStateInCryptoConfig(
232 const QuicServerId& server_id, 239 const QuicServerId& server_id,
233 const scoped_ptr<QuicServerInfo>& server_info); 240 const scoped_ptr<QuicServerInfo>& server_info);
234 241
235 void ProcessGoingAwaySession(QuicClientSession* session, 242 void ProcessGoingAwaySession(QuicClientSession* session,
236 const QuicServerId& server_id, 243 const QuicServerId& server_id,
237 bool was_session_active); 244 bool was_session_active);
238 245
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // Specifies the timeout in milliseconds to wait for loading of QUIC server 294 // Specifies the timeout in milliseconds to wait for loading of QUIC server
288 // information. If we don't want to timeout, set 295 // information. If we don't want to timeout, set
289 // |load_server_info_timeout_ms_| to 0. 296 // |load_server_info_timeout_ms_| to 0.
290 int load_server_info_timeout_ms_; 297 int load_server_info_timeout_ms_;
291 298
292 // Set to disable loading of QUIC server information from disk cache for new 299 // 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 300 // servers. New servers are those servers for which there is no QUIC protocol
294 // entry in AlternateProtocolMap. 301 // entry in AlternateProtocolMap.
295 bool disable_loading_server_info_for_new_servers_; 302 bool disable_loading_server_info_for_new_servers_;
296 303
304 // Specifies the ratio between time to load QUIC server information from disk
305 // cache to 'smoothed RTT'. This ratio is used to calculate the timeout in
306 // milliseconds to wait for loading of QUIC server information. If we don't
307 // want to timeout, set |load_server_info_timeout_srtt_multiplier_| to 0.
308 float load_server_info_timeout_srtt_multiplier_;
309
297 // Each profile will (probably) have a unique port_seed_ value. This value is 310 // Each profile will (probably) have a unique port_seed_ value. This value is
298 // used to help seed a pseudo-random number generator (PortSuggester) so that 311 // used to help seed a pseudo-random number generator (PortSuggester) so that
299 // we consistently (within this profile) suggest the same ephemeral port when 312 // we consistently (within this profile) suggest the same ephemeral port when
300 // we re-connect to any given server/port. The differences between profiles 313 // we re-connect to any given server/port. The differences between profiles
301 // (probablistically) prevent two profiles from colliding in their ephemeral 314 // (probablistically) prevent two profiles from colliding in their ephemeral
302 // port requests. 315 // port requests.
303 uint64 port_seed_; 316 uint64 port_seed_;
304 317
305 // Local address of socket that was created in CreateSession. 318 // Local address of socket that was created in CreateSession.
306 IPEndPoint local_address_; 319 IPEndPoint local_address_;
307 bool check_persisted_supports_quic_; 320 bool check_persisted_supports_quic_;
308 std::set<HostPortPair> quic_supported_servers_at_startup_; 321 std::set<HostPortPair> quic_supported_servers_at_startup_;
309 322
310 base::TaskRunner* task_runner_; 323 base::TaskRunner* task_runner_;
311 324
312 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 325 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
313 326
314 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 327 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
315 }; 328 };
316 329
317 } // namespace net 330 } // namespace net
318 331
319 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 332 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW
« no previous file with comments | « net/quic/quic_session_test.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698