Index: net/http/http_server_properties_impl.h |
diff --git a/net/http/http_server_properties_impl.h b/net/http/http_server_properties_impl.h |
index 5c84226bb0513822dbe1e1302c733ee9d61bf841..0dc92c4914c6b08bd8290a41831bcb7cfca0a4d9 100644 |
--- a/net/http/http_server_properties_impl.h |
+++ b/net/http/http_server_properties_impl.h |
@@ -117,37 +117,13 @@ class NET_EXPORT HttpServerPropertiesImpl |
typedef std::vector<std::string> CanonicalSufficList; |
typedef std::set<HostPortPair> Http11ServerHostPortSet; |
- // Server, port, and AlternateProtocol: an entity that can be broken. (Once |
- // we use AlternativeService, the same AltSvc can be broken for one server but |
- // not for another depending on what certificate it can offer.) |
- struct BrokenAlternateProtocolEntry { |
- BrokenAlternateProtocolEntry(const BrokenAlternateProtocolEntry&) = default; |
- BrokenAlternateProtocolEntry(const HostPortPair& server, |
- uint16 port, |
- AlternateProtocol protocol) |
- : server(server), port(port), protocol(protocol) {} |
- |
- bool operator<(const BrokenAlternateProtocolEntry& other) const { |
- if (!server.Equals(other.server)) |
- return server < other.server; |
- if (port != other.port) |
- return port < other.port; |
- return protocol < other.protocol; |
- } |
- |
- HostPortPair server; |
- uint16 port; |
- AlternateProtocol protocol; |
- }; |
- // BrokenAlternateProtocolEntry with expiration time. |
+ // Broken alternative service with expiration time. |
struct BrokenAlternateProtocolEntryWithTime { |
- BrokenAlternateProtocolEntryWithTime( |
- const BrokenAlternateProtocolEntry& broken_alternate_protocol_entry, |
- base::TimeTicks when) |
- : broken_alternate_protocol_entry(broken_alternate_protocol_entry), |
- when(when) {} |
+ BrokenAlternateProtocolEntryWithTime(const AlternativeService& altsvc, |
+ base::TimeTicks when) |
+ : altsvc(altsvc), when(when) {} |
- BrokenAlternateProtocolEntry broken_alternate_protocol_entry; |
+ AlternativeService altsvc; |
Ryan Hamilton
2015/03/06 23:01:12
The style guide is not a fan of abbreviations. How
Bence
2015/03/08 18:09:04
I would argue that altsvc is a standard abbrevatia
Ryan Hamilton
2015/03/09 13:48:50
I ping'd sleevi to get a second opinion. He like y
|
base::TimeTicks when; |
}; |
// Deque of BrokenAlternateProtocolEntryWithTime items, ordered by expiration |
@@ -156,8 +132,7 @@ class NET_EXPORT HttpServerPropertiesImpl |
BrokenAlternateProtocolList; |
// Map from (server, alternate protocol and port) to the number of |
// times that alternate protocol has been marked broken for that server. |
- typedef std::map<BrokenAlternateProtocolEntry, int> |
- BrokenAlternateProtocolMap; |
+ typedef std::map<AlternativeService, int> BrokenAlternateProtocolMap; |
// Return the iterator for |server|, or for its canonical host, or end. |
AlternateProtocolMap::const_iterator GetAlternateProtocolIterator( |