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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Custom entries for broken_alternate_protocol_list_ and map_. Created 5 years, 11 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_job.h ('k') | net/http/http_stream_factory_impl_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_stream_factory_impl_job.cc
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc
index d531476c81b8964868133fb85672f2f860feb357..a2ecfeaf92589e9325d03138c28fdd3efbb32cc6 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -72,7 +72,8 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
RequestPriority priority,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
- NetLog* net_log)
+ NetLog* net_log,
+ AlternateProtocolInfo alternate_protocol)
: request_(NULL),
request_info_(request_info),
priority_(priority),
@@ -85,6 +86,7 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
stream_factory_(stream_factory),
next_state_(STATE_NONE),
pac_request_(NULL),
+ alternate_protocol_(alternate_protocol),
blocking_job_(NULL),
waiting_job_(NULL),
using_ssl_(false),
@@ -163,12 +165,10 @@ LoadState HttpStreamFactoryImpl::Job::GetLoadState() const {
}
}
-void HttpStreamFactoryImpl::Job::MarkAsAlternate(
- const GURL& original_url,
- AlternateProtocolInfo alternate) {
+void HttpStreamFactoryImpl::Job::MarkAsAlternate(const GURL& original_url) {
DCHECK(!original_url_.get());
original_url_.reset(new GURL(original_url));
- if (alternate.protocol == QUIC) {
+ if (alternate_protocol_.protocol == QUIC) {
DCHECK(session_->params().enable_quic);
using_quic_ = true;
}
@@ -1466,7 +1466,7 @@ void HttpStreamFactoryImpl::Job::MaybeMarkAlternateProtocolBroken() {
HistogramBrokenAlternateProtocolLocation(
BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_ALT);
session_->http_server_properties()->SetBrokenAlternateProtocol(
- HostPortPair::FromURL(*original_url_));
+ HostPortPair::FromURL(*original_url_), alternate_protocol_);
}
return;
}
@@ -1475,7 +1475,7 @@ void HttpStreamFactoryImpl::Job::MaybeMarkAlternateProtocolBroken() {
HistogramBrokenAlternateProtocolLocation(
BROKEN_ALTERNATE_PROTOCOL_LOCATION_HTTP_STREAM_FACTORY_IMPL_JOB_MAIN);
session_->http_server_properties()->SetBrokenAlternateProtocol(
- HostPortPair::FromURL(request_info_.url));
+ HostPortPair::FromURL(request_info_.url), alternate_protocol_);
}
}
« no previous file with comments | « net/http/http_stream_factory_impl_job.h ('k') | net/http/http_stream_factory_impl_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698