Index: chrome/browser/io_thread.h |
diff --git a/chrome/browser/io_thread.h b/chrome/browser/io_thread.h |
index 85210ba1abdb46ce0de8348ce584a049ddf91364..2f1103d4f66ac6d56d538f8f8f33f60848b9f7b1 100644 |
--- a/chrome/browser/io_thread.h |
+++ b/chrome/browser/io_thread.h |
@@ -36,10 +36,6 @@ class PrefService; |
class PrefRegistrySimple; |
class SystemURLRequestContextGetter; |
-namespace base { |
-class CommandLine; |
-} |
- |
#if BUILDFLAG(ANDROID_JAVA_UI) |
namespace chrome { |
namespace android { |
@@ -189,204 +185,6 @@ class IOThread : public content::BrowserThreadDelegate { |
bool enable_brotli; |
}; |
- // Helper class to configure HttpNetworkSession::Params and |
- // HttpServerProperties based on field trials, policy, and command line. |
- class NetworkSessionConfigurator { |
- public: |
- // Configure |params| based on field trials and policy arguments. |
- static void ParseFieldTrials(bool is_spdy_allowed_by_policy, |
- bool is_quic_allowed_by_policy, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configure |params| based on field trials, policy arguments, |
- // and command line. |
- static void ParseFieldTrialsAndCommandLine( |
- bool is_spdy_allowed_by_policy, |
- bool is_quic_allowed_by_policy, |
- net::HttpNetworkSession::Params* params); |
- |
- private: |
- // Map from name to value for all parameters associate with a field trial. |
- using VariationParameters = std::map<std::string, std::string>; |
- |
- static void ParseFieldTrialsAndCommandLineInternal( |
- const base::CommandLine& command_line, |
- bool is_spdy_allowed_by_policy, |
- bool is_quic_allowed_by_policy, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configures Alternative Services based on command line options and the |
- // field trial group. |
- static void ConfigureAltSvcParams(const base::CommandLine& command_line, |
- base::StringPiece altsvc_trial_group, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configures QUIC options based on the flags in |command_line| as well as |
- // the QUIC field trial group and parameters. Must be called before |
- // ConfigureSpdyParams. |
- static void ConfigureQuicParams( |
- const base::CommandLine& command_line, |
- base::StringPiece quic_trial_group, |
- const VariationParameters& quic_trial_params, |
- bool is_quic_allowed_by_policy, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configures available SPDY protocol versions and parameters based on |
- // command line flags as well as SPDY field trial group and parameters. |
- // Must be called after ConfigureQuicParams. |
- static void ConfigureSpdyParams( |
- const base::CommandLine& command_line, |
- base::StringPiece spdy_trial_group, |
- const VariationParameters& spdy_trial_params, |
- bool is_spdy_allowed_by_policy, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configure TCP FastOpen based on the field trial group. |
- static void ConfigureTCPFastOpenParams( |
- base::StringPiece tfo_trial_group, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configures NPN based on command line and the field trial group. |
- static void ConfigureNPNParams(const base::CommandLine& command_line, |
- base::StringPiece npn_trial_group, |
- net::HttpNetworkSession::Params* params); |
- |
- // Configures the use of priority dependencies based on the field trial |
- // group. |
- static void ConfigurePriorityDependencies( |
- base::StringPiece priority_dependencies_trial_group, |
- net::HttpNetworkSession::Params* params); |
- |
- // Returns true if QUIC should be disabled when a connection times out with |
- // open streams. |
- static bool ShouldDisableQuicWhenConnectionTimesOutWithOpenStreams( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should be enabled, either as a result of a field |
- // trial or a command line flag. |
- static bool ShouldEnableQuic(const base::CommandLine& command_line, |
- base::StringPiece quic_trial_group, |
- bool quic_allowed_by_policy); |
- |
- // Returns true if the selection of the ephemeral port in bind() should be |
- // performed by Chromium, and false if the OS should select the port. The |
- // OS option is used to prevent Windows from posting a security warning |
- // dialog. |
- static bool ShouldEnableQuicPortSelection( |
- const base::CommandLine& command_line); |
- |
- // Returns true if QUIC should always require handshake confirmation during |
- // the QUIC handshake. |
- static bool ShouldQuicAlwaysRequireHandshakeConfirmation( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should disable connection pooling. |
- static bool ShouldQuicDisableConnectionPooling( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the ratio of time to load QUIC sever information from disk cache |
- // to 'smoothed RTT' based on field trial. Returns 0 if there is an error |
- // parsing the field trial params, or if the default value should be used. |
- static float GetQuicLoadServerInfoTimeoutSrttMultiplier( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC's connection racing should be enabled. |
- static bool ShouldQuicEnableConnectionRacing( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC's should use non-blocking IO. |
- static bool ShouldQuicEnableNonBlockingIO( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC shouldn't load QUIC server information from the disk |
- // cache. |
- static bool ShouldQuicDisableDiskCache( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should prefer AES-GCN even without hardware support. |
- static bool ShouldQuicPreferAes( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should enable alternative services for different |
- // host. |
- static bool ShouldQuicEnableAlternativeServicesForDifferentHost( |
- const base::CommandLine& command_line, |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the maximum number of QUIC connections with high packet loss in a |
- // row after which QUIC should be disabled. Returns 0 if the default value |
- // should be used. |
- static int GetQuicMaxNumberOfLossyConnections( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the packet loss rate in fraction after which a QUIC connection is |
- // closed and is considered as a lossy connection. Returns 0 if the default |
- // value should be used. |
- static float GetQuicPacketLossThreshold( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the size of the QUIC receive buffer to use, or 0 if the default |
- // should be used. |
- static int GetQuicSocketReceiveBufferSize( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should delay TCP connection when QUIC works. |
- static bool ShouldQuicDelayTcpRace( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should close sessions when any of the client's IP |
- // addresses change. |
- static bool ShouldQuicCloseSessionsOnIpChange( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the idle connection timeout for QUIC connections. Returns 0 if |
- // there is an error parsing any of the options, or if the default value |
- // should be used. |
- static int GetQuicIdleConnectionTimeoutSeconds( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if PreConnect should be disabled if QUIC can do 0RTT. |
- static bool ShouldQuicDisablePreConnectIfZeroRtt( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the set of hosts to whitelist for QUIC. |
- static std::unordered_set<std::string> GetQuicHostWhitelist( |
- const base::CommandLine& command_line, |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should migrate sessions when primary network |
- // changes. |
- static bool ShouldQuicMigrateSessionsOnNetworkChange( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns true if QUIC should migrate sessions early. |
- static bool ShouldQuicMigrateSessionsEarly( |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the maximum length for QUIC packets, based on any flags in |
- // |command_line| or the field trial. Returns 0 if there is an error |
- // parsing any of the options, or if the default value should be used. |
- static size_t GetQuicMaxPacketLength( |
- const base::CommandLine& command_line, |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the QUIC versions specified by any flags in |command_line| or |
- // |quic_trial_params|. |
- static net::QuicVersion GetQuicVersion( |
- const base::CommandLine& command_line, |
- const VariationParameters& quic_trial_params); |
- |
- // Returns the QUIC version specified by |quic_version| or |
- // QUIC_VERSION_UNSUPPORTED if |quic_version| is invalid. |
- static net::QuicVersion ParseQuicVersion(const std::string& quic_version); |
- |
- // Returns the QUIC connection options specified by any flags in |
- // |command_line| or |quic_trial_params|. |
- static net::QuicTagVector GetQuicConnectionOptions( |
- const base::CommandLine& command_line, |
- const VariationParameters& quic_trial_params); |
- }; |
- |
// |net_log| must either outlive the IOThread or be NULL. |
IOThread(PrefService* local_state, |
policy::PolicyService* policy_service, |
@@ -438,8 +236,6 @@ class IOThread : public content::BrowserThreadDelegate { |
void Init() override; |
void CleanUp() override; |
- void InitializeNetworkOptions(const base::CommandLine& parsed_command_line); |
- |
// Global state must be initialized on the IO thread, then this |
// method must be invoked on the UI thread. |
void InitSystemRequestContext(); |
@@ -505,7 +301,6 @@ class IOThread : public content::BrowserThreadDelegate { |
Globals* globals_; |
net::HttpNetworkSession::Params params_; |
- NetworkSessionConfigurator network_session_configurator_; |
// Observer that logs network changes to the ChromeNetLog. |
std::unique_ptr<net::LoggingNetworkChangeObserver> network_change_observer_; |