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

Unified Diff: net/http/http_server_properties_impl.h

Issue 1878143005: SHP 4: Change AlternativeServiceMap to use SchemeHostPort as the key. No change to Pref data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SHP_3
Patch Set: fix cronet && SpdyNetworkTransactionUnittests Created 4 years, 8 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
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 00ff7596ce98576470deac568564a35669718cfb..f1480064ceac888b194c493bbd90697cf9ff6d57 100644
--- a/net/http/http_server_properties_impl.h
+++ b/net/http/http_server_properties_impl.h
@@ -88,11 +88,11 @@ class NET_EXPORT HttpServerPropertiesImpl
void MaybeForceHTTP11(const HostPortPair& server,
SSLConfig* ssl_config) override;
AlternativeServiceVector GetAlternativeServices(
- const HostPortPair& origin) override;
- bool SetAlternativeService(const HostPortPair& origin,
+ const url::SchemeHostPort& origin) override;
+ bool SetAlternativeService(const url::SchemeHostPort& origin,
const AlternativeService& alternative_service,
base::Time expiration) override;
- bool SetAlternativeServices(const HostPortPair& origin,
+ bool SetAlternativeServices(const url::SchemeHostPort& origin,
const AlternativeServiceInfoVector&
alternative_service_info_vector) override;
void MarkAlternativeServiceBroken(
@@ -105,7 +105,7 @@ class NET_EXPORT HttpServerPropertiesImpl
const AlternativeService& alternative_service) override;
void ConfirmAlternativeService(
const AlternativeService& alternative_service) override;
- void ClearAlternativeServices(const HostPortPair& origin) override;
+ void ClearAlternativeServices(const url::SchemeHostPort& origin) override;
const AlternativeServiceMap& alternative_service_map() const override;
std::unique_ptr<base::Value> GetAlternativeServiceInfoAsValue()
const override;
@@ -139,7 +139,7 @@ class NET_EXPORT HttpServerPropertiesImpl
// |spdy_servers_map_| has flattened representation of servers
// (scheme, host, port) that either support or not support SPDY protocol.
typedef base::MRUCache<std::string, bool> SpdyServersMap;
- typedef std::map<HostPortPair, HostPortPair> CanonicalHostMap;
+ typedef std::map<url::SchemeHostPort, url::SchemeHostPort> CanonicalHostMap;
typedef std::vector<std::string> CanonicalSufficList;
typedef std::set<HostPortPair> Http11ServerHostPortSet;
@@ -155,12 +155,14 @@ class NET_EXPORT HttpServerPropertiesImpl
// Return the iterator for |server|, or for its canonical host, or end.
AlternativeServiceMap::const_iterator GetAlternateProtocolIterator(
- const HostPortPair& server);
+ const url::SchemeHostPort& server);
// Return the canonical host for |server|, or end if none exists.
- CanonicalHostMap::const_iterator GetCanonicalHost(HostPortPair server) const;
+ CanonicalHostMap::const_iterator GetCanonicalHost(
+ const url::SchemeHostPort& server) const;
- void RemoveCanonicalHost(const HostPortPair& server);
+ // Remove the cononical host for |server| if |server| is the value in the map.
+ void RemoveCanonicalHost(const url::SchemeHostPort& server);
void ExpireBrokenAlternateProtocolMappings();
void ScheduleBrokenAlternateProtocolMappingsExpiration();
@@ -177,8 +179,8 @@ class NET_EXPORT HttpServerPropertiesImpl
SpdySettingsMap spdy_settings_map_;
ServerNetworkStatsMap server_network_stats_map_;
// Contains a map of servers which could share the same alternate protocol.
- // Map from a Canonical host/port (host is some postfix of host names) to an
- // actual origin, which has a plausible alternate protocol mapping.
+ // Map from a Canonical scheme/host/port (host is some postfix of host names)
+ // to an actual origin, which has a plausible alternate protocol mapping.
CanonicalHostMap canonical_host_to_origin_map_;
// Contains list of suffixes (for exmaple ".c.youtube.com",
// ".googlevideo.com", ".googleusercontent.com") of canonical hostnames.

Powered by Google App Engine
This is Rietveld 408576698