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

Unified Diff: net/http/http_server_properties_manager.h

Issue 665083009: ABANDONED Handle multiple AlternateProtocols for each HostPortPair. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Custom entries for broken_alternate_protocol_list_ and map_. Created 5 years, 11 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_impl_unittest.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties_manager.h
diff --git a/net/http/http_server_properties_manager.h b/net/http/http_server_properties_manager.h
index 5be571f344a47bab77e6eef489cd763e4f10407c..02439b5999e8d3fb11db8510c830e02d4af6de1b 100644
--- a/net/http/http_server_properties_manager.h
+++ b/net/http/http_server_properties_manager.h
@@ -102,32 +102,49 @@ class NET_EXPORT HttpServerPropertiesManager : public HttpServerProperties {
void MaybeForceHTTP11(const HostPortPair& server,
SSLConfig* ssl_config) override;
- // Returns true if |server| has an Alternate-Protocol header.
+ // Returns true iff |server| has a non-broken AlternateProtocol with
+ // probability exceeding threshold, or if AlternateProtocol is forced.
+ // TODO(bnc): Rename to HasAlternativeService.
bool HasAlternateProtocol(const HostPortPair& server) override;
- // Returns the Alternate-Protocol and port for |server|.
- // HasAlternateProtocol(server) must be true.
+ // Returns the first non-broken AlternateProtocol with probability exceeding
+ // threshold for |server|, or forced AlternateProtocol, or one with
+ // UNINITIALIZED_ALTERNATE_PROTOCOL.
AlternateProtocolInfo GetAlternateProtocol(
const HostPortPair& server) override;
- // Sets the Alternate-Protocol for |server|.
- void SetAlternateProtocol(const HostPortPair& server,
+ // Adds an Alternate-Protocol for |server|.
+ void AddAlternateProtocol(const HostPortPair& server,
uint16 alternate_port,
AlternateProtocol alternate_protocol,
double alternate_probability) override;
- // Sets the Alternate-Protocol for |server| to be BROKEN.
- void SetBrokenAlternateProtocol(const HostPortPair& server) override;
+ // Sets a given Alternate-Protocol for |server| to be broken.
+ void SetBrokenAlternateProtocol(
+ const HostPortPair& server,
+ const AlternateProtocolInfo& broken_alternate_protocol) override;
- // Returns true if Alternate-Protocol for |server| was recently BROKEN.
- bool WasAlternateProtocolRecentlyBroken(const HostPortPair& server) override;
+ // Returns true if given Alternate-Protocol for |server| was recently broken.
+ bool WasAlternateProtocolRecentlyBroken(
+ const HostPortPair& server,
+ const AlternateProtocolInfo& alternate_protocol) override;
- // Confirms that Alternate-Protocol for |server| is working.
- void ConfirmAlternateProtocol(const HostPortPair& server) override;
+ // Confirms that given Alternate-Protocol for |server| is working.
+ void ConfirmAlternateProtocol(
+ const HostPortPair& server,
+ const AlternateProtocolInfo& alternate_protocol) override;
- // Clears the Alternate-Protocol for |server|.
+ // Clears all Alternate-Protocols for |server|.
void ClearAlternateProtocol(const HostPortPair& server) override;
+ // Clears all Alternate-Protocols that are not broken for |server|.
+ void ClearNonBrokenAlternateProtocols(const HostPortPair& server) override;
+
+ // Removes an Alternate-Protocol for |server|.
+ void RemoveAlternateProtocol(
+ const HostPortPair& server,
+ const AlternateProtocolInfo& alternate_protocol) override;
+
// Returns all Alternate-Protocol mappings.
const AlternateProtocolMap& alternate_protocol_map() const override;
« no previous file with comments | « net/http/http_server_properties_impl_unittest.cc ('k') | net/http/http_server_properties_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698