Chromium Code Reviews| Index: net/http/http_stream_factory.cc |
| diff --git a/net/http/http_stream_factory.cc b/net/http/http_stream_factory.cc |
| index 29d9b2642cfcd956b97c5eb3d78afdb784bc549d..bef25c93882b5bfd7bf4b56648b8955883739f3f 100644 |
| --- a/net/http/http_stream_factory.cc |
| +++ b/net/http/http_stream_factory.cc |
| @@ -60,7 +60,7 @@ void HttpStreamFactory::ProcessAlternateProtocol( |
| } |
| if (!base::StringToInt(port_protocol_vector[0], &port) || |
| - port <= 0 || port >= 1 << 16) { |
| + port <= 0 || port > std::numeric_limits<uint16>::max()) { |
|
mmenke
2014/11/18 21:06:39
nit: Replace these two lines with "port == 0 || !
|
| DVLOG(1) << kAlternateProtocolHeader |
| << " header has unrecognizable port: " |
| << port_protocol_vector[0]; |
| @@ -94,8 +94,8 @@ void HttpStreamFactory::ProcessAlternateProtocol( |
| return; |
| } |
| - http_server_properties->SetAlternateProtocol(host_port, port, protocol, |
| - probability); |
| + http_server_properties->SetAlternateProtocol( |
| + host_port, static_cast<uint16>(port), protocol, probability); |
|
mmenke
2014/11/18 21:06:39
include basictypes.h
Peter Kasting
2014/11/18 23:38:42
In this file's header file.
|
| } |
| GURL HttpStreamFactory::ApplyHostMappingRules(const GURL& url, |