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

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

Issue 1268313004: s/use_alternate_protocols/use_alternative_services/g (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: #15. Created 5 years, 4 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.h" 5 #include "net/http/http_stream_factory_impl.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 preconnect_job_set_.insert(job); 145 preconnect_job_set_.insert(job);
146 job->Preconnect(num_streams); 146 job->Preconnect(num_streams);
147 } 147 }
148 148
149 const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const { 149 const HostMappingRules* HttpStreamFactoryImpl::GetHostMappingRules() const {
150 return session_->params().host_mapping_rules; 150 return session_->params().host_mapping_rules;
151 } 151 }
152 152
153 AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor( 153 AlternativeServiceVector HttpStreamFactoryImpl::GetAlternativeServicesFor(
154 const GURL& original_url) { 154 const GURL& original_url) {
155 if (!session_->params().use_alternate_protocols) 155 if (!session_->params().use_alternative_services)
156 return AlternativeServiceVector(); 156 return AlternativeServiceVector();
157 157
158 if (original_url.SchemeIs("ftp")) 158 if (original_url.SchemeIs("ftp"))
159 return AlternativeServiceVector(); 159 return AlternativeServiceVector();
160 160
161 HostPortPair origin = HostPortPair::FromURL(original_url); 161 HostPortPair origin = HostPortPair::FromURL(original_url);
162 HttpServerProperties& http_server_properties = 162 HttpServerProperties& http_server_properties =
163 *session_->http_server_properties(); 163 *session_->http_server_properties();
164 const AlternativeServiceVector alternative_service_vector = 164 const AlternativeServiceVector alternative_service_vector =
165 http_server_properties.GetAlternativeServices(origin); 165 http_server_properties.GetAlternativeServices(origin);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 delete job; 274 delete job;
275 } 275 }
276 276
277 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { 277 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) {
278 preconnect_job_set_.erase(job); 278 preconnect_job_set_.erase(job);
279 delete job; 279 delete job;
280 OnPreconnectsCompleteInternal(); 280 OnPreconnectsCompleteInternal();
281 } 281 }
282 282
283 } // namespace net 283 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_stream_factory_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698