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

Unified Diff: chrome/browser/net/http_server_properties_manager.cc

Issue 25956002: [SPDY] Remove references to obsolete SPDY versions SPDY/1 and SPDY/2.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/net/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | chrome/browser/net/http_server_properties_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698