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 e86d8f89b071a9216854512694d174aaa85475a2..f4c10b17dc0dbd5f06cf0fb5fc483c2a56cd858e 100644 |
| --- a/net/http/http_stream_factory.cc |
| +++ b/net/http/http_stream_factory.cc |
| @@ -69,12 +69,9 @@ void HttpStreamFactory::ProcessAlternateProtocol( |
| protocol = |
| AlternateProtocolFromString(port_protocol_vector[1]); |
|
Ryan Hamilton
2014/11/05 17:05:20
Can this fit on one line?
Can you confirm what wi
Bence
2014/11/06 00:26:00
Sorry, git cl format is broken on my machine.
|
| + |
| if (IsAlternateProtocolValid(protocol) && |
| !session.IsProtocolEnabled(protocol)) { |
| - protocol = ALTERNATE_PROTOCOL_BROKEN; |
| - } |
| - |
| - if (protocol == ALTERNATE_PROTOCOL_BROKEN) { |
| DVLOG(1) << kAlternateProtocolHeader |
| << " header has unrecognized protocol: " |
| << port_protocol_vector[1]; |
| @@ -94,8 +91,9 @@ void HttpStreamFactory::ProcessAlternateProtocol( |
| const AlternateProtocolInfo existing_alternate = |
| http_server_properties->GetAlternateProtocol(host_port); |
| // If we think the alternate protocol is broken, don't change it. |
| - if (existing_alternate.protocol == ALTERNATE_PROTOCOL_BROKEN) |
| + if (existing_alternate.is_broken) { |
| return; |
| + } |
|
Ryan Hamilton
2014/11/05 17:05:20
net/ style prohibits {}s on one-line ifs. Whee!
Bence
2014/11/06 00:26:00
Lovely.
Done.
|
| } |
| http_server_properties->SetAlternateProtocol(host_port, port, protocol, |