| 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 7500373eeb485e82774654ddb4963fa710c54d6f..f0727330d9af06fe88362ac2ef844a1ddcb2fcae 100644
|
| --- a/net/http/http_stream_factory_impl.cc
|
| +++ b/net/http/http_stream_factory_impl.cc
|
| @@ -26,8 +26,7 @@ namespace net {
|
| namespace {
|
|
|
| const PortAlternateProtocolPair kNoAlternateProtocol = {
|
| - 0, UNINITIALIZED_ALTERNATE_PROTOCOL
|
| -};
|
| + 0, UNINITIALIZED_ALTERNATE_PROTOCOL};
|
|
|
| GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
|
| GURL::Replacements replacements;
|
| @@ -45,10 +44,12 @@ GURL UpgradeUrlToHttps(const GURL& original_url, int port) {
|
| HttpStreamFactoryImpl::HttpStreamFactoryImpl(HttpNetworkSession* session,
|
| bool for_websockets)
|
| : session_(session),
|
| - http_pipelined_host_pool_(this, NULL,
|
| + http_pipelined_host_pool_(this,
|
| + NULL,
|
| session_->http_server_properties(),
|
| session_->force_http_pipelining()),
|
| - for_websockets_(for_websockets) {}
|
| + for_websockets_(for_websockets) {
|
| +}
|
|
|
| HttpStreamFactoryImpl::~HttpStreamFactoryImpl() {
|
| DCHECK(request_map_.empty());
|
| @@ -127,15 +128,24 @@ HttpStreamRequest* HttpStreamFactoryImpl::RequestStreamInternal(
|
|
|
| HttpRequestInfo alternate_request_info = request_info;
|
| alternate_request_info.url = alternate_url;
|
| - alternate_job =
|
| - new Job(this, session_, alternate_request_info, priority,
|
| - server_ssl_config, proxy_ssl_config, net_log.net_log());
|
| + alternate_job = new Job(this,
|
| + session_,
|
| + alternate_request_info,
|
| + priority,
|
| + server_ssl_config,
|
| + proxy_ssl_config,
|
| + net_log.net_log());
|
| request->AttachJob(alternate_job);
|
| alternate_job->MarkAsAlternate(request_info.url, alternate);
|
| }
|
|
|
| - Job* job = new Job(this, session_, request_info, priority,
|
| - server_ssl_config, proxy_ssl_config, net_log.net_log());
|
| + Job* job = new Job(this,
|
| + session_,
|
| + request_info,
|
| + priority,
|
| + server_ssl_config,
|
| + proxy_ssl_config,
|
| + net_log.net_log());
|
| request->AttachJob(job);
|
| if (alternate_job) {
|
| // Never share connection with other jobs for FTP requests.
|
| @@ -168,12 +178,22 @@ void HttpStreamFactoryImpl::PreconnectStreams(
|
| if (alternate.protocol != UNINITIALIZED_ALTERNATE_PROTOCOL) {
|
| HttpRequestInfo alternate_request_info = request_info;
|
| alternate_request_info.url = alternate_url;
|
| - job = new Job(this, session_, alternate_request_info, priority,
|
| - server_ssl_config, proxy_ssl_config, session_->net_log());
|
| + job = new Job(this,
|
| + session_,
|
| + alternate_request_info,
|
| + priority,
|
| + server_ssl_config,
|
| + proxy_ssl_config,
|
| + session_->net_log());
|
| job->MarkAsAlternate(request_info.url, alternate);
|
| } else {
|
| - job = new Job(this, session_, request_info, priority,
|
| - server_ssl_config, proxy_ssl_config, session_->net_log());
|
| + job = new Job(this,
|
| + session_,
|
| + request_info,
|
| + priority,
|
| + server_ssl_config,
|
| + proxy_ssl_config,
|
| + session_->net_log());
|
| }
|
| preconnect_job_set_.insert(job);
|
| job->Preconnect(num_streams);
|
| @@ -243,7 +263,7 @@ PortAlternateProtocolPair HttpStreamFactoryImpl::GetAlternateProtocolRequestFor(
|
| if (!session_->params().enable_quic ||
|
| !(original_url.SchemeIs("http") ||
|
| session_->params().enable_quic_https)) {
|
| - return kNoAlternateProtocol;
|
| + return kNoAlternateProtocol;
|
| }
|
| // TODO(rch): Figure out how to make QUIC iteract with PAC
|
| // scripts. By not re-writing the URL, we will query the PAC script
|
| @@ -288,10 +308,8 @@ void HttpStreamFactoryImpl::OnNewSpdySessionReady(
|
| if (!ContainsKey(spdy_session_request_map_, spdy_session_key))
|
| break;
|
| Request* request = *spdy_session_request_map_[spdy_session_key].begin();
|
| - request->Complete(was_npn_negotiated,
|
| - protocol_negotiated,
|
| - using_spdy,
|
| - net_log);
|
| + request->Complete(
|
| + was_npn_negotiated, protocol_negotiated, using_spdy, net_log);
|
| if (for_websockets_) {
|
| // TODO(ricea): Restore this code path when WebSocket over SPDY
|
| // implementation is ready.
|
| @@ -334,19 +352,20 @@ void HttpStreamFactoryImpl::OnHttpPipelinedHostHasAdditionalCapacity(
|
| stream->protocol_negotiated(),
|
| false, // not using_spdy
|
| stream->net_log());
|
| - request->OnStreamReady(NULL,
|
| - stream->used_ssl_config(),
|
| - stream->used_proxy_info(),
|
| - stream);
|
| + request->OnStreamReady(
|
| + NULL, stream->used_ssl_config(), stream->used_proxy_info(), stream);
|
| }
|
| }
|
|
|
| void HttpStreamFactoryImpl::AbortPipelinedRequestsWithKey(
|
| - const Job* job, const HttpPipelinedHost::Key& key, int status,
|
| + const Job* job,
|
| + const HttpPipelinedHost::Key& key,
|
| + int status,
|
| const SSLConfig& used_ssl_config) {
|
| RequestVector requests_to_fail = http_pipelining_request_map_[key];
|
| for (RequestVector::const_iterator it = requests_to_fail.begin();
|
| - it != requests_to_fail.end(); ++it) {
|
| + it != requests_to_fail.end();
|
| + ++it) {
|
| Request* request = *it;
|
| if (request == request_map_[job]) {
|
| continue;
|
|
|