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

Unified Diff: net/http/http_server_properties.h

Issue 377063002: Revert of Add a probability to Alternate-Protocol support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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_network_transaction_unittest.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_server_properties.h
diff --git a/net/http/http_server_properties.h b/net/http/http_server_properties.h
index 718f4c5a4e54dee5b455cd55cd71432423a33350..88d1f3cefba5978d3456823a69e81cc63ad44464 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -92,29 +92,19 @@
NET_EXPORT_PRIVATE AlternateProtocol AlternateProtocolFromNextProto(
NextProto next_proto);
-struct NET_EXPORT AlternateProtocolInfo {
- AlternateProtocolInfo(uint16 port,
- AlternateProtocol protocol,
- double probability)
- : port(port),
- protocol(protocol),
- probability(probability) {}
-
- bool Equals(const AlternateProtocolInfo& other) const {
- return port == other.port &&
- protocol == other.protocol &&
- probability == other.probability;
+struct NET_EXPORT PortAlternateProtocolPair {
+ bool Equals(const PortAlternateProtocolPair& other) const {
+ return port == other.port && protocol == other.protocol;
}
std::string ToString() const;
uint16 port;
AlternateProtocol protocol;
- double probability;
};
typedef base::MRUCache<
- HostPortPair, AlternateProtocolInfo> AlternateProtocolMap;
+ HostPortPair, PortAlternateProtocolPair> AlternateProtocolMap;
typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap;
extern const char kAlternateProtocolHeader[];
@@ -153,14 +143,13 @@
// Returns the Alternate-Protocol and port for |server|.
// HasAlternateProtocol(server) must be true.
- virtual AlternateProtocolInfo GetAlternateProtocol(
+ virtual PortAlternateProtocolPair GetAlternateProtocol(
const HostPortPair& server) = 0;
// Sets the Alternate-Protocol for |server|.
virtual void SetAlternateProtocol(const HostPortPair& server,
uint16 alternate_port,
- AlternateProtocol alternate_protocol,
- double probability) = 0;
+ AlternateProtocol alternate_protocol) = 0;
// Sets the Alternate-Protocol for |server| to be BROKEN.
virtual void SetBrokenAlternateProtocol(const HostPortPair& server) = 0;
@@ -180,9 +169,6 @@
virtual void SetAlternateProtocolExperiment(
AlternateProtocolExperiment experiment) = 0;
-
- virtual void SetAlternateProtocolProbabilityThreshold(
- double threshold) = 0;
virtual AlternateProtocolExperiment GetAlternateProtocolExperiment()
const = 0;
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698