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

Unified Diff: net/http/http_stream_factory_impl.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 | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl.cc
diff --git a/net/http/http_stream_factory_impl.cc b/net/http/http_stream_factory_impl.cc
index dd6d18b99d37deea2d487f93386be7c3becf0492..ad12091b1f1f441954f83a87955b6fc6d997e2fa 100644
--- a/net/http/http_stream_factory_impl.cc
+++ b/net/http/http_stream_factory_impl.cc
@@ -22,8 +22,9 @@
namespace {
-const AlternateProtocolInfo kNoAlternateProtocol =
- AlternateProtocolInfo(0, UNINITIALIZED_ALTERNATE_PROTOCOL, 0);
+const PortAlternateProtocolPair kNoAlternateProtocol = {
+ 0, UNINITIALIZED_ALTERNATE_PROTOCOL
+};
GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
GURL::Replacements replacements;
@@ -110,7 +111,7 @@
net_log);
GURL alternate_url;
- AlternateProtocolInfo alternate =
+ PortAlternateProtocolPair alternate =
GetAlternateProtocolRequestFor(request_info.url, &alternate_url);
Job* alternate_job = NULL;
if (alternate.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
@@ -154,7 +155,7 @@
const SSLConfig& proxy_ssl_config) {
DCHECK(!for_websockets_);
GURL alternate_url;
- AlternateProtocolInfo alternate =
+ PortAlternateProtocolPair alternate =
GetAlternateProtocolRequestFor(request_info.url, &alternate_url);
Job* job = NULL;
if (alternate.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
@@ -175,7 +176,7 @@
return session_->params().host_mapping_rules;
}
-AlternateProtocolInfo HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
+PortAlternateProtocolPair HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
const GURL& original_url,
GURL* alternate_url) {
if (!session_->params().use_alternate_protocols)
@@ -192,7 +193,7 @@
if (!http_server_properties.HasAlternateProtocol(origin))
return kNoAlternateProtocol;
- AlternateProtocolInfo alternate =
+ PortAlternateProtocolPair alternate =
http_server_properties.GetAlternateProtocol(origin);
if (alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) {
HistogramAlternateProtocolUsage(
« no previous file with comments | « net/http/http_stream_factory_impl.h ('k') | net/http/http_stream_factory_impl_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698