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

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

Issue 718273002: Use uint16 for port numbers, net/ edition (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 1 month 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 GURL* alternate_url) { 177 GURL* alternate_url) {
178 const AlternateProtocolInfo kNoAlternateProtocol = 178 const AlternateProtocolInfo kNoAlternateProtocol =
179 AlternateProtocolInfo(0, UNINITIALIZED_ALTERNATE_PROTOCOL, 0); 179 AlternateProtocolInfo(0, UNINITIALIZED_ALTERNATE_PROTOCOL, 0);
180 180
181 if (!session_->params().use_alternate_protocols) 181 if (!session_->params().use_alternate_protocols)
182 return kNoAlternateProtocol; 182 return kNoAlternateProtocol;
183 183
184 if (original_url.SchemeIs("ftp")) 184 if (original_url.SchemeIs("ftp"))
185 return kNoAlternateProtocol; 185 return kNoAlternateProtocol;
186 186
187 HostPortPair origin = HostPortPair(original_url.HostNoBrackets(), 187 HostPortPair origin = HostPortPair(
188 original_url.EffectiveIntPort()); 188 original_url.HostNoBrackets(),
189 static_cast<uint16>(original_url.EffectiveIntPort()));
mmenke 2014/11/18 21:06:39 HostPortPair::FromURL(original_url)
Peter Kasting 2014/11/18 23:38:42 Done.
189 190
190 HttpServerProperties& http_server_properties = 191 HttpServerProperties& http_server_properties =
191 *session_->http_server_properties(); 192 *session_->http_server_properties();
192 if (!http_server_properties.HasAlternateProtocol(origin)) 193 if (!http_server_properties.HasAlternateProtocol(origin))
193 return kNoAlternateProtocol; 194 return kNoAlternateProtocol;
194 195
195 AlternateProtocolInfo alternate = 196 AlternateProtocolInfo alternate =
196 http_server_properties.GetAlternateProtocol(origin); 197 http_server_properties.GetAlternateProtocol(origin);
197 if (alternate.is_broken) { 198 if (alternate.is_broken) {
198 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN); 199 HistogramAlternateProtocolUsage(ALTERNATE_PROTOCOL_USAGE_BROKEN);
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 delete job; 300 delete job;
300 } 301 }
301 302
302 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) { 303 void HttpStreamFactoryImpl::OnPreconnectsComplete(const Job* job) {
303 preconnect_job_set_.erase(job); 304 preconnect_job_set_.erase(job);
304 delete job; 305 delete job;
305 OnPreconnectsCompleteInternal(); 306 OnPreconnectsCompleteInternal();
306 } 307 }
307 308
308 } // namespace net 309 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698