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

Unified Diff: net/quic/quic_stream_factory.h

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_server.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_factory.h
diff --git a/net/quic/quic_stream_factory.h b/net/quic/quic_stream_factory.h
index f13156a94a0d16bf81930ec18e7ae429aaaca2af..1b9946ddcc80f54b03c05b579b80cdd1f591fdbd 100644
--- a/net/quic/quic_stream_factory.h
+++ b/net/quic/quic_stream_factory.h
@@ -107,6 +107,7 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
int load_server_info_timeout,
float load_server_info_timeout_srtt_multiplier,
bool enable_truncated_connection_ids,
+ bool enable_connection_racing,
const QuicTagVector& connection_options);
~QuicStreamFactory() override;
@@ -178,6 +179,11 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
quic_server_info_factory_ = quic_server_info_factory;
}
+ bool enable_connection_racing() const { return enable_connection_racing_; }
+ void set_enable_connection_racing(bool enable_connection_racing) {
+ enable_connection_racing_ = enable_connection_racing;
+ }
+
private:
class Job;
friend class test::QuicStreamFactoryPeer;
@@ -204,10 +210,17 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
typedef std::set<QuicClientSession*> SessionSet;
typedef std::map<IpAliasKey, SessionSet> IPAliasMap;
typedef std::map<QuicServerId, QuicCryptoClientConfig*> CryptoConfigMap;
- typedef std::map<QuicServerId, Job*> JobMap;
- typedef std::map<QuicStreamRequest*, Job*> RequestMap;
+ typedef std::set<Job*> JobSet;
+ typedef std::map<QuicServerId, JobSet> JobMap;
+ typedef std::map<QuicStreamRequest*, QuicServerId> RequestMap;
typedef std::set<QuicStreamRequest*> RequestSet;
- typedef std::map<Job*, RequestSet> JobRequestsMap;
+ typedef std::map<QuicServerId, RequestSet> ServerIDRequestsMap;
+
+ // Creates a job which doesn't wait for server config to be loaded from the
+ // disk cache. This job is started via a PostTask.
+ void CreateAuxilaryJob(const QuicServerId server_id,
+ bool is_post,
+ const BoundNetLog& net_log);
// Returns a newly created QuicHttpStream owned by the caller, if a
// matching session already exists. Returns NULL otherwise.
@@ -233,6 +246,10 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
int64 GetServerNetworkStatsSmoothedRttInMicroseconds(
const QuicServerId& server_id) const;
+ // Helped methods.
+ bool WasAlternateProtocolRecentlyBroken(const QuicServerId& server_id) const;
+ bool CryptoConfigCacheIsEmpty(const QuicServerId& server_id);
+
// Initializes the cached state associated with |server_id| in
// |crypto_config_| with the information in |server_info|.
void InitializeCachedStateInCryptoConfig(
@@ -274,7 +291,7 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
QuicCryptoClientConfig crypto_config_;
JobMap active_jobs_;
- JobRequestsMap job_requests_map_;
+ ServerIDRequestsMap job_requests_map_;
RequestMap active_requests_;
QuicVersionVector supported_versions_;
@@ -305,6 +322,11 @@ class NET_EXPORT_PRIVATE QuicStreamFactory
// Set this for setting config's BytesForConnectionIdToSend (TCID param) to 0.
bool enable_truncated_connection_ids_;
+ // Set if we want to race connections - one connection that sends
+ // INCHOATE_HELLO and another connection that sends CHLO after loading server
+ // config from the disk cache.
+ bool enable_connection_racing_;
+
// Each profile will (probably) have a unique port_seed_ value. This value is
// used to help seed a pseudo-random number generator (PortSuggester) so that
// we consistently (within this profile) suggest the same ephemeral port when
« no previous file with comments | « net/quic/quic_server.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698