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

Unified Diff: net/http/http_server_properties.h

Issue 1824903002: Change the AlternativeServiceMap with SchemeOriginPair key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties_impl.h » ('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 44224db76f6b980b1ce8acf6ae687fdddc40b763..476dacf29aea271731214da3c7d1212f98aae259 100644
--- a/net/http/http_server_properties.h
+++ b/net/http/http_server_properties.h
@@ -23,6 +23,7 @@
#include "net/socket/next_proto.h"
#include "net/spdy/spdy_framer.h" // TODO(willchan): Reconsider this.
#include "net/spdy/spdy_protocol.h"
+#include "url/scheme_host_port.h"
namespace base {
class Value;
@@ -203,7 +204,7 @@ struct NET_EXPORT ServerNetworkStats {
typedef std::vector<AlternativeService> AlternativeServiceVector;
typedef std::vector<AlternativeServiceInfo> AlternativeServiceInfoVector;
-typedef base::MRUCache<HostPortPair, AlternativeServiceInfoVector>
+typedef base::MRUCache<url::SchemeHostPort, AlternativeServiceInfoVector>
AlternativeServiceMap;
typedef base::MRUCache<HostPortPair, SettingsMap> SpdySettingsMap;
typedef base::MRUCache<HostPortPair, ServerNetworkStats> ServerNetworkStatsMap;
@@ -237,7 +238,7 @@ class NET_EXPORT HttpServerProperties {
// Returns true if |server| supports a network protocol which honors
// request prioritization.
- virtual bool SupportsRequestPriority(const HostPortPair& server) = 0;
+ virtual bool SupportsRequestPriority(const url::SchemeHostPort& server) = 0;
// Returns the value set by SetSupportsSpdy(). If not set, returns false.
virtual bool GetSupportsSpdy(const HostPortPair& server) = 0;
@@ -263,14 +264,14 @@ class NET_EXPORT HttpServerProperties {
// Return all alternative services for |origin|, including broken ones.
// Returned alternative services never have empty hostnames.
virtual AlternativeServiceVector GetAlternativeServices(
- const HostPortPair& origin) = 0;
+ const url::SchemeHostPort& origin) = 0;
// Set a single alternative service for |origin|. Previous alternative
// services for |origin| are discarded.
// |alternative_service.host| may be empty.
// Return true if |alternative_service_map_| is changed.
virtual bool SetAlternativeService(
- const HostPortPair& origin,
+ const url::SchemeHostPort& origin,
const AlternativeService& alternative_service,
base::Time expiration) = 0;
@@ -279,7 +280,7 @@ class NET_EXPORT HttpServerProperties {
// Hostnames in |alternative_service_info_vector| may be empty.
// Return true if |alternative_service_map_| is changed.
virtual bool SetAlternativeServices(
- const HostPortPair& origin,
+ const url::SchemeHostPort& origin,
const AlternativeServiceInfoVector& alternative_service_info_vector) = 0;
// Marks |alternative_service| as broken.
@@ -308,7 +309,7 @@ class NET_EXPORT HttpServerProperties {
const AlternativeService& alternative_service) = 0;
// Clear all alternative services for |origin|.
- virtual void ClearAlternativeServices(const HostPortPair& origin) = 0;
+ virtual void ClearAlternativeServices(const url::SchemeHostPort& origin) = 0;
// Returns all alternative service mappings.
// Returned alternative services may have empty hostnames.
« no previous file with comments | « net/http/http_network_transaction_unittest.cc ('k') | net/http/http_server_properties_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698