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

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: Created 5 years 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 eabbed0bba902d2475b00a21b1aff6706dadd966..8196522ec9f1251ca92138a13990dc48e456e49e 100644
--- a/net/http/http_stream_factory_impl_job.cc
+++ b/net/http/http_stream_factory_impl_job.cc
@@ -90,6 +90,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,
@@ -97,9 +99,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,
@@ -107,6 +110,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),
@@ -121,6 +126,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),
@@ -660,11 +667,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_);
Ryan Hamilton 2015/12/21 17:37:51 I think you can remove this line, right?
Zhongyi Shi 2015/12/28 22:43:22 Done.
valid_spdy_session_pool_.reset(new ValidSpdySessionPool(

Powered by Google App Engine
This is Rietveld 408576698