| Index: chrome/browser/io_thread.cc
|
| diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
|
| index 2301ab5ab5965f00311c4b15320e022f4d42f313..a4a7ea837464db265eeb6af318077ecb720b7310 100644
|
| --- a/chrome/browser/io_thread.cc
|
| +++ b/chrome/browser/io_thread.cc
|
| @@ -802,6 +802,7 @@ void IOThread::Init() {
|
| switches::kEnableUserAlternateProtocolPorts)) {
|
| globals_->enable_user_alternate_protocol_ports = true;
|
| }
|
| + globals_->enable_brotli.set(ShouldEnableBrotli(command_line));
|
| // TODO(erikchen): Remove ScopedTracker below once http://crbug.com/466432
|
| // is fixed.
|
| tracked_objects::ScopedTracker tracking_profile13(
|
| @@ -1076,6 +1077,8 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals(
|
|
|
| globals.enable_npn.CopyToIfSet(¶ms->enable_npn);
|
|
|
| + globals.enable_brotli.CopyToIfSet(¶ms->enable_brotli);
|
| +
|
| globals.enable_quic.CopyToIfSet(¶ms->enable_quic);
|
| globals.enable_quic_for_proxies.CopyToIfSet(¶ms->enable_quic_for_proxies);
|
| globals.quic_always_require_handshake_confirmation.CopyToIfSet(
|
| @@ -1284,6 +1287,12 @@ void IOThread::ConfigureQuicGlobals(
|
| }
|
| }
|
|
|
| +bool IOThread::ShouldEnableBrotli(const base::CommandLine& command_line) {
|
| + if (command_line.HasSwitch(switches::kDisableBrotli))
|
| + return false;
|
| + return command_line.HasSwitch(switches::kEnableBrotli);
|
| +}
|
| +
|
| bool IOThread::ShouldEnableQuic(const base::CommandLine& command_line,
|
| base::StringPiece quic_trial_group,
|
| bool quic_allowed_by_policy) {
|
|
|