Index: chrome/browser/io_thread.cc |
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc |
index 41d8709c78e96ec25425124e14cce21aea230a9f..1dd1d7893bfe08c7bcdd4f25cb79acd1625614fc 100644 |
--- a/chrome/browser/io_thread.cc |
+++ b/chrome/browser/io_thread.cc |
@@ -42,6 +42,7 @@ |
#include "chrome/common/chrome_version_info.h" |
#include "chrome/common/pref_names.h" |
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h" |
+#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
#include "components/policy/core/common/policy_service.h" |
#include "components/variations/variations_associated_data.h" |
#include "content/public/browser/browser_thread.h" |
@@ -1039,6 +1040,7 @@ void IOThread::InitializeNetworkSessionParamsFromGlobals( |
¶ms->alternate_protocol_probability_threshold); |
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( |
¶ms->quic_always_require_handshake_confirmation); |
globals.quic_disable_connection_pooling.CopyToIfSet( |
@@ -1168,6 +1170,15 @@ void IOThread::ConfigureQuicGlobals( |
IOThread::Globals* globals) { |
bool enable_quic = ShouldEnableQuic(command_line, quic_trial_group); |
globals->enable_quic.set(enable_quic); |
+ bool enable_quic_for_proxies = ShouldEnableQuicForProxies(command_line, |
+ quic_trial_group); |
+ globals->enable_quic_for_proxies.set(enable_quic_for_proxies); |
+ |
+ bool enable_quic_for_data_reduction_proxy = |
+ ShouldEnableQuicForDataReductionProxy(command_line, quic_trial_group); |
+ globals->enable_quic_for_data_reduction_proxy.set( |
+ enable_quic_for_data_reduction_proxy); |
+ |
if (enable_quic) { |
globals->quic_always_require_handshake_confirmation.set( |
ShouldQuicAlwaysRequireHandshakeConfirmation(quic_trial_params)); |
@@ -1249,6 +1260,26 @@ bool IOThread::ShouldEnableQuic(const base::CommandLine& command_line, |
quic_trial_group.starts_with(kQuicFieldTrialHttpsEnabledGroupName); |
} |
+// static |
+bool IOThread::ShouldEnableQuicForProxies(const base::CommandLine& command_line, |
+ base::StringPiece quic_trial_group) { |
+ if (command_line.HasSwitch(switches::kDisableQuic)) |
+ return false; |
+ |
+ return ShouldEnableQuic(command_line, quic_trial_group) || |
+ data_reduction_proxy::DataReductionProxyParams:: |
+ IsIncludedInQuicFieldTrial(); |
+} |
+ |
+// static |
+bool IOThread::ShouldEnableQuicForDataReductionProxy( |
+ const base::CommandLine& command_line, |
+ base::StringPiece quic_trial_group) { |
+ return ShouldEnableQuicForProxies(command_line, quic_trial_group) && |
+ data_reduction_proxy::DataReductionProxyParams:: |
+ IsIncludedInQuicFieldTrial(); |
+} |
Ryan Hamilton
2015/02/14 00:09:23
I stared at these two methods for about 10 minutes
tbansal1
2015/02/14 01:06:11
Done.
|
+ |
bool IOThread::ShouldEnableQuicPortSelection( |
const base::CommandLine& command_line) { |
if (command_line.HasSwitch(switches::kDisableQuicPortSelection)) |