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

Unified Diff: net/http/http_server_properties_impl.cc

Issue 1011873002: Do not re-add alternate protocol in SetBrokenAlternateProtocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_impl.cc
diff --git a/net/http/http_server_properties_impl.cc b/net/http/http_server_properties_impl.cc
index 0d1530ad1decd1266b78b68851428e67b49197fd..baa0edbdf8d2397a2607b09ff80e174cba042ee8 100644
--- a/net/http/http_server_properties_impl.cc
+++ b/net/http/http_server_properties_impl.cc
@@ -307,17 +307,10 @@ void HttpServerPropertiesImpl::SetAlternateProtocol(
void HttpServerPropertiesImpl::SetBrokenAlternateProtocol(
const HostPortPair& server) {
- AlternateProtocolMap::iterator it = alternate_protocol_map_.Get(server);
const AlternateProtocolInfo alternate = GetAlternateProtocol(server);
- if (it == alternate_protocol_map_.end()) {
- if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL) {
- LOG(DFATAL) << "Trying to mark unknown alternate protocol broken.";
- return;
- }
- // This server's alternate protocol information is coming from a canonical
- // server. Add an entry in the map for this server explicitly so that
- // it can be marked as broken.
- it = alternate_protocol_map_.Put(server, alternate);
+ if (alternate.protocol == UNINITIALIZED_ALTERNATE_PROTOCOL) {
+ LOG(DFATAL) << "Trying to mark unknown alternate protocol broken.";
+ return;
}
const AlternativeService alternative_service(alternate.protocol,
server.host(), alternate.port);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698