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

Side by Side Diff: net/http/http_stream_factory_impl_job.cc

Issue 1824903002: Change the AlternativeServiceMap with SchemeOriginPair key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unittests Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/http/http_stream_factory_impl_job.h" 5 #include "net/http/http_stream_factory_impl_job.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 request_ = request; 250 request_ = request;
251 // Saves |stream_type_|, since request is nulled when job is orphaned. 251 // Saves |stream_type_|, since request is nulled when job is orphaned.
252 stream_type_ = request_->stream_type(); 252 stream_type_ = request_->stream_type();
253 StartInternal(); 253 StartInternal();
254 } 254 }
255 255
256 int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) { 256 int HttpStreamFactoryImpl::Job::Preconnect(int num_streams) {
257 DCHECK_GT(num_streams, 0); 257 DCHECK_GT(num_streams, 0);
258 base::WeakPtr<HttpServerProperties> http_server_properties = 258 base::WeakPtr<HttpServerProperties> http_server_properties =
259 session_->http_server_properties(); 259 session_->http_server_properties();
260 SchemeOriginPair scheme_origin = SchemeOriginPair::FromURL(request_info_.url);
260 if (http_server_properties && 261 if (http_server_properties &&
261 http_server_properties->SupportsRequestPriority( 262 http_server_properties->SupportsRequestPriority(scheme_origin)) {
262 HostPortPair::FromURL(request_info_.url))) {
263 num_streams_ = 1; 263 num_streams_ = 1;
264 } else { 264 } else {
265 num_streams_ = num_streams; 265 num_streams_ = num_streams;
266 } 266 }
267 return StartInternal(); 267 return StartInternal();
268 } 268 }
269 269
270 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth( 270 int HttpStreamFactoryImpl::Job::RestartTunnelWithProxyAuth(
271 const AuthCredentials& credentials) { 271 const AuthCredentials& credentials) {
272 DCHECK(establishing_tunnel_); 272 DCHECK(establishing_tunnel_);
(...skipping 1546 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 if (connection_->socket()) { 1819 if (connection_->socket()) {
1820 ConnectionAttempts socket_attempts; 1820 ConnectionAttempts socket_attempts;
1821 connection_->socket()->GetConnectionAttempts(&socket_attempts); 1821 connection_->socket()->GetConnectionAttempts(&socket_attempts);
1822 request_->AddConnectionAttempts(socket_attempts); 1822 request_->AddConnectionAttempts(socket_attempts);
1823 } else { 1823 } else {
1824 request_->AddConnectionAttempts(connection_->connection_attempts()); 1824 request_->AddConnectionAttempts(connection_->connection_attempts());
1825 } 1825 }
1826 } 1826 }
1827 1827
1828 } // namespace net 1828 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698