| Index: chrome/browser/net/http_server_properties_manager.cc
|
| diff --git a/chrome/browser/net/http_server_properties_manager.cc b/chrome/browser/net/http_server_properties_manager.cc
|
| index c77f624e153080e09a3031d68ac0ff7aff986cf1..77579d3da1f90d0c6d63b2e2fdbb2e43dae0080d 100644
|
| --- a/chrome/browser/net/http_server_properties_manager.cc
|
| +++ b/chrome/browser/net/http_server_properties_manager.cc
|
| @@ -398,7 +398,7 @@ void HttpServerPropertiesManager::UpdateCacheFromPrefsOnUI() {
|
| }
|
| net::AlternateProtocol protocol =
|
| net::AlternateProtocolFromString(protocol_str);
|
| - if (protocol > net::NUM_ALTERNATE_PROTOCOLS) {
|
| + if (!net::IsAlternateProtocolValid(protocol)) {
|
| DVLOG(1) << "Malformed Alternate-Protocol server: " << server_str;
|
| detected_corrupted_prefs = true;
|
| continue;
|
| @@ -594,8 +594,7 @@ void HttpServerPropertiesManager::UpdatePrefsOnUI(
|
| const net::HostPortPair& server = map_it->first;
|
| const net::PortAlternateProtocolPair& port_alternate_protocol =
|
| map_it->second;
|
| - if (port_alternate_protocol.protocol < 0 ||
|
| - port_alternate_protocol.protocol >= net::NUM_ALTERNATE_PROTOCOLS) {
|
| + if (!net::IsAlternateProtocolValid(port_alternate_protocol.protocol)) {
|
| continue;
|
| }
|
|
|
|
|