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

Unified Diff: net/quic/chromium/quic_stream_factory.h

Issue 2821053004: Revert of Remove the code to store and load QUIC server configs in the disk cache. (Closed)
Patch Set: Created 3 years, 8 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/chromium/quic_server_info.cc ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/quic_stream_factory.h
diff --git a/net/quic/chromium/quic_stream_factory.h b/net/quic/chromium/quic_stream_factory.h
index 661cfeb23ee6dcba3cfb4244d9c2be52189dfb8c..f0addeace2846b2a07a9a78f245a6ca5bc4a5744 100644
--- a/net/quic/chromium/quic_stream_factory.h
+++ b/net/quic/chromium/quic_stream_factory.h
@@ -66,6 +66,7 @@
class QuicCryptoClientStreamFactory;
class QuicRandom;
class QuicServerInfo;
+class QuicServerInfoFactory;
class QuicStreamFactory;
class SocketPerformanceWatcherFactory;
class TransportSecurityState;
@@ -207,8 +208,11 @@
size_t max_packet_length,
const std::string& user_agent_id,
const QuicVersionVector& supported_versions,
+ float load_server_info_timeout_srtt_multiplier,
+ bool enable_connection_racing,
bool enable_non_blocking_io,
- bool store_server_configs_in_properties,
+ bool disable_disk_cache,
+ int max_server_configs_stored_in_properties,
bool close_sessions_on_ip_change,
bool mark_quic_broken_when_network_blackholes,
int idle_connection_timeout_seconds,
@@ -364,8 +368,24 @@
QuicAlarmFactory* alarm_factory() { return alarm_factory_.get(); }
+ bool has_quic_server_info_factory() const {
+ return quic_server_info_factory_.get() != nullptr;
+ }
+
+ QuicServerInfoFactory* quic_server_info_factory() const {
+ return quic_server_info_factory_.get();
+ }
+
+ void set_quic_server_info_factory(
+ QuicServerInfoFactory* quic_server_info_factory);
+
void set_server_push_delegate(ServerPushDelegate* push_delegate) {
push_delegate_ = push_delegate;
+ }
+
+ bool enable_connection_racing() const { return enable_connection_racing_; }
+ void set_enable_connection_racing(bool enable_connection_racing) {
+ enable_connection_racing_ = enable_connection_racing;
}
bool migrate_sessions_on_network_change() const {
@@ -400,6 +420,12 @@
typedef std::map<QuicServerId, std::unique_ptr<CertVerifierJob>>
CertVerifierJobMap;
+ // 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 QuicSessionKey& key,
+ int cert_verify_flags,
+ const NetLogWithSource& net_log);
+
// Returns a newly created QuicHttpStream owned by the caller.
std::unique_ptr<QuicHttpStream> CreateFromSession(
QuicChromiumClientSession* session);
@@ -412,6 +438,7 @@
bool HasActiveCertVerifierJob(const QuicServerId& server_id) const;
int CreateSession(const QuicSessionKey& key,
int cert_verify_flags,
+ std::unique_ptr<QuicServerInfo> quic_server_info,
bool require_confirmation,
const AddressList& address_list,
base::TimeTicks dns_resolution_start_time,
@@ -456,6 +483,11 @@
const QuicServerId& server_id,
const std::unique_ptr<QuicServerInfo>& server_info,
QuicConnectionId* connection_id);
+
+ // Initialize |quic_supported_servers_at_startup_| with the list of servers
+ // that supported QUIC at start up and also initialize in-memory cache of
+ // QuicServerInfo objects from HttpServerProperties.
+ void MaybeInitialize();
void ProcessGoingAwaySession(QuicChromiumClientSession* session,
const QuicServerId& server_id,
@@ -481,6 +513,7 @@
ProxyDelegate* proxy_delegate_;
TransportSecurityState* transport_security_state_;
CTVerifier* cert_transparency_verifier_;
+ std::unique_ptr<QuicServerInfoFactory> quic_server_info_factory_;
QuicCryptoClientStreamFactory* quic_crypto_client_stream_factory_;
QuicRandom* random_generator_; // Unowned.
QuicClock* clock_; // Unowned.
@@ -525,15 +558,26 @@
const QuicVersionVector supported_versions_;
+ // Specifies the ratio between time to load QUIC server information from disk
+ // cache to 'smoothed RTT'. This ratio is used to calculate the timeout in
+ // milliseconds to wait for loading of QUIC server information. If we don't
+ // want to timeout, set |load_server_info_timeout_srtt_multiplier_| to 0.
+ float load_server_info_timeout_srtt_multiplier_;
+
+ // 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_;
+
// Set if experimental non-blocking IO should be used on windows sockets.
bool enable_non_blocking_io_;
+
+ // Set if we do not want to load server config from the disk cache.
+ bool disable_disk_cache_;
// True if QUIC should be marked as broken when a connection blackholes after
// the handshake is confirmed.
bool mark_quic_broken_when_network_blackholes_;
-
- // Set if QUIC server configs should be stored in HttpServerProperties.
- bool store_server_configs_in_properties_;
// PING timeout for connections.
QuicTime::Delta ping_timeout_;
@@ -575,6 +619,8 @@
// Local address of socket that was created in CreateSession.
IPEndPoint local_address_;
bool check_persisted_supports_quic_;
+ bool has_initialized_data_;
+ std::set<HostPortPair> quic_supported_servers_at_startup_;
NetworkConnection network_connection_;
« no previous file with comments | « net/quic/chromium/quic_server_info.cc ('k') | net/quic/chromium/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698