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

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

Issue 811073004: QUIC - don't load data from disk cache if alternate protocol map doesn't (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 load_server_info_if_already_spoke_quic,
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
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 if we do not want to load QUIC server information when
293 // AlternateProtocolMap doesn't have an entry for QUIC.
294 bool load_server_info_if_already_spoke_quic_;
295
291 // Each profile will (probably) have a unique port_seed_ value. This value is 296 // 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 297 // used to help seed a pseudo-random number generator (PortSuggester) so that
293 // we consistently (within this profile) suggest the same ephemeral port when 298 // we consistently (within this profile) suggest the same ephemeral port when
294 // we re-connect to any given server/port. The differences between profiles 299 // we re-connect to any given server/port. The differences between profiles
295 // (probablistically) prevent two profiles from colliding in their ephemeral 300 // (probablistically) prevent two profiles from colliding in their ephemeral
296 // port requests. 301 // port requests.
297 uint64 port_seed_; 302 uint64 port_seed_;
298 303
299 // Local address of socket that was created in CreateSession. 304 // Local address of socket that was created in CreateSession.
300 IPEndPoint local_address_; 305 IPEndPoint local_address_;
301 bool check_persisted_supports_quic_; 306 bool check_persisted_supports_quic_;
302 std::set<HostPortPair> quic_supported_servers_at_startup_; 307 std::set<HostPortPair> quic_supported_servers_at_startup_;
303 308
304 base::TaskRunner* task_runner_; 309 base::TaskRunner* task_runner_;
305 310
306 base::WeakPtrFactory<QuicStreamFactory> weak_factory_; 311 base::WeakPtrFactory<QuicStreamFactory> weak_factory_;
307 312
308 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory); 313 DISALLOW_COPY_AND_ASSIGN(QuicStreamFactory);
309 }; 314 };
310 315
311 } // namespace net 316 } // namespace net
312 317
313 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_ 318 #endif // NET_QUIC_QUIC_STREAM_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698