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

Unified Diff: chrome/browser/io_thread.cc

Issue 1309363003: Add flag to enable alternative services. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #3. Created 5 years, 3 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 | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/io_thread.cc
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc
index 9ba5e1ccd5e52a6a28076e8cef68903556d31714..4f6d572d333fe181e5c32bea72f0ea42df9c0ed5 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -1134,6 +1134,8 @@ void IOThread::ConfigureQuicGlobals(
bool enable_quic_for_proxies = ShouldEnableQuicForProxies(
command_line, quic_trial_group, quic_allowed_by_policy);
globals->enable_quic_for_proxies.set(enable_quic_for_proxies);
+ globals->use_alternative_services.set(
+ ShouldQuicEnableAlternativeServices(command_line, quic_trial_params));
if (enable_quic) {
globals->enable_insecure_quic.set(
ShouldEnableInsecureQuic(command_line, quic_trial_params));
@@ -1159,8 +1161,6 @@ void IOThread::ConfigureQuicGlobals(
ShouldQuicDisableDiskCache(quic_trial_params));
globals->quic_prefer_aes.set(
ShouldQuicPreferAes(quic_trial_params));
- globals->use_alternative_services.set(
- ShouldQuicEnableAlternativeServices(quic_trial_params));
int max_number_of_lossy_connections = GetQuicMaxNumberOfLossyConnections(
quic_trial_params);
if (max_number_of_lossy_connections != 0) {
@@ -1372,9 +1372,12 @@ bool IOThread::ShouldQuicPreferAes(
}
bool IOThread::ShouldQuicEnableAlternativeServices(
+ const base::CommandLine& command_line,
const VariationParameters& quic_trial_params) {
- return base::LowerCaseEqualsASCII(
- GetVariationParam(quic_trial_params, "use_alternative_services"), "true");
+ return command_line.HasSwitch(switches::kEnableAlternativeServices) ||
+ base::LowerCaseEqualsASCII(
+ GetVariationParam(quic_trial_params, "use_alternative_services"),
+ "true");
}
int IOThread::GetQuicMaxNumberOfLossyConnections(
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/io_thread_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698