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

Unified Diff: net/http/http_server_properties_impl.h

Issue 987813002: Introduce AlternativeService in BrokenAlternateProtol{List,Map}. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/altsvc/alternative_service/g 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 | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e951086a995149e96a931b2ef5a4da1dc6b35aec 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -117,37 +117,14 @@ 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,
+ const AlternativeService& alternative_service,
base::TimeTicks when)
- : broken_alternate_protocol_entry(broken_alternate_protocol_entry),
- when(when) {}
+ : alternative_service(alternative_service), when(when) {}
- BrokenAlternateProtocolEntry broken_alternate_protocol_entry;
+ AlternativeService alternative_service;
base::TimeTicks when;
};
// Deque of BrokenAlternateProtocolEntryWithTime items, ordered by expiration
@@ -156,8 +133,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(
« no previous file with comments | « net/http/http_server_properties.h ('k') | net/http/http_server_properties_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698