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

Unified Diff: chrome/browser/io_thread.cc

Issue 377063002: Revert of Add a probability to Alternate-Protocol support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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/net/http_server_properties_manager.h » ('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 c494ee4580fcdae2c46a1650f2216773985f0121..7c918c7d73ffab946e74f87e714365b06f58ad25 100644
--- a/chrome/browser/io_thread.cc
+++ b/chrome/browser/io_thread.cc
@@ -871,7 +871,9 @@
} else if (option == kDisableAltProtocols) {
globals_->use_alternate_protocols.set(false);
} else if (option == kForceAltProtocols) {
- net::AlternateProtocolInfo pair(443, net::NPN_SPDY_3, 1);
+ net::PortAlternateProtocolPair pair;
+ pair.port = 443;
+ pair.protocol = net::NPN_SPDY_3;
net::HttpServerPropertiesImpl::ForceAlternateProtocol(pair);
} else if (option == kSingleDomain) {
DVLOG(1) << "FORCING SINGLE DOMAIN";
@@ -982,8 +984,6 @@
params->forced_spdy_exclusions = globals.forced_spdy_exclusions;
globals.use_alternate_protocols.CopyToIfSet(
&params->use_alternate_protocols);
- globals.alternate_protocol_probability_threshold.CopyToIfSet(
- &params->alternate_protocol_probability_threshold);
globals.enable_websocket_over_spdy.CopyToIfSet(
&params->enable_websocket_over_spdy);
@@ -1135,14 +1135,6 @@
globals->quic_supported_versions.set(supported_versions);
}
- double threshold =
- GetAlternateProtocolProbabilityThreshold(command_line, quic_trial_params);
- if (threshold >=0 && threshold <= 1) {
- globals->alternate_protocol_probability_threshold.set(threshold);
- globals->http_server_properties->SetAlternateProtocolProbabilityThreshold(
- threshold);
- }
-
if (command_line.HasSwitch(switches::kOriginToForceQuicOn)) {
net::HostPortPair quic_origin =
net::HostPortPair::FromString(
@@ -1210,7 +1202,6 @@
return ParseQuicConnectionOptions(it->second);
}
-// static
net::QuicTagVector IOThread::ParseQuicConnectionOptions(
const std::string& connection_options) {
net::QuicTagVector options;
@@ -1230,30 +1221,6 @@
return options;
}
-// static
-double IOThread::GetAlternateProtocolProbabilityThreshold(
- const base::CommandLine& command_line,
- const VariationParameters& quic_trial_params) {
- double value;
- if (command_line.HasSwitch(
- switches::kAlternateProtocolProbabilityThreshold)) {
- if (base::StringToDouble(
- command_line.GetSwitchValueASCII(
- switches::kAlternateProtocolProbabilityThreshold),
- &value)) {
- return value;
- }
- }
- if (base::StringToDouble(
- GetVariationParam(quic_trial_params,
- "alternate_protocol_probability_threshold"),
- &value)) {
- return value;
- }
- return -1;
-}
-
-// static
bool IOThread::ShouldEnableQuicTimeBasedLossDetection(
const CommandLine& command_line,
base::StringPiece quic_trial_group,
@@ -1273,7 +1240,6 @@
kQuicFieldTrialTimeBasedLossDetectionSuffix);
}
-// static
size_t IOThread::GetQuicMaxPacketLength(
const CommandLine& command_line,
base::StringPiece quic_trial_group,
@@ -1315,7 +1281,6 @@
return value;
}
-// static
net::QuicVersion IOThread::GetQuicVersion(
const CommandLine& command_line,
const VariationParameters& quic_trial_params) {
@@ -1327,7 +1292,6 @@
return ParseQuicVersion(GetVariationParam(quic_trial_params, "quic_version"));
}
-// static
net::QuicVersion IOThread::ParseQuicVersion(const std::string& quic_version) {
net::QuicVersionVector supported_versions = net::QuicSupportedVersions();
for (size_t i = 0; i < supported_versions.size(); ++i) {
« no previous file with comments | « chrome/browser/io_thread.h ('k') | chrome/browser/net/http_server_properties_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698