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

Unified Diff: net/http/http_stream_factory_impl_job.cc

Issue 1540463003: Change the interface of GetAlternativeServicesFor, always return the best Alt-Svc entry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change hanging_data_ to vector Created 4 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
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 d5bcc51bbb1a72b8f8c99d414427f3b8ea9fdd85..f66b0532f9cc017cfcc75f8f73eebadffe2a0a92 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -96,6 +96,8 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
RequestPriority priority,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
+ HostPortPair server,
+ GURL origin_url,
NetLog* net_log)
: Job(stream_factory,
session,
@@ -103,9 +105,10 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
priority,
server_ssl_config,
proxy_ssl_config,
+ server,
+ origin_url,
AlternativeService(),
- net_log) {
-}
+ net_log) {}
HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
HttpNetworkSession* session,
@@ -113,6 +116,8 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
RequestPriority priority,
const SSLConfig& server_ssl_config,
const SSLConfig& proxy_ssl_config,
+ HostPortPair server,
+ GURL origin_url,
AlternativeService alternative_service,
NetLog* net_log)
: request_(NULL),
@@ -127,6 +132,8 @@ HttpStreamFactoryImpl::Job::Job(HttpStreamFactoryImpl* stream_factory,
stream_factory_(stream_factory),
next_state_(STATE_NONE),
pac_request_(NULL),
+ server_(server),
+ origin_url_(origin_url),
alternative_service_(alternative_service),
blocking_job_(NULL),
waiting_job_(NULL),
@@ -722,13 +729,6 @@ int HttpStreamFactoryImpl::Job::StartInternal() {
}
int HttpStreamFactoryImpl::Job::DoStart() {
- if (IsSpdyAlternative() || IsQuicAlternative()) {
- server_ = alternative_service_.host_port_pair();
- } else {
- server_ = HostPortPair::FromURL(request_info_.url);
- }
- origin_url_ =
- stream_factory_->ApplyHostMappingRules(request_info_.url, &server_);
valid_spdy_session_pool_.reset(new ValidSpdySessionPool(
session_->spdy_session_pool(), origin_url_, IsSpdyAlternative()));

Powered by Google App Engine
This is Rietveld 408576698